Pages: 1
Print
Author Topic: Create Document with DTD via COM Api  (Read 3094 times)
ndudek
Member

Posts: 14


« on: February 11, 2015, 01:22:28 AM »

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.

Regards,
Nico
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #1 on: February 12, 2015, 03:11:49 PM »

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).
Logged
ndudek
Member

Posts: 14


« Reply #2 on: February 13, 2015, 12:39:12 AM »

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 extid.map 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.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 2621



WWW
« Reply #3 on: February 16, 2015, 04:34:51 PM »

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:

http://www.slideshare.net/XMetaL/deploying-schemas-and-xmetal-customization-files

Note that although the extid.map 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.

Logged
Pages: 1
Print
Jump to: