Re: [xslt] xsltproc and multiple file output.



----- Original Message -----
From: "Daniel Veillard" <veillard@redhat.com>


> On Sun, May 27, 2001 at 12:08:02AM +1000, Robert Collins wrote:
> > Hi!
> >     I'm trying to process docbook xsl-stylesheet's with xsltproc. I
see
> > from http://xmlsoft.org/XSLT/#News that as of 0.4.0 multiple file
output
> > should be present... I cannot seem to find any doco on the xsl
elements
> > needed to use this..
>
>   Hi, first make sure you have a recent version like 0.10.0 and also
> a recent version of libxml2 (2.3.9).
>
Yes. I have both of those. I grabbed the tarballs last night.

>
>   Multiple file output are extensions to the standard XSLT-1.0 .
libxslt
> implements 4 syntaxes, the Xalan, XT, and Saxon's processors ones. But
> the one I recommend, is  the 4th one, from the XSLT-1.1 working draft.
>    http://www.w3.org/TR/xslt11/#multiple-output

Thank you for the reference. docbook xsl comes with an XT chunker
already, so I figured I'd use that for now. (Not meaning to ignore your
advice ...).

I have 2 questions however:
1)xsltproc is spitting
"invalid value for method: {$method}"
during processing.

The xsl file in question has
<xsl:template name="write.chunk">
  <xsl:param name="filename" select="''"/>
  <xsl:param name="method" select="'html'"/>
  <xsl:param name="encoding" select="'ISO-8859-1'"/>
  <xsl:param name="content" select="''"/>

  <xt:document href="{$filename}"
               method="{$method}"
               encoding="{$encoding}">
    <xsl:copy-of select="$content"/>
  </xt:document>
</xsl:template>

which IIRC my xsl correctly should mean that the xt:document method
attribute is set to 'html', not to the literal {$method}. Is this a bug
in the xsl, or in xsltproc ?  (I believe the error is generated in
xslt.c line 402, but I don't know whether the xml functions are meant to
have already evaluated the attribute by the time the if is tested). (I'm
using docbookXML 4.1.2, and the XSL stylesheetversion 1.2.9).

Question 2)
xsltproc seems to change the current dir to the directory of the xsl
file before processing. That means that the output html files are
written in amongst the xsl files, rather than in the build directory. Is
this a problem with my use of the xt:document href attribute, or is
there some way to override that behaviour ?

Rob





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