Subject: Re: [xsl] xpath - check for no content From: Joerg Heinicke <joerg.heinicke@xxxxxx> Date: Tue, 30 Jul 2002 14:01:49 +0200 |
I have to transform this into xsl:fo ! so, i do really NEED the additional break here! background is- i am tranforming a Lotus Notes XML Export into a PDF Dokument. Some linbreaks and Paragraphs don't "get through" my templates at the moment. I am trying to figure out what's wrong or try to find a workaround, so that the output looks like the Notes document.
I will try to see if your hints get me any further. Thanks, Sascha
----- Original Message ----- From: "G. Ken Holman" <gkholman@xxxxxxxxxxxxxxxxxxxx> To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> Sent: Monday, July 29, 2002 5:57 PM Subject: Re: [xsl] xpath - check for no content
At 2002-07-29 17:43 +0200, sascha wrote:have
simple question i guess: How do i check if the <run> element or one of it's childsren does not
any content? Meaning that there is no output text or so inbetween.
In your example below, you do have text in between ... you have text nodes comprised only of white-space characters.
example: <run> <font size="17pt" style="bold" name="Arial" color="red"/> <break/> </run>
I tried...
If the white-space *is* significant, just check the value of the current
node:
<xsl:if test=". = ''">
If the white-space *isn't* significant, trim leading and trailing just in case the input was "lazily" empty:
<xsl:if test="normalize-space(.)=''">
Note this is a common problem where users *think* an element is empty, but they've inserted a new-line to make the indentation look nice, not realizing they no longer have an empty element.
I hope this helps.
.................. Ken
System Development VIRBUS AG Fon +49(0)341-979-7419 Fax +49(0)341-979-7409 joerg.heinicke@xxxxxxxxx www.virbus.de
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] xpath - check for no cont, sascha | Thread | Re: [xsl] xpath - check for no cont, sascha |
AW: [xsl] how to add a cell in a fo, Thomas Bayer | Date | Re: [xsl] how to add a cell in a fo, David Carlisle |
Month |