old newly - dita specializations

Post here questions and problems related to editing and publishing DITA content.
MAatHome
Posts: 6
Joined: Tue Jun 07, 2011 1:13 am

old newly - dita specializations

Post by MAatHome »

So, for reasons I can't really remember :-), I decided to try to use DITA for this application ... it still seems like the right decision, but the learning curve is about to take me out. I've been around since before ISIL (early BookMaster) and I have read a lot (perhaps not enough). I have Oxygen Editor.

But this is about rules, not machinery, or concepts and eventually needs to be fairly editable by many, so needs to use the current terminology. So I want to create specializations of topic called 'articles' and 'subarticles' (for lack of a better term). An article will nest subarticles that can nest other subarticles.

So, moving beyond the reading, I have an article.dtd and article.mod and a declaration in each file:
<!DOCTYPE article PUBLIC "-//OASIS//DTD DITA Article//EN" "article.dtd">
It feels not quite right calling it //OASIS//DTD DITA Article ...

How do I get oxygen to recognize the specialization. Is there some other reference I need to have to article.dtd so that its seen properly?

thanks for any advice,
Mike.
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: old newly - dita specializations

Post by Radu »

Hi Mike,

You should create an XML catalog for your specialization to map the public IDs (in your case -//OASIS//DTD DITA Article//EN) to local DTD references.

Then in this catalog file:

OXYGEN_INSTALL_DIR/frameworks/dita/DITA-OT/catalog-dita.xml

add a <nextCatalog> entry pointing to your catalog file like:

Code: Select all

<nextCatalog catalog="path/to/specialization/catalog.xml"/>
This should be enough for Oxygen to validate and provide content completion for the file + for publishing the XML to various output sources using transformation scenarios with the DITA Open Toolkit bundled with Oxygen.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
MAatHome
Posts: 6
Joined: Tue Jun 07, 2011 1:13 am

Re: old newby - dita specializations

Post by MAatHome »

(note the subject was supposed to be 'old' (that's me) 'newly' (that's me to DITA))

The catalog entry is just the ticket! Thank you ... this makes it possible.

I will have many follow-on questions later, but two for now:

1) when editing the DTD/MOD file under oxygen, the parser seems to not understand the inheritance hierarchy ... it complains about name defined in other DTDs ... like %info-types in
<!ENTITY % article-info-types "%info-types;" >

I think this is ok.

2) when switching between editing my DITA file and this new DTD , how do I get oxygen to 'refresh' its understanding of the DTD?

thanks so much,
Mike.
MAatHome
Posts: 6
Joined: Tue Jun 07, 2011 1:13 am

Re: old newby - dita specializations

Post by MAatHome »

#2 - got it! through clear cache and validate.

perfect,
Mike.
MAatHome
Posts: 6
Joined: Tue Jun 07, 2011 1:13 am

Re: old newby - dita specializations

Post by MAatHome »

#1 - got it, through validating the dtd, not the mod (of course!)

a little understanding ... dangerous indeed,
Mike.
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: old newly - dita specializations

Post by Radu »

Hi Mike,

Indeed, modules are only valid in the context of the parent DTD.
In Oxygen we have this concept of Validation Scenario:

http://www.oxygenxml.com/doc/ug-oxygen/ ... nario.html

Basically you can create for the module a validation scenario which actually validates the main DTD.
So while editing the module Oxygen will show you validation problems by starting from the master DTD

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
pablojvarela
Posts: 9
Joined: Thu Jul 12, 2012 7:41 pm

Re: old newly - dita specializations

Post by pablojvarela »

I'm on the same crossroad and I do not get a Validating Scenario to work.

This is what I am doing:
1. I'm editing myFile.dita file with this doctype:

Code: Select all

<!DOCTYPE restNamespace PUBLIC "-//Intel//DTD DITA REST Namespace Type//EN"
"../dtd/restNamespace.dtd">
2. The restNamespace type includes a domain called httpDomain. In restNamespace.dtd I have:

Code: Select all

<!ENTITY % http-d-dec PUBLIC "-//Intel//ENTITIES DITA HTTP Domain//EN"
"httpDomain.ent">
%http-d-dec;

(...)

<!ENTITY % http-d-def PUBLIC "-//Intel//ELEMENTS DITA HTTP Domain//EN"
"httpDomain.mod">
%http-d-def;
3. The httpDomain defines an element called httpURL. From httpDomain.mod:

Code: Select all

<!ENTITY % httpURL "httpURL">
...
<!ELEMENT httpURL (...)
>

4. The content model for my root element in restNamespace.dtd includes the httpURL element :

Code: Select all

<!ELEMENT restNamespace (
(%httpURL;), ...
)
FINALLY. While editing myFile.dtd I get the error
The entity "httpURL" was referenced, but not declared.
.

I did not get a validating scenario to avoid the problem.
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: old newly - dita specializations

Post by Radu »

Hi Pablo,

If you get a validation error in the main DTD file then there is a problem with your specialization.
If you can share your specialization with us (support@oxygenxml.com) I could try to take a look at it.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
pablojvarela
Posts: 9
Joined: Thu Jul 12, 2012 7:41 pm

Re: old newly - dita specializations

Post by pablojvarela »

Never mind: it was my fault. I was forcing an element defined in a domain specialization in the content model of a topic type specialization's element.

Is there a way to produce this effect? I.e., forcing an element defined in a domain specialization in the content model of a topic type specialization's element. Maybe Constraints?
Radu
Posts: 9046
Joined: Fri Jul 09, 2004 5:18 pm

Re: old newly - dita specializations

Post by Radu »

Hi Pablo,

My knowledge of DITA specializations is not good enough to answer this question.
Maybe you should write about this on the DITA Users List with some small examples. Eliot Kimber, the master of DITA specializations replies to threads quite regularly there.

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