[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Attribute default values (using SAXON/XALAN/MSXML)

Subject: 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)
msxml3 count
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.