Re: [docbook-apps] Re: XSL customization

From
Daniel Veillard <>
Date
2003-04-28T09:03:29+00:00
ID
Thread
Re: [docbook-apps] Re: XSL customization
On Sun, Apr 27, 2003 at 04:01:37PM -0700, Bob Stayton wrote:
> On Sun, Apr 27, 2003 at 03:42:14PM -0400, Sam Steingold wrote:
> > Thanks Bob, you are most helpful!
> > 
> > > * In message <>
> > > * On the subject of "Re: Re: XSL customization"
> > > * Sent on Sun, 27 Apr 2003 11:10:42 -0700
> > > * Honorable Bob Stayton <> writes:
> > >
> > > > 2. I want <literal role="foo">...</literal> to transform to
> > > >    <tt role="foo">...</tt>.
> > >  
> > > <tt role="{@role}"><xsl:apply-templates/></tt>
> > 
> > great.  why my html output now has
> >         <tt xmlns="" role="type">
> > and
> >         <i xmlns="http://www.w3.org/1999/xhtml">

   Because your extension asked to ouptut the tt element in *no* namespace
and you have xmlns="http://www.w3.org/1999/xhtml" in scope ! As a result
to generate what you asked for libxslt *must* unbind the default namespace
generate your <tt> in no namespace, and reactivate the default namespace in
the subtree.
   In a nutshell xsltproc does what you ask for, it's a bug in your stylesheet
apparently, make sure that in your stylesheet extension, the tt element
pertains to the XHTML namespace.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/