My domain specialization isn't working, help!

surangamas
Posts: 47
Joined: Tue Feb 21, 2012 10:17 pm

My domain specialization isn't working, help!

Post by surangamas » Tue Feb 21, 2012 10:34 pm

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\

Radu
Posts: 7028
Joined: Fri Jul 09, 2004 5:18 pm

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

Post by Radu » Wed Feb 22, 2012 10:24 am

Hi,

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

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

surangamas
Posts: 47
Joined: Tue Feb 21, 2012 10:17 pm

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

Post by surangamas » Wed Feb 22, 2012 7:19 pm

Hi Radu, thanks for your help, I've sent my specialized files to: support@oxygenxml.com .

surangamas
Posts: 47
Joined: Tue Feb 21, 2012 10:17 pm

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

Post by surangamas » Thu Feb 23, 2012 5:39 pm

Hi Radu:
I received your reply, and your solution worked! Thanks a lot for your help.

Radu
Posts: 7028
Joined: Fri Jul 09, 2004 5:18 pm

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

Post by Radu » Thu Feb 23, 2012 5:46 pm

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
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com

surangamas
Posts: 47
Joined: Tue Feb 21, 2012 10:17 pm

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

Post by surangamas » Thu Feb 23, 2012 6:56 pm

Thanks again.

Post Reply