[xsl] Re: Attribute default values (using SAXON/XALAN/MSXML) --BUG in MSXML?--

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

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

In any case, use the following, which works in MSXML3:


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";

<xsl:output method="xml" 	indent="yes"	encoding="UTF-8" />

<xsl:variable name='global'> <!-- I really like to get the attributes
	<xsl:value-of select='count(//x/@*)' />

<xsl:template match="x" >
<xsl:variable name='from-global' select="count(//x/@*)" />
<xsl:variable name='from-current' select="count(@*)" />
		<xsl:value-of  select="$global" /><xsl:text>|</xsl:text>
		<xsl:value-of  select="$from-current"
		<xsl:value-of  select="$from-global" />


Do You Yahoo!?
Yahoo! Auctions - Buy the things you want at great prices. 

 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Current Thread