Re: xpath simplification

"rvj" <[email protected]> Fri, 10 Dec 2010 13:02:26 -0000
Newsgroups gmane.comp.mozilla.devel.xml
Message-ID <[email protected]>
finally !

 purchaseOrder[items/item[productName[contains(.,'mower')  ] ]  or 
contains(@partNum,'926')]


or

 purchaseOrder[items/item[productName[contains(.,'mower')  ] ]  and 
contains(@partNum,'926')]


"rvj" <[email protected]> wrote in message 
news:[email protected]...
> Ah ha
>
> This implied condition seems to work but is it a logical AND or OR  ?
>
>    purchaseOrder[items/item[productName[contains(.,'mower')  ] ] 
> [contains(@partNum,'AA')]]
>
> How do define the  conditional operator?
>
>
>
> purchaseOrder[items/item[productName[contains(.,'mower')  ] ]  AND/OR 
> [contains(@partNum,'AA')]]
>
> "rvj" <[email protected]> wrote in message 
> news:[email protected]...
>> The following "contains" tests seem to work but needs to be simplified 
>> using "and" condition
>>
>> .. any idea of syntax?
>>
>> purchaseOrder[items/item/productName[contains(.,'mower')]][items/item[contains(@partNum,'AA') 
>>  ]]
>>
>> ps using http://www.xmlme.com/XpathTool.aspx  to test
>>
>>
>>
>>
>
>