Subject: Re: [xsl] Getting desired node on template match From: "J.Pietschmann" <j3322ptm@xxxxxxxx> Date: Fri, 06 Sep 2002 19:59:40 +0200 |
How can i do so that on template match="input[@type='submit']" it traverses every input type between the same <form> and </form> and retrive name ,value.
I'm not quite sure what you mean, perhaps <xsl:template match="input[@type='submit']"> <xsl:for-each select="ancestor::form[1]//input> <xsl:value-of select="@name"/> <xsl:value-of select="@value"/> </xsl:for-each> </xsl:template> This gets the nearest form ancestor of the matched input field and uses all descendent inputs, including the matched. Be careful if you have - nested forms - multiple submits per form
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Getting desired node on templ, alex ek | Thread | Re: Re: [xsl] Getting desired node , alex ek |
RE: [xsl] complex sorting, Michael Kay | Date | [xsl] copy single node once from on, Thomas Olausson |
Month |