I just noticed that I had a typo in the source xml (misspelled xmlns).

I fixed that typo, downloaded docbook-xsl-ns-1.79.1 from sourceforge, and
changed the xsl to point to the newly unzipped stylesheets. Confident that
the typo was the issue, I converted again:

  <xsl:import
href="/u/tiarno/downloads/docbook-xsl-ns-1.79.1/html/docbook.xsl"/>
  <xsl:template mode="htmlTableAtt" select="@xml:id"/>

I still get <table xml:id="one.two.three">
I also tried the non namespaced stylesheet and I get
Note: namesp. cut : stripped namespace before processing           My
Chapter

The table still contains the id, but without the xml namespace (which I
think is what would be expected).

So, I'm sorry to be a pest, but I don't see how this is happening.
Do you have a test case I can run?

On Wed, Feb 17, 2016 at 1:34 PM, Bob Stayton <[email protected]> wrote:

> 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
> [email protected]
>
>

Reply via email to