Link to home
Start Free TrialLog in
Avatar of gayathri grandhe
gayathri grandhe

asked on

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

I mean how to extract the namespace of xml by using xslt through xpath. is it is possible?
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

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)
Avatar of gayathri grandhe
gayathri grandhe

ASKER

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.
how to extract that by using xpath
ASKER CERTIFIED SOLUTION
Avatar of Gertone (Geert Bormans)
Gertone (Geert Bormans)
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
completely answered.
Relevant for the knowledge database since it is a generic question and dito solution