This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Conflicting Node Values
- To: <xsl-list at mulberrytech dot com>
- Subject: Conflicting Node Values
- From: "John Creery" <jcreery at opentext dot com>
- Date: Wed, 24 May 2000 16:12:56 -0400
- Reply-To: xsl-list at mulberrytech dot com
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@opentext.com
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list