Sign Up
Search
Options
search
Chat
Help
News
Log in
Not Logged in
Home
»
Boards
»
Stylus Studio Developer Network
»
XSLT Help and Discussion
»
Empty tags in XML
Topic
Topic Page
1
2
3
4
5
6
7
8
9
Prev Topic
Next Topic
next
Subject:
Empty tags in XML
Author:
Ashish Poore
Date:
16 Aug 2006 02:43 AM
Originally Posted: 16 Aug 2006 02:37 AM
Hi friends,
I am new to XSLT. Facing some problems with removing empty tags from the xml. Here is the xml sample that I want to transform.
<?xml version="1.0" ?>
<row>
<country tc="1">India</country>
<region/>
<address tc1="f"></address>
<city>Indore</city>
</row>
The condition here is that I don't want to remove the tags that have any attribute in it. In the above case I don't want to remove the <address> tag but <region> tag should be removed.
Thanks in advance,
Ashish
top
Subject:
Empty tags in XML
Author:
Ivan Pedruzzi
Date:
16 Aug 2006 09:36 PM
Define an identity transformation with the following
<xsl:apply-template select="*[count(@*) > 0]"/>
Hope this helps
Ivan Pedruzzi
Stylus Studio Team
Topic Page
1
2
3
4
5
6
7
8
9
Prev Topic
Next Topic
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 to Conference:
Select Conference
Stylus Studio Feature Requests
Stylus Studio Technical Forum
Website Feedback
XSLT Help and Discussion
XQuery Help and Discussion
Stylus Studio FAQs
Stylus Studio Code Samples & Utilities
Stylus Studio Announcements
go
Log In Options
Username:
Password:
Site Map
|
Privacy Policy
|
Terms of Use
|
Trademarks
Stylus Scoop XML Newsletter:
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.