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
Conferences Close Tree View
+ Stylus Studio Feature Requests (1192)
+ Stylus Studio Technical Forum (14621)
+ Website Feedback (249)
- XSLT Help and Discussion (7625)
-> + Use of before and after string (3) Sticky Topic
-> - How do I substitute element ty... (1)
-> + How does one add working days ... (4)
-> - Help, I have existing XLT and... (1)
-> + Need help on XSLT issue - (2)
-> + EDI to XML Conversion (7)
-> - XML To JSON Conversion using X... (1)
-> + Formatting Paragraphs to same ... (2)
-> - Grouping of records (1)
-> + Problems with xsd 1.1 (4)
-> + XML to HL7 mapping (3)
-> + XSLT 3 and Iterate (2)
-> + XSL-FO to PDF preview (3)
-> + java.lang.RuntimeException: Er... (2)
-> + Create Acroforms with Stylus X... (2)
-> + How to change XSLT parameter s... (3)
-> + how to change format of the da... (2)
-> + Search "Next 8 Results " doesn... (2)
-> - Support for Git (1)
-> + newbee (8)
-- [1-20] [21-40] [41-60] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
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

   
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.