Hi,
I think what is happening here is that you have DocBook 5 document
written in the DocBook namespace but are using the non-namespaced
version of the stylesheet that is better matched to DocBook 4. When
that happens, the stylesheet detects the namespace, and then converts
the document to DocBook 4 before applying formatting templates. Part of
that conversion is to change each instance of xml:id in the document to
id, so that your new template does not match.
The solution is to either switch to the namespaced version of the
stylesheets (recommended for Docbook 5), or change the customized
template to match="@id".
Bob Stayton
Sagehill Enterprises
bobs@sagehill.netOn 2/17/2016 10:22 AM, Tim Arnold wrote:
> Hi Bob, Thomas,
> I'm bewildered. In case I've got something wrong in my source or
> stylesheet, here is what I'm doing:
> The command: *xsltproc test.xsl test.xml*
> The result has **
>
> test.xml:
> *<chapter xnlns="http://docbook.org/ns/docbook" version="5.0"
> xml:id="test">*
> *<info></info>*
> * <para>*
> *
*
> * *
> * *
> *
*
> * </para>*
> *</chapter>*
>
> test.xsl:
> **
> *<xsl:stylesheet*
> * xmlns:xsl="http://www.w3.org/1999/XSL/Transform"*
> * version="1.0">*
> *
> *
> * <xsl:import href="/path/to/xsl-1.79.1/html/docbook.xsl"/>*
> * <xsl:template mode="htmlTableAtt" select="@xml:id"/>*
> *
> *
> *</xsl:stylesheet>*
> *
> *
> If that works for you then I'm not sure what to do. Maybe try a
> different xsl processor?
> thanks,
> --Tim
>
>
> On Wed, Feb 17, 2016 at 12:54 PM, Bob Stayton <
bobs@sagehill.net> <mailto:
bobs@sagehill.net>> wrote:
>
> With that correction, it works for me. Not sure why it isn't for you.
>
> Bob Stayton
> Sagehill Enterprises
>
bobs@sagehill.net <mailto:
bobs@sagehill.net>
>
> On 2/16/2016 4:36 PM, Tim Arnold wrote:
>
> Thanks Thomas,
> That make sense--I wondered about that too, but even with that
> change, I
> still get the xml:id attribute.
>
> --Tim
>
> On Tue, Feb 16, 2016 at 3:11 PM, Thomas Schraitle
> <
tom_schr@web.de <mailto:
tom_schr@web.de>
> <mailto:
tom_schr@web.de <mailto:
tom_schr@web.de>>> wrote:
>
> Hi Tim,
>
> Am Dienstag, 16. Februar 2016, 13:02:21 schrieb Tim Arnold:
> > I must still be doing something wrong since I keep
> getting that attribute.
> > Here is my test.xsl customization layer:
> >
> >
> > <xsl:stylesheet
> > xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> > version="1.0">
> >
> > <xsl:import href="/path/to/xsl-1.79.1/html/docbook.xsl"/>
> > <xsl:template mode="htmlTableAtt" select="xml:id" />
>
> Haven't tested it, but I guess, in the select attribute you are
> missing the
> "@" symbol:
>
> <xsl:template mode="htmlTableAtt" select="@xml:id" />
>
> Otherwise you would select the _element_ id in the XML
> namespace
> (which is
> very likely it doesn't exist).
>
> Good luck!
>
> --
> Gruß/Regards
> Thomas Schraitle
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
>
docbook-apps-unsubscribe@lists.oasis-open.org> <mailto:
docbook-apps-unsubscribe@lists.oasis-open.org>
> <mailto:
docbook-apps-unsubscribe@lists.oasis-open.org> <mailto:
docbook-apps-unsubscribe@lists.oasis-open.org>>
> For additional commands, e-mail:
>
docbook-apps-help@lists.oasis-open.org> <mailto:
docbook-apps-help@lists.oasis-open.org>
> <mailto:
docbook-apps-help@lists.oasis-open.org> <mailto:
docbook-apps-help@lists.oasis-open.org>>
>
>
>