[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: variable values in for-each loops
> > THE XSLT: > <xsl:for-each select="name"> > <xsl:variable name="teststring" expr="name[starts-with(.,a)]"/> > </xsl:for-each> > > THE XML FILE: > <name>jon</name> > <name>andrew</name> > <name>bill</name> > <name>ann</name> > <name>mike</name> > > What is the value of the variable in each case? How is it determined? 1. It will give you a syntax error unless you replace expr with select 2. It will give you an empty node-set in each case because the <name> element has no <name> child. 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
|