Ankur writes:
>I have an XML document where a particular elemnt is defined under a
>given namespace. Now I want to give this namespace in my XPATH expr
>(without declaring in the XSLT).

Why??

>One trick I did was to use an XPATH expr looking something like this,
>//*[namespace::asx='http://www.sap.com/abapxml'
>    and local-name()='abap']

That looks like a bigger problem than the other approach. There's a
potential loophole, depending on where the namespace declarations are
placed in the source tree, and the performance hit of searching every
element in the tree would add up quickly. Since you know the target
namespace URI in your stylesheet (in order to be able to write a
predicate like the above), why not just associate it with a prefix?
.................David Marston


Reply via email to