Add items to outputclass list
Add items to outputclass list
In the values for the outputclass attribute, there are list of languages for syntax highlighting, like language-java. I would like replace them with our values (as we implemented syntax highlighting awhile back). Additionally, I'd like to add a couple of others for other element types, such as <p> and <row>. What's the best way to go about this? I am using XML Editor 15.2.
Thanks,
Paul
Thanks,
Paul
Re: Add items to outputclass list
Hi Paul,
My suggestion for you is to create a Subject Scheme Map with content like:
and to link to it from the DITA Map like:
Basically you can use the Subject Scheme Map to impose allowed sets of values for any attribute name or to reject completely a certain attribute from being used:
http://www.oxygenxml.com/demo/DITA_Subject_Scheme.html
http://www.oxygenxml.com/doc/ug-oxygen/ ... e-map.html
Regards,
Radu
My suggestion for you is to create a Subject Scheme Map with content like:
Code: Select all
<!DOCTYPE subjectScheme PUBLIC "-//OASIS//DTD DITA Subject Scheme Map//EN" "map.dtd">
<subjectScheme>
<subjectHead>
<subjectHeadMeta>
<navtitle></navtitle>
</subjectHeadMeta>
</subjectHead>
<hasInstance>
<subjectdef keys="outputClassSbjKey">
<subjectdef keys="JAVA">
<topicmeta>
<navtitle>JAVA LANGUAGE</navtitle>
</topicmeta>
</subjectdef>
<subjectdef keys="XML">
<topicmeta>
<navtitle>XML LANGUAGE</navtitle>
</topicmeta>
</subjectdef>
</subjectdef>
</hasInstance>
<enumerationdef>
<attributedef name="outputclass"/>
<subjectdef keyref="outputClassSbjKey"/>
</enumerationdef>
</subjectScheme>
Code: Select all
<topicref href="productSbjSchemeVals.ditamap" format="ditamap" type="subjectScheme"/>
http://www.oxygenxml.com/demo/DITA_Subject_Scheme.html
http://www.oxygenxml.com/doc/ug-oxygen/ ... e-map.html
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Add items to outputclass list
Thanks Radu!
Re: Add items to outputclass list
Hi Radu,
Is there a way to remove some of the existing outputclass values from being displayed? For example, I'd like to remove language-bourne, language-xml, and language-ini.
Thanks,
Paul
Is there a way to remove some of the existing outputclass values from being displayed? For example, I'd like to remove language-bourne, language-xml, and language-ini.
Thanks,
Paul
Re: Add items to outputclass list
Hi Paul,
That list of default values Oxygen proposes for the @outputclass attribute of a DITA codeblock is given by a special Java extension we have for DITA called ro.sync.ecss.extensions.dita.DITASchemaManagerFilter.
I think that the easiest thing to do for you would be to take control over the displayed list of values by defining values for @outputclass in the Subject Scheme Map.
Or if you are comfortable with Java you could try to overwrite that Java extension and make changes to it, I could give you more details if you are interested in this approach.
Regards,
Radu
That list of default values Oxygen proposes for the @outputclass attribute of a DITA codeblock is given by a special Java extension we have for DITA called ro.sync.ecss.extensions.dita.DITASchemaManagerFilter.
I think that the easiest thing to do for you would be to take control over the displayed list of values by defining values for @outputclass in the Subject Scheme Map.
Or if you are comfortable with Java you could try to overwrite that Java extension and make changes to it, I could give you more details if you are interested in this approach.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Add items to outputclass list
Hi Radu,
I tried using the Subject Scheme Map from what I saw in the demo, but I just got errors. For example:
Paul
I tried using the Subject Scheme Map from what I saw in the demo, but I just got errors. For example:
Code: Select all
<enumerationdef>
<attributedef name="language-bourne"/>
<subjectdef/>
</enumerationdef>
Re: Add items to outputclass list
Hi Paul,
The @name attribute of an <attributedef> element states the name of the DITA attribute for which a set of values will be provided. So you cannot remove specific existing allowed values for an attribute but you can specify the entire set of allowed attributes like:
Unfortunately the Java extension which gives those hard coded imposed values for codeblock does not seem to be overwritten by the subject scheme imposed values, so when editing the attribute values you will still received the hard coded values. I will add an issue on our side and we'll look into it.
But at least if you use the subject scheme map users will receive errors if in the edited DITA topics they try to use a value for @outputclass which is not allowed by the subject scheme map.
Regards,
Radu
The @name attribute of an <attributedef> element states the name of the DITA attribute for which a set of values will be provided. So you cannot remove specific existing allowed values for an attribute but you can specify the entire set of allowed attributes like:
Code: Select all
<!DOCTYPE subjectScheme PUBLIC "-//OASIS//DTD DITA Subject Scheme Map//EN" "map.dtd">
<subjectScheme>
<subjectHead>
<subjectHeadMeta>
<navtitle>Controlled Values list</navtitle>
</subjectHeadMeta>
</subjectHead>
<hasInstance>
<!-- ALLOWED VALUES FOR CODEBLOCK -->
<subjectdef keys="outputSbjKey">
<subjectdef keys="language-php">
<topicmeta>
<navtitle>PHP</navtitle>
</topicmeta>
</subjectdef>
<subjectdef keys="language-css">
<topicmeta>
<navtitle>CSS</navtitle>
</topicmeta>
</subjectdef>
<subjectdef keys="language-ruby">
<topicmeta>
<navtitle>Ruby</navtitle>
</topicmeta>
</subjectdef>
</subjectdef>
</hasInstance>
<enumerationdef>
<elementdef name="codeblock"/>
<attributedef name="outputclass"/>
<subjectdef keyref="outputSbjKey"/>
</enumerationdef>
</subjectScheme>
But at least if you use the subject scheme map users will receive errors if in the edited DITA topics they try to use a value for @outputclass which is not allowed by the subject scheme map.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Re: Add items to outputclass list
Thanks Radu.
Re: Add items to outputclass list
Hi,
Just to update the thread, this issue is fixed in Oxygen 16.1:
Radu
Just to update the thread, this issue is fixed in Oxygen 16.1:
Regards,Unfortunately the Java extension which gives those hard coded imposed values for codeblock does not seem to be overwritten by the subject scheme imposed values, so when editing the attribute values you will still received the hard coded values. I will add an issue on our side and we'll look into it.
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com