Page 1 of 1

My domain specialization isn't working, help!

Posted: Tue Feb 21, 2012 10:34 pm
by surangamas
Hi, I've created a specialized domain called "txvia" and added two specialized elements: "artifact_type" and "txvia_reserved." I've added entries to the catalog-dita.xml file so that it can resolve my newly created public ID: "-//TxVia//DTD DITA Topic//EN." However, when I open a blank file by indicating the new public ID in <!DOCTYPE>, Xcers kept telling me that something is referenced but not declared, I ran into no such problem in XMetaL using the same set of specialized files. Can anyone help? Can I offer to send my specialized DTD, MOD and ENT files for your reference? Thanks.

The entries I've added to catalog-dita.xml are as follows:

<public publicId="-//TxVia//DTD DITA Topic//EN" uri="txviaTopic.dtd" xml:base="dtd/technicalContent/dtd/"></public>
<public publicId="-//TXVIA//Specialized Domain//EN" uri="txviaDomain.mod" xml:base="dtd/technicalContent/dtd/"></public>
<public publicId="-//TXVIA//Specialized Domain//EN" uri="txviaDomain.ent" xml:base="dtd/technicalContent/dtd/"></public>

I've also saved my specialized DTD, MOD and ENT files to: C:\Program Files (x86)\Oxygen XML Author 13\frameworks\dita\DITA-OT\dtd\technicalContent\dtd\

Re: My domain specialization isn't working, help!

Posted: Wed Feb 22, 2012 10:24 am
by Radu
Hi,

You can send your specialization files to support@oxygenxml.com and we'll try to take a look at them.

Regards,
Radu

Re: My domain specialization isn't working, help!

Posted: Wed Feb 22, 2012 7:19 pm
by surangamas
Hi Radu, thanks for your help, I've sent my specialized files to: support@oxygenxml.com .

Re: My domain specialization isn't working, help!

Posted: Thu Feb 23, 2012 5:39 pm
by surangamas
Hi Radu:
I received your reply, and your solution worked! Thanks a lot for your help.

Re: My domain specialization isn't working, help!

Posted: Thu Feb 23, 2012 5:46 pm
by Radu
Updating the thread with the suggested solution in case somebody else might find it useful:

The problem is this:

In the catalog-dita.xml you have the following mappings:

Code: Select all


     <public publicId="-//TXVIA//Specialized Domain//EN" uri="txviaDomain.mod" xml:base="dtd/technicalContent/dtd/"></public>
<public publicId="-//TXVIA//Specialized Domain//EN" uri="txviaDomain.ent" xml:base="dtd/technicalContent/dtd/"></public>
So probably by mistake you used the same public ID to map both to "txviaDomain.mod" and "txviaDomain.ent".
So each time the catalog is asked to resolve "-//TXVIA//Specialized Domain//EN", it will resolve it to "txviaDomain.mod".

Then in the "txviaTopic.dtd" you have the following code:

Code: Select all


    <!ENTITY % txvia-d-dec PUBLIC
"-//TXVIA//Specialized Domain//EN"
"txviaDomain.ent" >
%txvia-d-dec;
You assumed that it would get resolved to the "txviaDomain.ent" file but actually the public ID gets resolved through the catalogs to the "txviaDomain.mod" file. So instead of expanding the module later in the DTD, the module gets expanded in an earlier stage.

The solution should be simple, use another public ID for the entity like:

Code: Select all


     <public publicId="-//TXVIA//Specialized Domain ENTITY//EN" uri="txviaDomain.ent" xml:base="dtd/technicalContent/dtd/"></public>
and then reference it like:

Code: Select all


    <!ENTITY % txvia-d-dec PUBLIC
"-//TXVIA//Specialized Domain ENTITY//EN"
"txviaDomain.ent" >
%txvia-d-dec;
Regards,
Radu

Re: My domain specialization isn't working, help!

Posted: Thu Feb 23, 2012 6:56 pm
by surangamas
Thanks again.