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

Re: Antwort: Re: Indexing a fop generated document.

Subject: Re: Antwort: Re: Indexing a fop generated document.
From: David Carlisle <davidc@xxxxxxxxx>
Date: Tue, 16 Jan 2001 14:52:53 GMT
Re: Antwort: Re:  Indexing a fop generated document.
> 
> <xsl:if 
> test="count(//Foundation.Core.Generalization[Foundation.Core.Generalization.c
> hild/Foundation.Core.GeneralizableElement/@xmi.idref=$classID]) &gt; 0"> 



if used in a boolean context (like test attribute) a node set counts as
true if it is non empty, so there is no need to say
<xsl:if test="count(xxx) &gt; 0">
you can just say
<xsl:if test="xxx>

which is simpler, and may or may not be more efficient depending on
your XSL system.

But in this case it looks like you could just remove the xsl:if as it
isn't doing anything.

If the  above test is true, then the following for-each is executed,
if it is not, then it would be executed but would select an empty node
set, so wouldn't do anything.

<xsl:for-each 
select="//Foundation.Core.Generalization[Foundation.Core.Generalization.child/Fo




You say

> It only works if the if-test is applied _before_  for-each is
> performed.

but you don't say what doesn't work if you miss out the xsl:if.

David

_____________________________________________________________________
This message has been checked for all known viruses by Star Internet delivered
through the MessageLabs Virus Control Centre. For further information visit
http://www.star.net.uk/stats.asp

 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.