Question related to XML import

The user guide mentions the requirement of an omnimark.lib and catalog.xml file with an entry for the DTD/Schema, how do I creates these two files. Adidtionally if the XML being imported is a DITA XML then how can I configure its DTD?

  • What version of XPP?

    Where are you reading about the omnimark.lib and catalog.xml files in the XPP documentation?

    You said the User Guide, but in the latest version of the XPP manuals on the web (docs.sdl.com) I only find references to omnimark.lib and catalog.xml in the XML/SGML Reference manual (ml.pdf) and the Transforming Data manual (condata.pdf) - and just a couple of references to catalog.xml in the Command Line Utilities manual (cmdutils.pdf) under the xppxslt program.

    I suggest you download from docs.sdl.com the latest version of XML/SGML Reference and read Chapter 1 and Transforming Data and read Chapter 10 about the omnimark.lib and catalog.xml files. I think it's fairly well described (in latest versions of these manuals) how to put in place and use these two files. I don't think I can describe what you need to do better than those chapters do.

    If you still have questions after doing that, then please ask.

  • In general people do not go through the trouble of setting up the DTD/Schema environment on their XPP system, unless there is a very specific reason you want to set it up. In which case people simply strip the DTD declaration from the incoming file using something simple like xychange.
    Composition does not gain anything from having access to the DTD.

    A specific reason why you want to set up the DTD/Schema environment could be that you do elaborate editing inside XPP and you want to be able to validate the instance. In that case you will need to set up:
    -either the omnimark lib file
    or
    -either change the DTD declaration in the incoming XML instance so that it points to valid SYSTEM path on your XPP system (and do the same for any entities that are used in the DTD).

    In case you want to set up the omnimark.lib file, just copy the sample omnimark.lib file from $XYV_EXECS/distr/sys/ml to $XYVV_EXECS/sys/ml and edit to include the necessary entries

    A specific reason for setting up the transformation environment is that you want to include text or file entities at import. In that case you will have to rename the catalog.tmpl file you find in the $XYV_EXECS/sys/ml folder to catalog.xml and add your entries. The samples given in the template file are pretty clear so you should not have any trouble with this. Note that the catalog.xml file is only used by the V2 engines so you will have to use V2 stylesheets for your transformation and use either the -xsl2 or -xslauto option when transforming at import.
    Note that when you parse during the transformation your output and transformed file will no longer include the DTD declaration as an XSLT stylesheet can not pick up a DTD declaration.

    This last things means that you can not parse during import AND parse inside the xyview unless you add the DTD declaration yourself somewhere in the input stream.

    More info about all of this can be found in the excellent documentation XML/SGML reference - chapter 1