Page 1 of 1

Specialization of the Universal Attributes Group

Posted: Wed Jul 10, 2019 1:33 am
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?

Re: Specialization of the Universal Attributes Group

Posted: Wed Jul 10, 2019 7:48 am
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

Re: Specialization of the Universal Attributes Group

Posted: Fri Jul 12, 2019 10:30 pm
by CarlosM
Thanks Radu!

Re: Specialization of the Universal Attributes Group

Posted: Wed Jul 24, 2019 4:19 pm
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.

Re: Specialization of the Universal Attributes Group

Posted: Wed Jul 24, 2019 7:28 pm
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.

Re: Specialization of the Universal Attributes Group

Posted: Thu Jul 25, 2019 8:29 am
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

Re: Specialization of the Universal Attributes Group

Posted: Thu Jul 25, 2019 9:19 am
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