Re: [xsl] resolving namespace for attribute content with a QName

Subject: Re: [xsl] resolving namespace for attribute content with a QName
From: Emmanouil Batsis <Emmanouil.Batsis@xxxxxxxxxxx>
Date: Fri, 23 Sep 2005 12:14:40 +0300
Ramkumar Menon wrote:

<customer idName="tns:customerId" xmlns:tns="http://abcd.org";>Sample Customer</customer>
.....


Here, i need to resolve the namespace for customerId.


If you are talking about XSLT, you can use sting related functions to test for URIs obtained using the namespace axis, see [1]. If you are not talking about XSLT and regarding JAXP; it's just a bootstrap API to get an XML parser and nothing more. How you resolve NS URIs for QName attribute values depends on the API you use to process XML. Usually you just need to build a prefix:URI map as you go and then again use string functions on attribute values.



[1] http://www.google.com/search?hl=en&lr=&q=%22matching+attribute+values+with+namespaces%22&btnG=Search


hth,

Manos

Current Thread