Subject: [xsl] Re: Attribute default values (using SAXON/XALAN/MSXML) --BUG in MSXML?-- From: Dimitre Novatchev <dnovatchev@xxxxxxxxx> Date: Sun, 21 Jan 2001 21:09:32 -0800 (PST) |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Could the value of the select, SFYang | Thread | [xsl] Re: Could the value of the se, Dimitre Novatchev |
[xsl] Could the value of the select, SFYang | Date | [xsl] Re: Could the value of the se, Dimitre Novatchev |
Month |