[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: tags and elements

Subject: RE: tags and elements
From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx>
Date: Mon, 2 Sep 2002 18:29:25 +0100
xsl elements with tags
> I am just at the beginning using xslt. Right now I am 
> doubting my comprehension of xslt. I am trying to transform 
> an xml file into another xml file just wishing to be able to 
> add a new element into my result file. I thought I should be 
> able to keep all my already existing tags in the result file. 
> Am I wrong? They all vanish. Is there a way to keep them?

yes. You're doing something wrong, but unless you show us what you're
doing, it's impossible to say what.
> 
> While adding a new element I only get the result <entry/>. 
> Actually I would like to enclose some more elements like this 
> <entry>...</entry>.  
> 
> The last question is, whether it is possible to ask wether an 
> element is filled or not when using <xsl:if> or <xsl:choose>.
> 
Yes. It depends exactly what you mean by "filled". For example, which of
the following are "filled"?:

 <a/>
 <a><!-comment--></a>
 <a>   </a>
 <a><b/></a>

if the answer is none of them, then you probably want:

<xsl:if test="normalize-space(a)">

Michael Kay
Software AG
home: Michael.H.Kay@xxxxxxxxxxxx
work: Michael.Kay@xxxxxxxxxxxxxx 


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.