We help IT Professionals succeed at work.

I mean how to extract the namespace of xml by using xslt through xpath. is it is possible?

gayathri grandhe
on
108 Views
Last Modified: 2017-04-05
I mean how to extract the namespace of xml by using xslt through xpath. is it is possible?
Comment
Watch Question

Gertone (Geert Bormans)Information Architect
CERTIFIED EXPERT
Top Expert 2006

Commented:
for this XML

<foo xmlns="abc">
    
</foo>

Open in new window


this template will give the namespace uri for the nodes

   <xsl:template match="node()">
        <xsl:value-of select="namespace-uri()"/>
    </xsl:template>

Open in new window


I assume that is what you need
(try to be more specific in your questions: xslt version, specific requirement.... this seems like homework without context)

Author

Commented:
I don't need namespace for a particular node.
I mean in the xml
these are the namespaces

<?xml-stylesheet type="text/xsl" href="update.xsl"?>
<insurance xsi:schemaLocation="http://redbus.com/service/kbs/Integration C:/DOCUME~1/AXSURY/MYDOCU~1/ACES/Design/XSLT/Update/Create_intellengent.xsd"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns="http://redbus.com/service/kbs/Integration">

how to extract this namespace.
could you please suggest me in that.

Author

Commented:
how to extract that by using xpath
Information Architect
CERTIFIED EXPERT
Top Expert 2006
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION
Gertone (Geert Bormans)Information Architect
CERTIFIED EXPERT
Top Expert 2006

Commented:
completely answered.
Relevant for the knowledge database since it is a generic question and dito solution