General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Specifying SYSTEM identifier in template files

  • larrygolding

    Specifying SYSTEM identifier in template files

    Participants 3
    Replies 4
    Last Activity 11 years, 4 months ago

    XMetaL Author Enterprise

    I have an XMetaL customization that installs a DTD for a new document type, as well as a template file for use with File, New. What is the best way to specify the SYSTEM identifier in the DOCTYPE declaration in the template file? I can think of three ways but none of them are perfect:

    1) Specify a relative path from the template file to the DTD file:

    … but that won't work when you save the instantiated document in a different directory from the template file.

    2) Specify the absolute path to the DTD file:

    … but that won't work if the user has installed XMetaL to a different location (or installed to the standard location, but on a 32-bit machine).

    3) Specify a replacement parameter for the path; then, at installation time, execute a custom installer action to insert the correct path to the program files directory:

    … but that won't work if you author a document on one machine, save it to a file share, and then somebody else tries to edit in on a machine where XMetaL is installed to a different location,¬† or which has a different 32/64-bit architecture.

    Is there a perfect answer?




    Reply to: Specifying SYSTEM identifier in template files

    I think by default Xmetal checks the AuthorRules folder if you just have a file name with no path.

    There is also a fair amount of information about DTDs and location in the documentation:

    You would still probably have to figure out where xmetal is installed though to deploy the customization.
    Using a registry value  like HKEY_LOCAL_MACHINESOFTWARESoftQuadXMetaL 6.0Path or somthing might be the simplest way.



    Reply to: Specifying SYSTEM identifier in template files

    Thank you. I'll try that.


    Derek Read

    Reply to: Specifying SYSTEM identifier in template files

    Most precisely, if you specify a path that XMetaL cannot otherwise locate it checks the Rules folder.
    So, if you have a SYSTEM id that just specifies the DTD filename with no path AND the DTD is not in the same folder as the XML document then the Rules folder is used.

    I only mention this in case you happen to have the DTD and XML file in the same folder (this may be common while developing customizations for XMetaL).

    Very detailed explanation of the lookup is located here:
    See slide #8 for my flowchart. That document is likely worth reading from start to end if you have questions about how the product locates DTDs and the associated customization files.

    Unfortunately, the Webex recording that goes with that slide deck was corrupted so we do not have it, however, I think the slides themselves answer any questions you might have.



    Reply to: Specifying SYSTEM identifier in template files

    Thanks Derek, the information in that presentation was just what I needed, and my new content type now installs and works flawlessly. Thanks again!



  • You must be logged in to reply to this topic.

Lost Your Password?