[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Saxon9, XMLSpy2009, and result-document href=
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|