.htm -> .xml

This forum is for all Flare issues related to the Microsoft HTML Help target.
This target produces "CHM" files in the output.
Post Reply
MkMr
Propeller Head
Posts: 17
Joined: Tue Sep 25, 2007 7:29 am

.htm -> .xml

Post by MkMr »

Hi,

I really don't understand the difference between .htm and .xml files and thus my question....

I've been developing a CHM in Flare where the souce files are .htm. I've been tasked with needing to integrate my topics with another help system (also a CHM) which uses .xml as the input file format. I'm confused about what I need to do to get my topics into this format. Does Flare provide any tools to help with this?

Any help appreciated!

Mark
LTinker68
Master Propellus Maximus
Posts: 7247
Joined: Thu Feb 16, 2006 9:38 pm

Re: .htm -> .xml

Post by LTinker68 »

To simplify...

.xml is strictly a data file. It doesn't contain any information about how to display that data.

.htm contains information about how to display data, whether that data is in the same .htm file (text, images, etc.) and/or is being pulled from an external source (.xml file, database, another .htm file, etc.).

Flare uses some .xml files for some features (glossary, TOC, etc.), but I don't think there's an easy way to use an XML file as the source for a topic file (.htm). I think you're going to have to manually add the code to a topic file that will pull the data from a specific .xml file and display it in the .htm file. I don't know how to do that type of coding off the top of my head, so I'd use Dreamweaver to set up the files, then copy-and-paste the code from the Dreamweaver page into the page code of a topic in Flare. I haven't tried that in Flare, but you could give it a shot.

Unfortunately, you'd have to do that for all the XML files, one at a time. Hopefully someone else will have an easier idea of how to do this in Flare.
Image

Lisa
Eagles may soar, but weasels aren't sucked into jet engines.
Warning! Loose nut behind the keyboard.
RamonS
Senior Propellus Maximus
Posts: 4293
Joined: Thu Feb 02, 2006 9:29 am
Location: The Electric City

Re: .htm -> .xml

Post by RamonS »

Both are just file name extensions. Just because a file has the extension .xml doesn't make it automatically an XML file, same for .htm or .html. XHTML files contain a special format of XML that is understood by browsers. XHTML is also specified by an ISO / W3C standard and most browsers and applications adhere to that standard except anything from Microsoft. XHTML is a special format of XML. The older HTML is similar to XML, but it allows to violate some basic rules that are mandated by XML and thus cannot be considered XML (most obvious violation is that in some cases the omission of closing tags is accepted).
There are other conventions for XML files besides XHTML, some are standardized (DITA, SIFA, ODF), some are not. XML is a nice way to exchange structured data if having excessive overhead is not a problem. Also, XML can be displayed as and often is a flat file.
Flare uses some XML files using a proprietary, Flare-specific convention for files that are only ever be consumed by Flare or by JavaScript that is controlled by Flare. Anything else that is to be displayed by applications other than Flare (HTMLHep Viewer, web browsers) is crafted using XHTML, so that the other consumers of these files can understand the markup.

Hope this wasn't too confusing.
Pete Lees
Sr. Propeller Head
Posts: 150
Joined: Thu Feb 09, 2006 12:33 pm
Location: Bracknell, Berkshire, UK

Re: .htm -> .xml

Post by Pete Lees »

Hi, Mark,

Do you have the option to reverse-engineer the XML-sourced Help file and then import it into Flare, where you can merge the two sets of content?

Although it's possible to display the content of XML files directly in an HTML Help file, it's much more likely that the content was authored in XML and then transformed to HTML, prior to final compilation. You can easily determine whether this is the case by right-clicking the topic pane in the Help window and then clicking View Source on the context menu. The presence of <HTML>...</HTML> tags in the markup will immediately tell you whether you're looking at HTML or XML.

This article describes how to reverse-engineer an HTML Help file:

http://www.grainge.org/pages/authoring/ ... eering.htm

If you follow the instructions (in particular the suggestion to use KeyTools when decompiling), you can recover everything that you need to import the content into Flare.

One other option may be to set up run-time merging in either Help file. That's to say, you keep the two Help files separate but configure one to merge in the other's TOC, index and full-text search data when the first file is opened. See:

http://webhelp.madcapsoftware.com/flare ... ojects.htm

Pete
Post Reply