OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: docbook-xsl: Title page customization: "no namespace bound to prefix xhtml"


On Mon, Jul 25, 2005 at 02:14:59PM -0700, John L. Clark wrote:
> P.S. If this is a QNames-in-attribute-values problem, I do believe I
> might break something.  Oh, wait, something's already broken.

And it is (and then some)!  Check this out:

titlepage_templates.xsl
---
<t:templates xmlns:t="http://nwalsh.com/docbook/xsl/template/1.0";
             xmlns:fo="http://www.w3.org/1999/xhtml";
             xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

  <t:titlepage t:element="article" t:wrapper="fo:div" class="titlepage">
    <t:titlepage-content t:side="recto">
      <title/> <subtitle/>
    </t:titlepage-content>

    <t:titlepage-separator>
      <fo:hr/>
    </t:titlepage-separator>
  </t:titlepage>
</t:templates>
---

Of course, this is a very minimalist template, but it illustrates the
point.  Now, we process this template to get XSLT:

$ xsltproc http://docbook.sourceforge.net/release/xsl/1.68.1/template/titlepage.xsl titlepage_template.xsl

And we get fun things in the output like:

---
<xsl:template name="article.titlepage">
  <fo:div xmlns:fo="http://www.w3.org/1999/XSL/Format"; class="titlepage">
  ... snipped ...
  </fo:div>
</xsl:template>
---

And:

---
<xsl:template name="article.titlepage.separator"><fo:hr
xmlns:fo="http://www.w3.org/1999/XSL/Format"/>
</xsl:template>
---

Hmmm, are we noticing any problems, here?

I have an intrusive patch to fix this, if anyone is interested.  Of
course, it would be so much easier if there was an XSLT function to ask
the source XML document what namespace URI was associated with a given
prefix token in a given scope, but as far as I know no such thing exists
(in XSLT 1).  Why doesn't EXSLT have something like this?

Peace,

    John L. Clark

PGP signature



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]