This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

document() function...


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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]