Page 1 of 1

DITA element for custom purposes

Posted: Sat Mar 12, 2016 3:00 pm
by nicksona
Hello. I use FrameMaker and save content in XML(Dita1.3) format. I want to be able to classify current snippets of the xml, but keep the validity of the xml file according to dita 1.3 specification. My purpose is after saving in xml format to be able to get specific parts of the xml. For example in HTML I would write this tag is of class "abc" and then in jquery I will get it this way $("tag[class=abc]").
So is there common attribut for the all elements, that is intended for custom purposes, or is there blank(useless) element with at least one attribute defined by the DITA 1.3 Standard?

Re: DITA element for custom purposes

Posted: Mon Mar 14, 2016 9:37 am
by Radu
Hi,

Yes, the attribute is called outputclass:

https://www.oxygenxml.com/dita/1.3/spec ... butes.html

and once you set it on a DITA element, the published equivalent HTML element should contain its value in its @class attribute.

Regards,
Radu

Re: DITA element for custom purposes

Posted: Mon Mar 14, 2016 11:27 am
by nicksona
Thank you very much. But if I have a lot of paragraphs and want to fill different outputclass for some of them, but still want all of this paragraphs to be of one common outputclass(logically they are of one general type, but are subtypes of is like they are of class dog, but each is different dog breed) how am I going to do it? That is why I asked for non styled element(usless in the way like the document looks, but usefull for my logical separation - for example if after export to HTML in framemaker whant to get just this part of the html which is of class dog) :)

Re: DITA element for custom purposes

Posted: Mon Mar 14, 2016 1:01 pm
by Radu
Hi,

You should try to publish a small DITA map sample containing a topic or two to XHTML and see how the generated XHTML looks like.
For example the DITA <p> element has the default @class attribute value topic/p and the corresponding HTML element has something like:

Code: Select all

<p class="p">...
Regards,
Radu

Re: DITA element for custom purposes

Posted: Mon Mar 14, 2016 6:31 pm
by nicksona
It seems the <text> element can be used in my case. Also <unknown> and <foreign>, but these two add new line if there is nesting, whereas <text> do not! Thank you man :)