Specialization of the Universal Attributes Group

Post here questions and problems related to editing and publishing DITA content.
CarlosM
Posts: 9
Joined: Wed Jul 11, 2018 11:19 pm

Specialization of the Universal Attributes Group

Post by CarlosM »

Greetings,

I want to create a specialization that will work for all elements in DITA. This leads me to believe that I should create a specialization of the universal attributes group. https://docs.oasis-open.org/dita/dita/v ... butes.html

Is this possible to do, and how would I do it? If not, is there another way to introduce an attribute that is compatible with every element in DITA?
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Specialization of the Universal Attributes Group

Post by Radu »

Hi Carlos,

You can built a DITA DTD-based attribute specialization using this tutorial by Eliot Kimber:

http://www.xiruss.org/tutorials/dita-sp ... ocess.html


Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
CarlosM
Posts: 9
Joined: Wed Jul 11, 2018 11:19 pm

Re: Specialization of the Universal Attributes Group

Post by CarlosM »

Thanks Radu!
CarlosM
Posts: 9
Joined: Wed Jul 11, 2018 11:19 pm

Re: Specialization of the Universal Attributes Group

Post by CarlosM »

Okay, so I am still struggling to get this specialization made.

I followed the attribute specialization tutorial as best I could, but my new attribute still won't validate and does not show up in the merged file when I try to output a doc. Here is the content of the .ent file I created:

Code: Select all


<!ENTITY % owner-d-attribute 
  "owner
    CDATA 
    #IMPLIED
  "
>
<!ENTITY owner-d-att
   "a(props  owner)"
>

I have tried to integrate the attribute into the DITA-OT as a plugin. The plugin contains the following structure

Code: Select all


doctypes
	attSpecialization
		ownerAttDomain.ent
		catalog.xml
	concept
		dtd
			catalog.xml
			concept.dtd
		catalog.xml
	reference
		dtd
			catalog.xml
			reference.dtd
		catalog.xml
	task
		dtd
			catalog.xml
			task.dtd
		catalog.xml
	topic
		dtd
			catalog.xml
			topic.dtd
		catalog.xml
	catalog.xml
catalog.xml
plugin.xml



Not sure where to start.
CarlosM
Posts: 9
Joined: Wed Jul 11, 2018 11:19 pm

Re: Specialization of the Universal Attributes Group

Post by CarlosM »

OK, so I have been working on this off and on for about a week, and I am stuck. I have created a set of DTD based document type shells for concept, reference, task, and topic and I have added the .ent file for my plugin to a folder and edited the document type shells to point to it as instructed in the tutorial. Here is the structure of the .ent file:

Code: Select all


<!ENTITY % owner-d-attribute 
  "owner
    CDATA 
    #IMPLIED
  "
>
<!ENTITY owner-d-att
   "a(props  owner)"
>

The DITA-OT integrator works successfully, but the attribute I am trying to add does not validate.
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Specialization of the Universal Attributes Group

Post by Radu »

Hi,

If you send us via email (support@oxygenxml.com) your entire specialization I could try to take a look at it.

Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Radu
Posts: 9051
Joined: Fri Jul 09, 2004 5:18 pm

Re: Specialization of the Universal Attributes Group

Post by Radu »

Hi Carlos,

By the way, on this similar forum thread I added a link to a sample DITA OT plugin which adds a new profiling attribute to a DITA Task, maybe it will also help you as a comparison to your current setup:

post54709.html#p54709

There is also this older blog post:

topic12861.html#p37076

which points to an automatic attribute specialization generator that I forgot to tell you about:

https://dita-generator-hrd.appspot.com/

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