RE: [xsl] Get Document File name

Subject: RE: [xsl] Get Document File name
From: "Philip Vallone" <philip.vallone@xxxxxxxxxxx>
Date: Mon, 23 Oct 2006 18:57:12 -0400
Thanks everyone for the help. 

<xsl:value-of select="tokenize(document-uri(/), '/')[last()]"/>

returns the full path.

As a fix, I added a required attribute to a top element for Filename. 

I am not sure if this is the best way about it.


Phil V

-----Original Message-----
From: Michael Kay [mailto:mike@xxxxxxxxxxxx] 
Sent: Monday, October 23, 2006 3:58 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: [xsl] Get Document File name

> i'm using
>    tokenize(document-uri(/), '/')[last()]
> or '\' if working with backslashes.

The document-uri() function returns a URI, not a filename, and URIs always
use forwards slashes as separators.

Michael Kay

Current Thread