Getting the Namespace Context from a XdmNode to evaluate a QName value

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

Getting the Namespace Context from a XdmNode to evaluate a QName value

cmarchand
Hello !

I define parameters which can be typed, as in xslt :

<xsl:param name="..." as="..." value="..."/>

as is a QName, which can be noted as "xs:string"

Getting the @as value from XdmNode.getAttributeValue(), I want to
construct the QName, according to node's namespace context.

How can I get the namespace context from XdmNode ?
XdmNode.getUnderlyingNode().getNamespaceBinding(null) ?

Best regards,
Christophe



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help 
Reply | Threaded
Open this post in threaded view
|

Re: Getting the Namespace Context from a XdmNode to evaluate a QName value

Michael Kay
You can do

new InscopeNamespaceResolver(xdmNode.getUnderlyingNode())

Michael Kay
Saxonica


> On 3 Apr 2017, at 09:55, Christophe Marchand <[hidden email]> wrote:
>
> Hello !
>
> I define parameters which can be typed, as in xslt :
>
> <xsl:param name="..." as="..." value="..."/>
>
> as is a QName, which can be noted as "xs:string"
>
> Getting the @as value from XdmNode.getAttributeValue(), I want to
> construct the QName, according to node's namespace context.
>
> How can I get the namespace context from XdmNode ?
> XdmNode.getUnderlyingNode().getNamespaceBinding(null) ?
>
> Best regards,
> Christophe
>
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> saxon-help mailing list archived at http://saxon.markmail.org/
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/saxon-help 


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
saxon-help mailing list archived at http://saxon.markmail.org/
[hidden email]
https://lists.sourceforge.net/lists/listinfo/saxon-help