XML Editor
Sign up for a WebBoard account Sign Up Keyword Search Search More Options... Options
Chat Rooms Chat Help Help News News Log in to WebBoard Log in Not Logged in
Show tree view Topic
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Postnext
Ashwin KumarSubject: URGENT :::: Remove the name space and the prefixes to the tags.
Author: Ashwin Kumar
Date: 04 Aug 2009 02:49 PM
Originally Posted: 04 Aug 2009 12:42 PM
Hi,

I am trying to convert an xml to another using xslt 1.0. I am kind of stuck on one issue,


One of my internal nodes within the source xml is an xml. And i need to strip of the namespaces, and also the prefix of the name space in front of my tags...and display an portion of the xml.

I am not sure, if this makes sense...but shall include the source xml.

<Attachment>
<AttachmentData>
<ns1:TXLife xmlns:ns1="http://ACORD.org/Standards/Life/2">
<ns1:TXLifeResponse>
<ns1:TransRefGUID>1651984651</ns1:TransRefGUID>
<ns1:TransType tc="103">103</ns1:TransType>
<ns1:TransExeDate>2009-07-01</ns1:TransExeDate>
<ns1:TransExeTime>10:27:56</ns1:TransExeTime>
<ns1:TransResult>
<ns1:ResultCode tc="1"/>
</ns1:TransResult>
<ns1:OLifE>
<ns1:Party id="BPID_0000371862">
<ns1:FullName>C E S INS AGENCY INC</ns1:FullName>
<ns1:Person>
...
...
</ns1:OLifE>
</ns1:TXLifeResponse>
</<ns1:TXLife>
</AttachmentData>
</Attachment>

So i need to remove the namespaces; as well as the prefixes 'ns1:' in front of the tags...and all i need is the '<ns1:OLifE>' object.

i need to display this in my output xml.

<Attachment>
<AttachmentData>
<OLifE>
<Party id="BPID_0000371862">
<FullName>C E S INS AGENCY INC</FullName>
<Person>
...
...
</OLifE>
</AttachmentData>
</Attachment>

Please help me out ---

Thanks in advance,
Ash316

Posttop
Tony LavinioSubject: URGENT :::: Remove the name space and the prefixes to the tags.
Author: Tony Lavinio
Date: 05 Aug 2009 12:52 AM
The XSLT FAQ contains this.
See http://www.dpawson.co.uk/xsl/sect2/N5536.html#d7781e1753

 
Topic Page 1 2 3 4 5 6 7 8 9 Go to previous topicPrev TopicGo to next topicNext Topic
Download A Free Trial of Stylus Studio 6 XML Professional Edition Today! Powered by Stylus Studio, the world's leading XML IDE for XML, XSLT, XQuery, XML Schema, DTD, XPath, WSDL, XHTML, SQL/XML, and XML Mapping!  
go

Log In Options

Site Map | Privacy Policy | Terms of Use | Trademarks
Stylus Scoop XML Newsletter:
W3C Member
Stylus Studio® and DataDirect XQuery ™are from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2016 All Rights Reserved.