|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: simple matching problem
> Here's another: This seems to find the element node where > @task = 1, but it doesn't actually write out the value of > @task. Why? It just writes out: @TASK = > > Thanks- > Mac > > <xsl:param name="$nextTask" select="1" /> > > <xsl:if test="//*[@task=$nextTask]"> > @TASK = <xsl:value-of select="@task" /> > </xsl:if> > Your <xsl:if> tests whether an element exists satisfying certain conditions, but it doesn't make this element the context node. To achieve that, write: <xsl:for-each select="//*[@task=$nextTask]"> @TASK = <xsl:value-of select="@task" /> </xsl:for-each> Michael Kay Software AG home: Michael.H.Kay@xxxxxxxxxxxx work: Michael.Kay@xxxxxxxxxxxxxx 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








