|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Attribute default values (using SAXON/XALAN/MSXML)
Hi Eric, This seems to be closely related to the bug I reported 2 days ago (http://sources.redhat.com/ml/xsl-list/2001-01/msg00804.html). I got a reply from a MS employee that "This is a known issue with Production release, and we will fix that in msxml 3.0 sp1.". Until then, the obvious workaround is not to use the value from the global variable (btw, count(//x/@*) may be greater than count(@*) for any particular //x, in case count(//x) > 1, so using the global expression may not be safe -- depending on what exactly you intend to do!!!). In any case, use the following, which works in MSXML3: count(//@*[parent::x]) Dimitre Novatchev. Eric Vermetten wrote: Hello all, I really need to get hold of DTD defined attribute values. I have the following stylesheet and two XML files: <?xml version="1.0"?> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0"> <xsl:output method="xml" indent="yes" encoding="UTF-8" /> <xsl:variable name='global'> <!-- I really like to get the attributes here! --> <xsl:value-of select='count(//x/@*)' /> </xsl:variable> <xsl:template match="x" > <xsl:variable name='from-global' select="count(//x/@*)" /> <xsl:variable name='from-current' select="count(@*)" /> <out> <xsl:value-of select="$global" /><xsl:text>|</xsl:text> <xsl:value-of select="$from-current" /><xsl:text>|</xsl:text> <xsl:value-of select="$from-global" /> </out> </xsl:template> </xsl:stylesheet> __________________________________________________ Do You Yahoo!? Yahoo! Auctions - Buy the things you want at great prices. http://auctions.yahoo.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








