Help exporting to XML for NITF (news industry transfer format)
I'm using InDesign CS 5.5 & javascript on Windows, attempting to script an XML export to put historical articles from a pile of newsletters into a web-based content management system that can read NITF, an XML standard for exchanging news stories. I've got the script working well enough to create separate files of each individual article, with appropriately tagged content areas (document-ID, title, copyright year, etc.) but have run into what seems like a limitation in InDesign's handling of XML. My XML tagging so far works fine for short pieces of simple information, like an issue number or a date, but tagging a chunk of paragraphs totally wipes all other text structure--no paragraph breaks, no html links, no bold, italic or other style designations. This is hardly functional for a news story. Am I missing something or is InDesign simply figuring XML's only good for making catalogs?
I suppose I could try to re-create what InDesign does for HTML export, for which basic document structure translates fine, but surely someone has crossed this bridge before, and my time is limited. The only other thread on these forums I found was from someone still early in the scripting process.
The tagging technique I am using is based on a template that I've XML tagged. The script opens a newsletter file, scans it for article elements, then cycles through the elements, plugging their attributes into separate documents based on the XML-tagged template. Further exports come out of the separate documents,
The other glitch is that the latest NITF definition, 3.6, uses an .XSD for definition, rather than the earlier DTD (document type definition). InDesign can import and use DTDs, but not .XSDs, at least my version can't. I tried using an older program (XMLpad Pro) to translate XSD to DTD, but InDesign crashes upon attempting to load it. '
There is a DTD definition for the next most recent version of NITF, 3.5, which loads fine. Unfortunately the 3.5 DTD is missing an element that I'd like to use.
Does anyone have any pointers, words to the wise or grim declarations of doom which might forestall my head banging? TIA