That customization should work, and does work outside of the docbkx-maven-plugin. I
don't know how the plugin works, so I cannot say why it does not work for you. But if
the plugin uses the namespaced version of the DocBook XSL stylesheets, then any
xsl:template match attributes in a customization must specify the DocBook namespace
and prefix. See this reference for more information.
http://www.sagehill.net/docbookxsl/ProcesingDb5.html#Db5XsltBob Stayton
Sagehill Enterprises
bobs@sagehill.net----- Original Message -----
From: "Martin Desruisseaux" <
martin.desruisseaux@geomatys.fr>
To: <
docbook-apps@lists.oasis-open.org>
Sent: Thursday, April 26, 2012 1:41 PM
Subject: [docbook-apps] Assigning value of "role" attribute to value of "class"
attribute in XHTML output?
> Hello all
>
> I'm using docbook for generating XHTML pages with "docbkx-maven-plugin". My source
> files use the <classname> inline element with various values for the "role"
> attribute. Those values appear to be ignored, since <classname> elements are
> systematically translated to
in XHTML.
>
> I have read the " Generate custom class values" instructions [1]. Following the
> example given there, I tried the following XSL template (I must said that I never
> used XSL before):
>
> <xsl:template match="classname[@role = 'OGC']" mode="class.value">
> <xsl:value-of select="'OGC'"/>
> </xsl:template>
>
> However my <classname role="OGC"> elements are still translated to > class="classname">, while I'm trying to get . I verified that the
> XSL is really used since it works as expected for an other task (file can be view at
> [2]). I suspect that my lack of XSL knowledge is at cause. Does anyone can see some
> error I'm doing?
>
> Thanks and best regards,
>
> Martin Desruisseaux
>
> [1] http://www.sagehill.net/docbookxsl/HtmlCustomEx.html#CustomClassValues
> [2] http://hg.geotoolkit.org/geotoolkit/file/42a008ee622a/src/main/docbook/book.xsl
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: docbook-apps-unsubscribe@lists.oasis-open.org
> For additional commands, e-mail: docbook-apps-help@lists.oasis-open.org
>
>
>