General XMetaL Discussion

XMetaL Community Forum General XMetaL Discussion Create Document with DTD via COM Api

  • ndudek

    Create Document with DTD via COM Api

    Participants 2
    Replies 3
    Last Activity 7 years, 11 months ago

    Hey Guys,

    I wanted to know if it's possible to automize the process of Publishing the RLX files. Therefore I need XMetal to create new Documents based on different DTDs. I already wrote the complete process but now I stuck at the step of creating new documents in XMetal in order to force XMetal creating the rlx file. Hopefully someone has an answer to this questens wheater it is possible or not.



    Derek Read

    Reply to: Create Document with DTD via COM Api

    I'm not sure why you are asking about RLX generation as this is something normally managed quietly and automatically by the software, but opening an XML document that references a DTD (either via SYSTEM id or PUBLIC id and via catalog lookup) will cause the RLX file to be generated.

    Unless you have a specific reason to distribute an RLX file I would just let the software automatically manage them.

    Or you may use XMetaL Developer to generate the RLX file by building an XMetaL Project (from inside Visual Studio).

    XMetaL Developer 7 still included a tool named XMmkrules.exe (XMetaL Rules Maker) that could be used to generate RLS and RLX files. A command-line based tool named mkrls.exe was also still included (I think it only supports SGML DTDs but could be wrong). They are in the BIN subfolder and were created long ago (before XMetaL Developer) and were used because (at the time) a DTD might take several seconds to “compile” into the memory representation required by XMetaL Author and its predecessors HoTMetaL, Author Editor, etc. These tools are not supported and they've also lost their accompanying help files (though the CMD version will list options at a CMD prompt). I think the only reason they are still included with Developer is that nobody bothered to clean them out.

    The RLX file is a compiled version of a DTD (including all referenced files), and is pretty much a representation of what XMetaL has created in memory to represent that. RLD is the equivalent for XSD Schema and RLS is an SGML DTD. The reason the software originally generated these files was essentially to cache this information when computers were far slower (the original code comes from the 1980s SGML era but even in the 90s having to wait 2 seconds for an XML DTD to “compile” was a little annoying). It has been left unaltered primarily for compatibility reasons, though there are very specific cases where an RLX file is preferable. The only real cases I can think of is when someone wants to make it difficult to copy the content of a DTD, or to stop someone from modifying it (but that is pretty rare).



    Reply to: Create Document with DTD via COM Api

    We use the RLX files to be able to open a Document without searching for a RLX or DTD File.
    We made a file called which is placed in the root installation Folder of XMetal. In this file are Identifiers and the Destination of the RLX file so Authors don't have to care about any of that stuff.

    XMetal offers the Ability to Create a New Blank XML Document and then asks for a RLX or DTD File. So I just wanted to know if it is possible to automize this step. If not then I will stick to plan B of making template files which I will open to force creation of RLX Files.


    Derek Read

    Reply to: Create Document with DTD via COM Api

    Please read the following document (created for a webinar I gave many years ago). It gathers up all the scattered information in the User's Guide, Programmer's Guide and Customization Guide and summarizes the logic behind how schemas (and associated “XMetaL customization files”) are found and how to configure XMetaL Author so that a user is never prompted to look for a particular schema:

    Note that although the file continues to be supported, it is a legacy format created before the existence of catalog files and so is really outdated and I would avoid using it. For that reason I do not include mention of it in that slide deck.


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

Lost Your Password?