Re: [xslt] xsltproc docbook and user.header.navigation handling

On Sun, 2003-10-05 at 18:23, Jim Crafton wrote:
> Shaun,
> Thanks for the quick reply!
> >I don't know why this ever worked, but it's wrong.  
> >
> I tried changing to an earlier version of libxml/libxslt ("Using libxml 
> 20410, libxslt 10009 and libexslt 702")
> and it worked .

OK.  That was a bug then.

> >What you want is to disable output escaping on a text node.  You can use
> >the disable-output-escaping attributes on xsl:text for this.  So:
> >
> ><xsl:text disable-output-escaping="yes">
> ><![CDATA[<table>]>
> ></xsl:text>
> >
> >  
> >
> Actually I tried this. And *still* got the "wrong" output. What I got was
> &lt;table&gt;

Right.  This is just horribly fragile.  There are all sorts of things
that could go on in the stylesheets that could cause this not to work. 
Generally speaking, disable-output-escaping is best avoided.  Also note
that an XSLT processor is not required to support it, so even if it did
work, there's no guarantee your XSLT will work elsewhere.

> >And now I have to tell you never to use disable-output-escaping.  It's a
> >horrible hack, and it's very fragile.  I presume that you're intending
> >to have some unbalanced tags in user.header.navigation, and that you're
> >balancing them out in user.footer.navigation. 
> >
> Yes, exactly
> > The clean and correct way
> >of handling this is to override chunk-element-content (assuming this is
> >Norm's XSLT).
> >  
> >
> I am using norms xsl sheets ( docbook-xsl-1.60.1 ). Do you have a brief 
> example of how I would accomplish this using the technique you 
> described? Thanks a bunch!

Create a stylesheet that imports Norm's stylesheets with


Then look at chunk-common.xsl in Norm's stylesheets and copy the
template chunk-element-content.  Change it to your liking.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]