Pages: 1
Print
Author Topic: Specifying SYSTEM identifier in template files  (Read 507 times)
larrygolding
Member

Posts: 15


« on: September 09, 2011, 06:03:48 PM »

XMetaL Author Enterprise 6.0.1.030

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:

<!DOCTYPE pspconcept SYSTEM "..\..\..\..\Common Files\XMetaL Shared\DITA_OT\My Project\My DocType\myDocType.dtd">

... 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:

<!DOCTYPE pspconcept SYSTEM "C:\Program Files (x86)\Common Files\XMetaL Shared\DITA_OT\My Project\My DocType\myDocType.dtd">

... 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:

<!DOCTYPE pspconcept SYSTEM "{0}\Common Files\XMetaL Shared\DITA_OT\My Project\My DocType\myDocType.dtd">

... 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?

Thanks,
Larry
Logged
gcrews
Member

Posts: 189


« Reply #1 on: September 10, 2011, 02:05:44 AM »

I think by default Xmetal checks the Author\Rules 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:
http://na.justsystems.com/webhelp/en/xmetaldeveloper/cg/6.0/cg.html#DTDs%20and%20schemas
http://na.justsystems.com/webhelp/en/xmetalauthor/enterprise/6.0/XMEE.html#DITA%20specializations

You would still probably have to figure out where xmetal is installed though to deploy the customization.
Using a registry value  like HKEY_LOCAL_MACHINE\SOFTWARE\SoftQuad\XMetaL 6.0\Path or somthing might be the simplest way.
Logged
larrygolding
Member

Posts: 15


« Reply #2 on: September 10, 2011, 02:51:10 PM »

Thank you. I'll try that.
Logged
Derek Read
Program Manager (XMetaL)
Administrator
Member

Posts: 1548



WWW
« Reply #3 on: September 12, 2011, 10:31:29 AM »

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:
http://www.slideshare.net/XMetaL/deploying-schemas-and-xmetal-customization-files
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.
Logged
larrygolding
Member

Posts: 15


« Reply #4 on: September 12, 2011, 06:22:27 PM »

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

Larry
Logged
Pages: 1
Print
Jump to:  

email us