[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]
Subject: Re: [docbook] Generating JSPs from Docbook/XSLT
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Do not use Saxon 7 for Docbook, please. Saxon 7 implements (the working draft of) XSLT/XPATH 2.0. If you want to use docbook, use Saxon 6.5.3 Carlos - ----- Original Message ----- From: "S. Alan Ezust" <sae@mcs.suffolk.edu> To: <docbook@lists.oasis-open.org> Cc: "Bob Stayton" <bobs@sagehill.net>; "David Cramer (Tech Pubs)" <dcramer@motive.com> Sent: Wednesday, April 21, 2004 22:48 Subject: Re: [docbook] Generating JSPs from Docbook/XSLT Egad, this has been in the errata list of the w3c since 1999 but nobody reported the bug until now? Sheesh. Well, thanks for helping me track that down! On April 20, 2004 06:47 pm, David Cramer (Tech Pubs) wrote: > Oops, that trick works with Saxon, but apparently not with > xsltproc, which I gather you're using. Yes, I was using xsltproc. But what's really strange is that it behaves differently depending on whether I am including the XSL stylesheets. > I can't say which is behaving correctly, but I > should mention that using disable-output-escaping is considered > ugly and fragile. I don't know if there's a non-ugly way to do what > you need :) I'm sure there is a non-ugly way to do it that involves the namespace declaration of of the XSL stylesheet. Or pehrpas it's an xsltproc argument? I thought I'd try using saxon7 with docbook-xsl - I first tried 1.64.1 and I got a bunch of errors. Then I tried updating to 1.65.1 and got the same errors. Is saxon7 the version you use with docbook? - ----------- errors follow ----------------- [java] Warning: at xsl:param on line 220 of file:/usr/share/docbook-xsl/lib/lib.xsl: [java] Warning in {processing-instruction('')}: [java] No processing instruction will ever be named ''. Invalid QName {} [java] Error at xsl:call-template on line 87 of file:/usr/share/docbook-xsl/common/targets.xsl: [java] Parameter obj is not declared in the called template [java] Error at xsl:call-template on line 104 of file:/usr/share/docbook-xsl/common/targets.xsl: [java] Parameter object is not declared in the called template [java] Warning: at xsl:when on line 209 of file:/usr/share/docbook-xsl/common/table.xsl: [java] Less-than and greater-than comparisons between strings have changed since XPath 1.0 [java] Error at xsl:call-template on line 216 of file:/usr/share/docbook-xsl/html/block.xsl: [java] Parameter title is not declared in the called template [java] Error at xsl:call-template on line 130 of file:/usr/share/docbook-xsl/html/titlepage.xsl: [java] Parameter title is not declared in the called template [java] Error at xsl:call-template on line 361 of file:/usr/share/docbook-xsl/html/docbook.xsl: [java] Parameter node is not declared in the called template [java] Error at xsl:call-template on line 365 of file:/usr/share/docbook-xsl/html/docbook.xsl: [java] Parameter node is not declared in the called template [java] Transformation failed: Failed to compile stylesheet. 6 errors detected. On April 21, 2004 06:52 pm, Bob Stayton wrote: > This gets even more interesting. According to Daniel Velliard, the > original XSLT Recommendation was not clear on this matter. The > later Errata document[1] (item E2) makes it explicit that the copy > of the node should also have those characters escaped, so this will > likely be fixed in some future version of xsltproc. > > [1] http://www.w3.org/1999/11/REC-xslt-19991116-errata/ > > Bob Stayton > Sagehill Enterprises > DocBook Consulting > bobs@sagehill.net > > > ----- Original Message ----- > From: "Bob Stayton" <bobs@sagehill.net> > To: "S. Alan Ezust" <sae@mcs.suffolk.edu>; "David Cramer (Tech > Pubs)" <dcramer@motive.com> > Cc: <docbook@lists.oasis-open.org> > Sent: Wednesday, April 21, 2004 11:03 AM > Subject: Re: [docbook] Generating JSPs from Docbook/XSLT > > > I think this is a bug in xsltproc. Your customization works with > > the > > stock > > > html/docbook.xsl, but not with chunk.xsl. I think the difference > > is that > > in > > > chunking, the write.chunk template assembles the content into a > > variable > > and > > > then uses xsl:copy-of to copy that content to the output > > document. > > > > According to Michael Kay's XSLT Programmer's Reference under > > xsl:copy-of, > > it > > > says "If the tree being copied includes text that was written > > with the disable-output-escaping="yes" directive, then this > > directive is copied to the new tree along with the text it > > applies to, and will take effect if > > and > > > when that tree is finally serialized." > > > > I just did a short test outside of DocBook to confirm it. I'll > > file a bug report against xsltproc. > > > > Bob Stayton > > Sagehill Enterprises > > DocBook Consulting > > bobs@sagehill.net > > > > > > ----- Original Message ----- > > From: "S. Alan Ezust" <sae@mcs.suffolk.edu> > > To: "David Cramer (Tech Pubs)" <dcramer@motive.com> > > Cc: <docbook@lists.oasis-open.org> > > Sent: Tuesday, April 20, 2004 2:33 PM > > Subject: Re: [docbook] Generating JSPs from Docbook/XSLT > > > > > I tried that with a very simple XSL file and it works like a > > > charm! > > > > > > However, I put the same template rule in the Docbook XSL > > > customization layer as user.header.content, > > > and it seems to ignore the disable-output-spacing attribute > > > of XSL:text, because the files generated by the > > > XSL chunker have those characters escaped!! Any idea why that > > > would be? > > > > > > On April 20, 2004 03:21 pm, David Cramer (Tech Pubs) wrote: > > > > Try: > > > > > > > > <xsl:template name="user.header.content"> > > > > <xsl:text disable-output-escaping="yes"><%@ include > > > > file="/header.html" > > > > > > %></xsl:text> </xsl:template> > > http://www.zvon.org/xxl/XSLTreference/W3C/xslt.html#disable-output-e > scaping > > > > > David > > > > > > > > > -----Original Message----- > > > > > From: S. Alan Ezust [mailto:sae@mcs.suffolk.edu] > > > > > Sent: Tuesday, April 20, 2004 11:54 AM > > > > > To: docbook@lists.oasis-open.org > > > > > Subject: [docbook] Generating JSPs from Docbook/XSLT > > > > > > > > > > > > > > > So I went into the XSLT customization layer, > > > > > and added a template that looks like this: > > > > > > > > > > <xsl:template name="user.header.content"> > > > > > <%@ include file="/header.html" %> > > > > > </xsl:template> > > > > > > > > > > that didn't work... Wrong syntax. > > > > > Tried putting it in between > > > > > <xsl:text> > > > > > > > > > > tags but then it prints out the <> as literals. > > > > > > -- > > > S. Alan Ezust > > > Ottawa, Ontario, Canada > > > http://cartan.cas.suffolk.edu/~sae > > > > > > To unsubscribe from this list, send a post to > > > > docbook-unsubscribe@lists.oasis-open.org, or visit > > http://www.oasis-open.org/mlmanage/. > > To unsubscribe from this list, send a post to > docbook-unsubscribe@lists.oasis-open.org, or visit > http://www.oasis-open.org/mlmanage/. - -- S. Alan Ezust Ottawa, Ontario, Canada http://cartan.cas.suffolk.edu/~sae To unsubscribe from this list, send a post to docbook-unsubscribe@lists.oasis-open.org, or visit http://www.oasis-open.org/mlmanage/. -----BEGIN PGP SIGNATURE----- Version: PGPfreeware 7.0.3 for non-commercial use <http://www.pgp.com> iQA/AwUBQIfGS11sel0NpjckEQJ/LACeNf7pfR8My5T5amULkhy/Wbwh3+8AoLzD Rt8/fsIT/HGkilkAOqrn3qQQ =HTtm -----END PGP SIGNATURE-----
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]