Format the audience attribute
Having trouble installing Oxygen? Got a bug to report? Post it all here.
-
- Posts: 86
- Joined: Wed Feb 09, 2011 10:43 pm
Format the audience attribute
We have a document that includes a whole bunch of parameters, some of which are for internal use only.
We use the audience attribute to filter out some information that we do not want to disclose to users. It works fine, but I was asked to format the audience attribute so that in the internal document, the information stands out.
in the commons.xsl file, I added this:
And in the commons-attr.xsl I added this:
but when I generate the pdf, the information in the audience attribute, is not formatted in pink. (yes it is just for testing, won't actually use pink)
here is how we use the attribute
So I can't figure out why it is not working.....does anyone have an idea?
kind regards
We use the audience attribute to filter out some information that we do not want to disclose to users. It works fine, but I was asked to format the audience attribute so that in the internal document, the information stands out.
in the commons.xsl file, I added this:
Code: Select all
<xsl:template match="*[contains(@class, ' topic/audience ')]">
<fo:bloc xsl:use-attribute-sets="audience">
<xsl:call-template name="commonattributes"/>
<xsl:apply-templates/>
</fo:bloc>
</xsl:template>
Code: Select all
<xsl:attribute-set name="audience">
<xsl:attribute name="color">#FFC0CB</xsl:attribute>
</xsl:attribute-set>
here is how we use the attribute
Code: Select all
<section audience="internal">Access rights are customised with the following parameters:
<ul>
<li>
<parmname >HiddenUserReadAccessCriteria</parmname>
</li>
<li>
<parmname>HiddenUserWriteAccessCriteria</parmname>
</li>
<li>
<parmname>HiddenObserverReadAccessCriteria</parmname>
</li>
<li>
<parmname>HiddenObserverWriteAccessCriteria</parmname>
</li>
</ul>
</section>
kind regards
-
- Posts: 9451
- Joined: Fri Jul 09, 2004 5:18 pm
Re: Format the audience attribute
Hi,
Usually profiling attributes set on DITA content are not passed through to the resulting post processed DITA content.
To pass these profiling attributes further on you need to define them in the DITAVAL filter file as "pass-through":
topic10569.html#p32967
About what you are doing:
I will assume by "bloc" you wanted to write "block".
There are still problems, you are removing in a way the default processing which takes place on the element which contains the @audience attribute. Instead of "<xsl:apply-templates/>" you could try to use "<xsl:next-match/>" to match the base XSLT template which takes care of the element. Also you seem to assume that the matched element is a block-like element but maybe people can set the @audience attribute also on inline elements.
Regards,
Radu
Usually profiling attributes set on DITA content are not passed through to the resulting post processed DITA content.
To pass these profiling attributes further on you need to define them in the DITAVAL filter file as "pass-through":
topic10569.html#p32967
About what you are doing:
Code: Select all
<xsl:template match="*[contains(@class, ' topic/audience ')]">
<fo:bloc xsl:use-attribute-sets="audience">
<xsl:call-template name="commonattributes"/>
<xsl:apply-templates/>
</fo:bloc>
</xsl:template>
There are still problems, you are removing in a way the default processing which takes place on the element which contains the @audience attribute. Instead of "<xsl:apply-templates/>" you could try to use "<xsl:next-match/>" to match the base XSLT template which takes care of the element. Also you seem to assume that the matched element is a block-like element but maybe people can set the @audience attribute also on inline elements.
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
<oXygen/> XML Editor
http://www.oxygenxml.com
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