Subject: RE: [xsl] tags and elements From: "Michael Kay" <michael.h.kay@xxxxxxxxxxxx> Date: Mon, 2 Sep 2002 18:29:25 +0100 |
> 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] tags and elements, Joerg Heinicke | Thread | RE: [xsl] How concatenate the conte, Roberto Arévalo |
RE: [xsl] copy-of / value-of, Michael Kay | Date | RE: [xsl] Getting the value of an e, Michael Kay |
Month |