This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: Directory Structure


I'm not sure what context you're thinking of here, but if you're using the
common practice of an XML config file which contains URIs, you could simply
store the URI in a variable or parameter before drilling down into the
document with that URI.

For example,

<files>
  <file href="foo.xml"/>
  <file href="bar/foo.xml"/>
</files>

<xsl:stylesheet version="1.0"
  xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>

  <xsl:template match="/">
    <xsl:for-each select="/files/file/@href">
      <xsl:apply-templates select="document(.)/*">
        <xsl:with-param name="$uri" select="string(.)"/>
      </xsl:apply-templates>
    </xsl:for-each>
  </xsl:template>

</xsl:stylesheet>

The bottom line is that, unless you have access to the URIs in XML, there's
no (standard) way of getting them.

Hope this helps,

Evan Lenz
XYZFind Corp.

> -----Original Message-----
> From: owner-xsl-list@lists.mulberrytech.com
> [mailto:owner-xsl-list@lists.mulberrytech.com]On Behalf Of Eric
> Schenfeld
> Sent: Wednesday, August 15, 2001 10:31 AM
> To: XSL-List@lists.mulberrytech.com
> Subject: [xsl] Directory Structure
>
>
> Is there a command (or another way that anyone knows of) to find
> out the current working directory for a document?  So that after
> a call, it might return the value:
> "/About/LA/Downtown/Restaurants/"?  This could be used in a
> navigation kind of way as on Yahoo!.
>
> Thanks for the help.
>
> eric
>
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>
>


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]