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)
-> + Nested variable compile error ... (5)
-> + Replace a nodeset with another... (2)
-> + StackOverFlow Error, while com... (4)
-> + Footnote - WORDML (6)
-> + Concatenate same input element... (3)
-> - Need to remove the sub element... (3)
-> ->Need to remove the sub el...
-> ->Need to remove the sub el...
-> + Grabbing sub-namespace values (2)
-> + Converting date via browser XS... (4)
-> + Selecting Attribute nodes (2)
-> + XSLT totaling numeric values (4)
-> + Two line output by breaking on... (3)
-> + Encoding Option for base64Bina... (2)
-> + using document and web service... (2)
-> + XSLT transformations with JDK1... (8)
-> - Parsing Excel XML - Selectiing... (1)
-> + Grouping this xml input very n... (2)
-> + XSL-FO page-sequence and blank... (2)
-> + Need Help In XSLT Mapping (3)
-> + how to create the Tables by co... (2)
-> + fo:external-graphic - Image ... (2)
-- Previous [481-500] [501-520] [521-540] Next
+ XQuery Help and Discussion (2017)
+ Stylus Studio FAQs (159)
+ Stylus Studio Code Samples & Utilities (364)
+ Stylus Studio Announcements (113)
Topic  
Postnext
radhakrish rsSubject: Need to remove the sub element from the xml file using xsl
Author: radhakrish rs
Date: 06 Nov 2008 07:23 AM
I have a xml file like

<root>
....
<site.info number="009" snumber="0122" wnumber="AtoZ" type="text"><ital>Rose,</ital> running text</site.info>

...
</root>

Please let me know how to remove the element <ital> without disturbing the contents.

Thanks in advance.

Postnext
James DurningSubject: Need to remove the sub element from the xml file using xsl
Author: James Durning
Date: 07 Nov 2008 03:25 PM
As posted in the other forum, Use a template for ital:

<xsl:template match="ital">
<xsl:apply-templates/>
</xsl:template>
<!-- copy template -->
<xsl:template match="*">
<xsl:copy>
<xsl:copy-of select="@*"/>
<xsl:apply-templates/>
</xsl:copy>
</xsl:template>

Posttop
radhakrish rsSubject: Need to remove the sub element from the xml file using xsl
Author: radhakrish rs
Date: 07 Nov 2008 11:28 PM
Hi,

Thanks for info.

I had tried the copy template but it is not producing the desired output.

Also more specifically the <ital> & </ital> element need to be removed under the <site.info> element only.

I am using the XSL file to cleanup the xml file, just like a pre-processing script.

Thanks in advance.

   
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.