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

Re: Saxon9, XMLSpy2009, and result-document href=

Subject: Re: Saxon9, XMLSpy2009, and result-document href=
From: Jesper Tverskov <jesper.tverskov@xxxxxxxxx>
Date: Wed, 28 Oct 2009 14:29:46 +0100
Re:  Saxon9
I often make solutions that work in both AltovaXML and Saxon.

In the following example I load a file as unpassed text, and need to
get hold of the filename. To make a solution that works both in Saxon
and AltovaXML, I do this:

<xsl:variable name="unparsed" select="unparsed-text(document-uri(.))"/>
<!-- The next four varaibles are preparations to make it easier to
modify the name of the output file -->
<xsl:variable name="input-file" select="tokenize(document-uri(.),
'(\\|/)')[last()]">
<xsl:variable name="input-filename"
select="substring-before($input-file, '.')"/>
<xsl:variable name="input-path"
select="substring-before(document-uri(.), $input-filename)"/>
<xsl:variable name="input-extension"
select="substring-after($input-file, '.')"/>

It is line three that is important. I do this:
(\\|/)')[last()
to make it work both in Saxon and AltovaXML.

Hope it can be of some help.

Cheers,

Jesper Tverskov
http://www.xmlplease.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.