xsl-list
[Top] [All Lists]

RE: [xsl] Get Document File name

2006-10-23 15:58:09
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.

Regards,

Phil V


-----Original Message-----
From: Michael Kay [mailto:mike(_at_)saxonica(_dot_)com] 
Sent: Monday, October 23, 2006 3:58 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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
http://www.saxonica.com/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--




--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>