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

RE: Get Document File name

Subject: RE: Get Document File name
From: "Philip Vallone" <philip.vallone@xxxxxxxxxxx>
Date: Mon, 23 Oct 2006 18:57:12 -0400
RE:  Get Document File name
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@xxxxxxxxxxxx] 
Sent: Monday, October 23, 2006 3:58 AM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE:  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/

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.