xml
XPath,XSL: Test if node exists which has multiple children with special attributes
I am trying to find a way to do operations based on whether there exists a node which has two children with special attributes. So given this data: <A> <B attribute1="X"/> <B attribute2="Y"/> </A> <A> <B/> </A> I only want to get true if there exists an element A which has one element B with attribute1="X" and one element B with attribute2="Y", like in the data example. So my start was <xsl:if test="(boolean(//A/B[#attribute1='X'] and B[#attribute2='Y'))"> This does not work, and the best I could do so far is to evaluate if there is one Node A1 with a child that has attribute1 = X and one Node A2 with a child that has attribute2 = Y, but A1 and A2 can be different Nodes.
'boolean(//A[B[#attribute1="X"] and B[#attribute2="Y"]])'
Related Links
Validate xml from visual basic
How is the versatile 2010 OpenDocument Text format (.odt) different from the easily damaged 2012 ODT one?
Wordpress feed generates broken xml
tree sorting in groovy
How to combine XML-like format with binary data?
Referencing xml file with dynamic file name
How to get child max element with xslt
Finding a Same-Level Predecessor in XML using XPath
xslt validation
what does the following line of code means in xslt
log4j xml to write logs from one package to their own log file
Magento Soap Api (v2), how to show XML response
Tomcat 6 to Tomcat 7 causes context path to stop cooperating
XSD with conditional attribute
Should we rewrite the XSL in CDuce?
Scriptella: copy table from access to postgresql