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

Re: One XSL combining to different XMLs

Subject: Re: One XSL combining to different XMLs
From: Jeni Tennison <Jeni.Tennison@xxxxxxxxxxxxxxxx>
Date: Fri, 14 Jul 2000 16:24:03 +0100
combining jsp and xml

>I've been trying to use the document() function where I put:
>    <xsl:variable name="tot"
>select="document('../AccountPG/LstXMLAccountPG.jsp')" />
>Then did:
>    <xsl:apply-templates select="$tot/RangeList/Range1"/>
>and tried to debug using
>    <xsl:template match="Range1">
>    <H1> HELLO WORLD </H1>
>    </xsl:template>
>But didn't get any output knowing that I m sure that the xml data is
>being constructed and no errors are showing.

Presumably you've tried running the relevant parts of the stylesheet on
'LstXMLAccountPG.jsp' as the input, and know that the templates are working

I might be off here, but there could be a problem with resolving the
(relative) path within the document() function.  If you only use one
argument, the document() function resolves relative paths according to the
Base URI of the stylesheet itself.  It may be that you want to resolve the
relative path according to the Base URI of the input XML that you have.  In
that case, then you should try:

  <xsl:variable name="tot"
    select="document('../AccountPG/LstXMLAccountPG.jsp', /)" />

Or, of course, change the relative path to be relative to the location of
the stylesheet.

It's (perhaps unfortunately) perfectly legal for a XSLT processor not to
complain if it can't find the file when the document() function is used, in
which case it gets an empty node list, which would give the result that
you're experiencing.

I hope that helps,


Dr Jeni Tennison
Epistemics Ltd, Strelley Hall, Nottingham, NG8 6PE
Telephone 0115 9061301 ? Fax 0115 9061304 ? Email

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

Current Thread


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.
First Name
Last Name
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.