|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] [XSLT 2] base-uri of input's dir
Hi :)
The following works, but I suspect there is a much simpler way. <xsl:template match="textdata[@fileref]">
<xsl:variable name="dir_abs"
select="replace(base-uri(/),'[^\/]+$','')"/>
<!--
AFAICS, basically resolve-uri()
concatenates if @fileref is relative, and
leaves unchanged if it's absolute
-->
<xsl:variable name="file_abs"
select="resolve-uri(@fileref,$dir_abs)"/>
<xsl:copy-of select="unparsed-text($file_abs,'utf-8')"/>
</xsl:template><xsl:template match="textobject[textdata[@fileref]]"> <xsl:apply-templates/> </xsl:template> How could I get the base dir of the input ($dir_abs), directly, without doing replace()? Tobi -- http://www.pinkjuice.com/ 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
|

Cart








