[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

document() function...

Subject: document() function...
From: Martin_Genhart@xxxxxxxxxxxxxx
Date: Fri, 21 Jul 2000 11:35:27 -0400
document function xslt
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.