Conflicting Node Values
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"><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
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format