> 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
|