|
Subject: Re: [xsl] Checking whether a child node exists with specified attribute value. From: Martin Honnen <Martin.Honnen@xxxxxx> Date: Wed, 22 Apr 2009 20:50:17 +0200 |
What I want to do is check whether a node with multiple children, all containing attribute "name," happens to have a child where the "name" attribute is "address1."
XML: <dataElement type="address" name="addrProjectOwner" dbfield="projOwnerAddress"> <addrField name="orgName" /> <addrField name="address1" /> <addrField name="address2" /> <addrField name="city" /> <addrField name="state" /> <addrField name="zip" /> </dataElement>
XSLT (please help fix):
(At this point I'm iterating through all <dataElement> nodes in the XML) <xsl:if test="@type='address'"> <xsl:if test="if an addrField in my children has name 'address1''">
<input type="text" id="txtAddress1" />
</xsl:if>
<xsl:if test="if an addrField in my children has name 'salami''">
<input type="text" id="txtSalami" />
</xsl:if>
</xsl:if>
Martin Honnen http://msmvps.com/blogs/martin_honnen/
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] Checking whether a child , Michael Kay | Thread | Re: [xsl] Checking whether a child , Shawn Milochik |
| RE: [xsl] Checking whether a child , Michael Kay | Date | Re: [xsl] Checking whether a child , Shawn Milochik |
| Month |