document() function...

Subject: document() function...
From: Martin_Genhart@xxxxxxxxxxxxxx
Date: Fri, 21 Jul 2000 11:35:27 -0400
I tried to use the document function. I started with an example from the book
"XSLT Reference" by Michael Kay.
Here the stylesheet:

<xsl:transform
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
 version="1.0"
>

<xsl:template match="/">
  <html><body>
    <h1>Stylesheet Module Structure</h1>
    <ul>
    <xsl:apply-templates select="*/xsl:include | */xsl:import"/>
    </ul>
  </body></html>
</xsl:template>

<xsl:template match="xsl:include | xsl:import">
    <li><xsl:value-of select="concat(local-name(),'s ',@href)"/>
    <xsl:variable name="module" select="document(@href)"/>
    <ul>
    <xsl:apply-templates select="$module/*/xsl:include | $module/*/xsl:import"/>
    </ul>
    </li>
</xsl:template>

</xsl:transform>

And here the contents:

<xsl:transform
 xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
 version="1.0"
>

<xsl:include href="dummya.xsl"/>
</xsl:transform>

When I try to merge this two files into an HTML file using James Clarks XT, I
get a MalFormedURLException telling that I have not defined a protocol.
According to the spec it should be valid to provide a relative URI (hr
ef="dummya.xsl").
I could only make this work using an absolute URI and using the http protocol
(href="http://winkelried:9992/Data/E2/htmlconverter/3129/ch07/dummya.xsl";).

Does anyone no if this is a bug in James Clarkes XT. Do I miss something here?

Thanks
Martin



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread