Page 1 of 1

DTD for Templates in the New Wizard

Posted: Wed Mar 27, 2013 5:05 pm
by SSC
Hello,

we´ve got a custom Document Type Association for PI-Mod and I just created some templates and defined them in our pi-mod.framework file.

PI-Mod itself has several topic types and each of them got a different DTD.
When I try to use a template the dtd, which is defined in the head of the XML template, is not found in that folder, where the user stores the new XML document.
Is it somehow possible to also deliver those DTDs, when a new XML file is created by chosing a template?

Maybe in the properties file, where the icons for the templates are defined?

Or am I forced to create several Document Type Associations, where only the schema is diffrent?

Best regards,

Simon

Re: DTD for Templates in the New Wizard

Posted: Wed Mar 27, 2013 5:08 pm
by SSC
Or can I define a schema folder for the document type, so that the schemas, which are defined in the XML document, can be looked up there?

Re: DTD for Templates in the New Wizard

Posted: Wed Mar 27, 2013 5:18 pm
by Radu
Hi Simon,

I do not know if I fully understood the problem but here we go:

If your XML templates look like this:

Code: Select all

<!DOCTYPE root SYSTEM "schema.dtd">
<root>
......
</root>
You could create an XML catalog catalog.xml file with content like:

Code: Select all

<!DOCTYPE catalog PUBLIC "-//OASIS//DTD XML Catalogs V1.1//EN" "http://www.oasis-open.org/committees/entity/release/1.1/catalog.dtd">
<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog">
<systemSuffix systemIdSuffix="schema.dtd" uri="dtds/schema.dtd"/>
</catalog>
That catalog file can be saved in your framework's directory.
Then you edit the document type and add the catalog in the "Catalogs" tab.

When the XML is validated, Oxygen will pass the "schema.dtd" reference through the catalogs and resolve it to a location relative to the XML catalog you have defined (so you need a folder "dtds" in your framework containing all the DTDs).

Regards,
Radu

Re: DTD for Templates in the New Wizard

Posted: Thu Mar 28, 2013 11:02 am
by SSC
Hello Radu,

thank you, that was exactly what I wanted. :)

Best regards,

Simon