[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Getting the current document from an xsl:function
Hi List, It's been a while ;). However, today I was wondering about the following: the function base-uri() returns the uri of the current xsl document by default, when no context is given. But since there is no context in xsl:function, this won't work automatically from a function, instead I need to do something like: <xsl:function name="my:current-dir" as="xs:string"> <xsl:param name="context" as="node()" /> <xsl:value-of select="replace(base-uri($context), '/[^/]+$', '')" /> </xsl:function> Does anyone know a way to remove the constraint of passing on a context item? The reaon I ask is that I'd like to be able to find the current dir from places where there is no context. But, as far as I know, this is currently not possible in XSLT 2.0. Thanks, Abel
|
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
|