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

URI Resolver and recoursian

Subject: URI Resolver and recoursian
From: Brian Newman <brian.newman@xxxxxxxxxxx>
Date: Tue, 29 Dec 2009 09:31:53 -0500
 URI Resolver and recoursian
I'm beating my head against this problem and need some more
help, please.

My stylesheet looks like

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:sched="schedule"
	<!--<xsl:include href="Retina_Policy.xsl"/>
	<xsl:include href="PGD_Policy.xsl"/>
	<xsl:include href="Oracle SRR Policy.xsl"/>-->
	<xsl:template match="/">
		<xsl:result-document method="xml" href="error_brian.xml">
	<xsl:template match="files">
		<xsl:apply-templates select="file"/>
	<xsl:template match="file">
			<xsl:attribute name="filepath"><xsl:value-of
				<xsl:when test="unparsed-text-available(@loc)">
					<type>Unparsed Text</type>
					<!--<xsl:call-template name="UnparsedText"><xsl:with-param
name="datapath" select="@loc"/></xsl:call-template>-->
				<xsl:when test="doc-available(@loc)">
						<xsl:attribute name="type">Parsed Text</xsl:attribute>
							<xsl:apply-templates select="document(@loc)/node()"/>
					<xsl:attribute name="error">File does not exist<xsl:value-of
	<xsl:template match="node()"/>

Now, as you can see, I'm making a call to a SQL server and it returns XML
which has a set of <file> elements which have a @loc which, as you can guess
is the path to a file.
I run a doc-available() on that @loc and, if it is a zip file, I resolve it to
XML containing the files within that zip as well as their sizes.  The XML
returned by the zip resolver looks something like

<?xml version="1.0" encoding="utf-8"?>
<file size="109645824" loc="jar
file://C:/path/to/data.zip!mydata_AugustCD09.mdb" />
<file size="83890176" loc="jar
file://C:/path/to/data.zip!mydata_September09CD.mdb" />

Up to here, everything works fine


Once I get the XML returned from the zip resolver, I recourse back to calling
doc-available and document() on the @loc values of this XML and pass that
value back to my URI Resolver.
When I pass that last step to my URI Resolver, the value I'm getting sent to
the URI Resolver is

{file://{path to stylesheet}/jar

What I'm expecting to get is

{jar file://C:/path/to/data.zip!mydata_AugustCD09.mdb}

Can someone please help me understand why?

Can someone please help me understand why?

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.