[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Exsl functions in xslt 2
Hi all, Recently DC came up with a very neat solution to get around using function-available all over the place in a stylesheet that needed to be portable between Saxon and MSXML For those that missed it, it was this: <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:exslt="http://exslt.org/common" xmlns:exsltf="http://exslt.org/functions" xmlns:msxsl="urn:schemas-microsoft-com:xslt" extension-element-prefixes="exslt exsltf msxsl"> <xsl:variable name="x"> <foo> <bar>hello world</bar> </foo> </xsl:variable> <exsltf:function name="msxsl:node-set"> <xsl:param name="x"/> <exsltf:result select="exslt:node-set($x)"/> </exsltf:function> <xsl:template match="/"> <xsl:value-of select="msxsl:node-set($x)//bar)"/> </xsl:template> </xsl:stylesheet> (MSXML will use msxsl:node-set directly, Saxon will use the exsltf:node-set) This is great and works well for Saxon 6.5.3 and MSXML 4. However, I would also like it to work with Saxon 7.8 - could someone with xslt 2.0 experience let me know if its possible to have this kind of solution work for Saxon 7.8 and MSXML4 (Saxon 7.8 currently complains... as I believe functions are built into 2.0)? The history is that the app Im writing for uses Saxon 7.8, and there is a requirement to view transforms outside of the app using MSXML4. If possible, it would be best to add this functionality in the stylesheets, rather than alter the code for the app. Thanks for any suggestions, cheers andrew XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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
|