xslt: get attribute from xsl itself -
is possible read xsl attribute xsl document itself? need this:
mystyle.xsl
<?xml version="1.0" encoding="iso-8859-1"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform" xmlns:html="http://www.w3.org/1999/xhtml" xmlns="http://www.w3.org/1999/xhtml" id="i'm special stylesheet"> ... <!-- output should be: "stylesheet id: i'm special stylesheet" --> <xsl:text>stylesheet id:</xsl:text><xsl:value-of select="/@id"/> ... </xsl:stylesheet>
is possible?
yes, can use <xsl:value-of select="document('')/xsl:stylesheet/@id"/>
, @ least long stylesheet has been loaded uri.
Comments
Post a Comment