Flagging using specialized conditional attributes
Post here questions and problems related to editing and publishing DITA content.
-
- Posts: 1
- Joined: Wed May 25, 2016 7:03 pm
Flagging using specialized conditional attributes
Hi, I'm new to dita and text tranformation but I got a very interessting project where I want to use it.
I defined some custom attributes by specializing the @props attribute (I followed the guide given in http://drmacros-xml-rants.blogspot.de/2 ... ional.html).
The attributes work i.e. include / exclude results in the corresponding elements to be part / not part of the text transformed. Transformation is controlled using a DITAVAL file.
When changing the action from "include" to "flag" the alternative text (defined in <alttext> within the <startflag> element) does not appear.
The predefined attributes work well using the "flag" action (e.g. @audience) but the attribute that is defined in the same way as the custom attributes (@deliveryTarget) doesn't either behave as specified.
I don't have a clue how to get the flagging mechanism work. Does anybody have an idea? Thanks in advance
I defined some custom attributes by specializing the @props attribute (I followed the guide given in http://drmacros-xml-rants.blogspot.de/2 ... ional.html).
The attributes work i.e. include / exclude results in the corresponding elements to be part / not part of the text transformed. Transformation is controlled using a DITAVAL file.
When changing the action from "include" to "flag" the alternative text (defined in <alttext> within the <startflag> element) does not appear.
The predefined attributes work well using the "flag" action (e.g. @audience) but the attribute that is defined in the same way as the custom attributes (@deliveryTarget) doesn't either behave as specified.
I don't have a clue how to get the flagging mechanism work. Does anybody have an idea? Thanks in advance

-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Flagging using specialized conditional attributes
Hi,
Oxygen 17.1 and newer comes with two DITA Open Toolkit publishing engines bundled. You can configure in the Preferences->DITA page which one should be used. With DITA OT 1.8 I can flag paragraphs which use a specialization props attribute but indeed from what I tested with DITA OT 2.x flagging no longer works using a specialization of props.
I added an issue here:
https://github.com/dita-ot/dita-ot/issues/2392
If you want a quick fix suggestion, you can open the XSLT stylesheet:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT2.x\xsl\preprocess\flagImpl.xsl
and from the XSLT template:
remove the as attribute along with its value something like:
Regards,
Radu
Oxygen 17.1 and newer comes with two DITA Open Toolkit publishing engines bundled. You can configure in the Preferences->DITA page which one should be used. With DITA OT 1.8 I can flag paragraphs which use a specialization props attribute but indeed from what I tested with DITA OT 2.x flagging no longer works using a specialization of props.
I added an issue here:
https://github.com/dita-ot/dita-ot/issues/2392
If you want a quick fix suggestion, you can open the XSLT stylesheet:
OXYGEN_INSTALL_DIR\frameworks\dita\DITA-OT2.x\xsl\preprocess\flagImpl.xsl
and from the XSLT template:
Code: Select all
<xsl:template name="ext-getrules" as="element()*">
............
Code: Select all
<xsl:template name="ext-getrules">
............
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
-
- Posts: 37
- Joined: Wed May 13, 2015 11:02 am
Re: Flagging using specialized conditional attributes
Not directly related to specializations of @props but somehow related. According to the spec, @props is a conditional processing attribute. Whether in OT1.8 nor in OT2.x I could flag content by just using the @props attribute. @platform, @audience, @product and @otherprops all work, but not @props. When I check DITAOT\xsl\preprocess\flagImpl.xsl, I see nowhere templates or rules for @props (but for specializations of it). Is there a reason why @props doesn't work out-of-the-box for flagging?
-
- Posts: 9446
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Flagging using specialized conditional attributes
Hi,
From what I remember (and I could be wrong) the @props attribute was initially added as only a base for specializations. Neither profiling nor flagging worked with it. But at some point they decided that it should also work on its own so that is probably the time when filtering support was added for it.
So I agree that flagging should also work with @props, I added a comment on the issue that I previously added:
https://github.com/dita-ot/dita-ot/issues/2392
Regards,
Radu
From what I remember (and I could be wrong) the @props attribute was initially added as only a base for specializations. Neither profiling nor flagging worked with it. But at some point they decided that it should also work on its own so that is probably the time when filtering support was added for it.
So I agree that flagging should also work with @props, I added a comment on the issue that I previously added:
https://github.com/dita-ot/dita-ot/issues/2392
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
Return to “DITA (Editing and Publishing DITA Content)”
Jump to
- Oxygen XML Editor/Author/Developer
- ↳ Feature Request
- ↳ Common Problems
- ↳ DITA (Editing and Publishing DITA Content)
- ↳ Artificial Intelligence (AI Positron Assistant add-on)
- ↳ SDK-API, Frameworks - Document Types
- ↳ DocBook
- ↳ TEI
- ↳ XHTML
- ↳ Other Issues
- Oxygen XML Web Author
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Content Fusion
- ↳ Feature Request
- ↳ Common Problems
- Oxygen JSON Editor
- ↳ Feature Request
- ↳ Common Problems
- Oxygen PDF Chemistry
- ↳ Feature Request
- ↳ Common Problems
- Oxygen Feedback
- ↳ Feature Request
- ↳ Common Problems
- Oxygen XML WebHelp
- ↳ Feature Request
- ↳ Common Problems
- XML
- ↳ General XML Questions
- ↳ XSLT and FOP
- ↳ XML Schemas
- ↳ XQuery
- NVDL
- ↳ General NVDL Issues
- ↳ oNVDL Related Issues
- XML Services Market
- ↳ Offer a Service