xpath simplification

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

xpath simplification

rvj-2
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




_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml
Reply | Threaded
Open this post in threaded view
|

Re: xpath simplification

rvj-2
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" <[hidden email]> wrote in message
news:[hidden email]...

> 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
>
>
>
>


_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml
Reply | Threaded
Open this post in threaded view
|

Re: xpath simplification

rvj-2
finally !

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


or

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


"rvj" <[hidden email]> wrote in message
news:[hidden email]...

> 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" <[hidden email]> wrote in message
> news:[hidden email]...
>> 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
>>
>>
>>
>>
>
>


_______________________________________________
dev-tech-xml mailing list
[hidden email]
https://lists.mozilla.org/listinfo/dev-tech-xml