General XMetaL Discussion
XMetaL Community Forum › General XMetaL Discussion › Specifying SYSTEM identifier in template files
-
larrygolding September 10, 2011 at 12:03 am
Specifying SYSTEM identifier in template files
September 10, 2011 at 12:03 amParticipants 3Replies 4Last Activity 11 years, 4 months agoXMetaL 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:
… 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?
Thanks,
Larrygcrews September 10, 2011 at 8:05 am
Reply to: Specifying SYSTEM identifier in template files
September 10, 2011 at 8:05 amI 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:
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%20specializationsYou 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.larrygolding September 10, 2011 at 8:51 pm
Reply to: Specifying SYSTEM identifier in template files
September 10, 2011 at 8:51 pmThank you. I'll try that.
Derek Read September 12, 2011 at 4:31 pm
Reply to: Specifying SYSTEM identifier in template files
September 12, 2011 at 4:31 pmMost 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.
larrygolding September 13, 2011 at 12:22 am
Reply to: Specifying SYSTEM identifier in template files
September 13, 2011 at 12:22 amThanks Derek, the information in that presentation was just what I needed, and my new content type now installs and works flawlessly. Thanks again!
Larry
-
AuthorPosts
- You must be logged in to reply to this topic.