Re: [xslt] <exsl:document> problems

On August 18, 2004 06:27 pm, Jeremy Jongsma wrote:
> When I use <exsl:document> in my stylesheet, it is simply output by
> libxslt as regular markup (it shows up as text in the result document).
> I'm using libxslt-1.0.33.  xsltproc --dumpextensions shows
> {}document registered as an element.  But it
> seems to be treating it as just another regular element.

Notwithstanding the upgrade comment by Daniel, here is your problem, should 
save you time to find it out:

> <?xml version='1.0'?>
> <xsl:stylesheet
>      xmlns:xsl="";
>      xmlns:exsl="";

You need the attribute

(As far as the XSLT processor is concerned, it doesn't know
if you really had wanted to output an actual <exsl:document> element.)

>      version="1.0">
>      <xsl:output method="html" omit-xml-declaration="yes"/>
>      <xsl:template match="/">
>          <exsl:document href="test.html">
>              <xsl:apply-templates/>
>          </exsl:document>
>      </xsl:template>
> </xsl:stylesheet>

Although, it is funny, I checked one of my own stylesheets, it didn't have 
that attribute either, and exslt:document still worked, which is wrong --- I 
am investigating.

Steve Cheng 

docbook2X: <URL:>

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