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

Conflicting Node Values

Subject: Conflicting Node Values
From: "John Creery" <jcreery@xxxxxxxxxxxx>
Date: Wed, 24 May 2000 16:12:56 -0400
john creery
Although I've checked the archive, etc, haven't found answers to these
questions, so I hope they haven't been asked before!

I'm getting different node values from XT and MSXML3(May2000) and frankly,
don't understand the values I'm getting.

I have an instance which looks (in part) like this:

<?xml version="1.0"?>
<?xml-stylesheet href="opdocxt.xsl" type="text/xsl"?>
<IMPLEMENTATIONDOC>
<SUBSYSTEM>
<SUBSYSTEMNAME>INTEGRATION LAYER</SUBSYSTEMNAME>
<ALIAS>SEQUENCER</ALIAS>
<ALIAS>WATCHER</ALIAS>
<ALIAS>ABC</ALIAS>
<ALIAS>DEF</ALIAS>
...
</SUBSYSTEM>
</IMPLEMENTATIONDOC>


and a stylesheet which looks (in part) like this:

<xsl:template match="ALIAS">
	<xsl:if test="position()=1"><h5>ALIASES: </h5></xsl:if>
	<b><xsl:value-of select="."/></b>
</xsl:template>

because I want to put out the text "ALIASES: " for the first <ALIAS> that I
hit.


This didn't appear to work, so I included the line

<p>This is the node index: <xsl:number value="position()" format="(1)"/></p>

to see what the values were.

XT gave me the values 4,6,8,10, while MSXML3(May00) gave me 2,3,4, 5.

I tried

<xsl:if test="./child::ALIAS[4]"><h5>ALIASES: 0a</h5></xsl:if>

and got no results at all (i.e. I couldn't figure out what node values it
thought it had, but they didn't match the above.)

So my questions are:

1) Why are XT and MSXML3 giving me different results?

2) Why is it that "ALIAS[n]" doesn't work at all?

Any help would be greatly appreciated.

John Creery
Open Text Corporation
3775 Richmond Road
Nepean, ON  K2H 5B7  Canada
TEL:  613-596-2233 EXT. 3353
FAX:  613-596-5934
E-MAIL:  jcreery@xxxxxxxxxxxx


 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.