Re: [xslt] <exsl:document> problems



That fixed it - thanks! I hadn't seen that attribute in any of the online examples I found.

-j

Steve Cheng wrote:
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
{http://exslt.org/common}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="http://www.w3.org/1999/XSL/Transform";
    xmlns:exsl="http://exslt.org/common";


You need the attribute
extension-element-prefixes="exsl".

(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.


-- Jeremy Jongsma Lead Architect FutureSource, LLC jjongsma futuresource com http://www.futuresource.com


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