|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Arrays in XSLT for variables?
> Maulik Modi wrote > My XML doc1 (called BER2.xml in the stylesheet) is: > > <Node_path>//DATA/PARAMETERS/PARAMETER/TimeSheet/EmpUserID</Node_path> > <Node_value>txtester</Node_value> > > <Node_path>//DATA/PARAMETERS/PARAMETER/TimeSheet/BeginWeek</Node_path> > <Node_value>11/14/01</Node_value> > > > Snippet XSL code: > > <xsl:variable name="nvalue" > select="following-sibling::Node_value"/> In your source XML, the first <Node-path> element (despite its indentation) has two following-sibling <Node_value> elements, so you are selecting them both. I suspect you only want the immediate following sibling, i.e. <xsl:variable name="nvalue" select="following-sibling::Node_value[1]"/> Better would be to add a containing element to reflect the hierarchic structure more accurately; showing it by indentation isn't very useful when it comes to processing it. Mike Kay 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
|

Cart








