How to specify a namespace resolver.

Oxygen general issues.
mveerasamy
Posts: 10
Joined: Fri Oct 02, 2009 12:24 am

How to specify a namespace resolver.

Post by mveerasamy »

How do I specify a namespace resolver for xpath evaluation? For e.g. we want to use the attribute from an external namespace xlink ( xmlns:xlink=http://www.w3.org/1999/xlink).

Basically, I would like to call setNamespaceResolver(NamespaceResolver namespaceContext) on XPathEvaluator to register the namespace
Radu
Posts: 9508
Joined: Fri Jul 09, 2004 5:18 pm

Re: How to specify a namespace resolver.

Post by Radu »

Hi,

You can either run the XPath like:

Code: Select all


//*/@*:href[namespace-uri()='http://www.w3.org/1999/xlink']
or in the Oxygen Preferences XML / XSLT-FO-XQuery / XPath add a new mapping to the default namespace mappings table for xlink and then run it like:

Code: Select all


//*/@xlink:href
Regards,
Radu
Radu Coravu
<oXygen/> XML Editor
http://www.oxygenxml.com
Post Reply