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

document URI resolution.

Subject: document URI resolution.
From: "Morgan, Corey" <CMorgan@xxxxxxxxx>
Date: Thu, 10 Feb 2005 16:54:56 -0700
document uri
Hello,

There is a document on our system that is defined by the URI:
http://www.ourcompany.com/clients.xml .  This URI doesn't physically exist,
but rather is resolved in various ways (in Java) to a physical Source via a
URIResolver, an EntityResolver, or an XML-Catalog.

I would like to process this document via the document() function, as in:

  <?xml version="1.0" encoding="UTF-8"?>
  <xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" ... >

    ...
    <xsl:template match="d:cli">
      <xsl:param
name="doc-name">http://www.ourcompany.com/clients.xml</xsl:param>
      <xsl:apply-templates
select="document($doc-name)/c:clients/c:client[...]" />
    </xsl:template>


    ...
  </xsl:stylesheet>


With the hopes that the transformer can resolve it as well.  When using
Xalan-2.6.2, setting the URIResolver on a TransformerFactory instance works
well to resolve the <xsl:import> hrefs, but won't resolve document()
sources.  It will complain with:

     Can not load requested doc: http://www.ourcompany.com/clients.xml

I can't just define the physical location of the document in a global
<xsl:param>, because I can't know what the $doc-name URI will always be.

Is there a way to configure the TransformerFactory to also resolve
document() URI's ?

Thanks,
Corey Morgan

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.