Re: One XSL combining to different XMLs
Walid, >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 OK? 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, Jeni Dr Jeni Tennison Epistemics Ltd, Strelley Hall, Nottingham, NG8 6PE Telephone 0115 9061301 ? Fax 0115 9061304 ? Email jeni.tennison@xxxxxxxxxxxxxxxx XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format