Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] Using "except" with node sequences

From: "Michael Kay" <mike@------------>
To:
Date: 8/4/2008 7:03:00 PM
> Also, thanks Michael for your suggestion.  The code I posted 
> was a simplified form of my actual code, in which I'm 
> combining two sequences produced by two different functions, 
> both of which are a bit complex for a single predicate:
> 
> 	select="$active_data except $new_data"
> 
> Both of these variables are constructed by functions executed 
> on the original $normalized_data variable.  Both use 
> <xsl:sequence /> to return a sequence of elements.  My 
> impression was that by using <xsl:sequence />, I am returning 
> references to the existing nodes in $normalized_data, and not 
> actually creating copies of those nodes in memory.  Is this 
> in fact the case?

yes.
> 
> An alternate method I considered was to create Boolean 
> functions that would allow me to construct a predicate like 
> you suggested:
> 
> 	select="$normalized_data[fn:active(.) and not(fn:new(.)]
> 
> But since I use $active_data and $new_data elsewhere in my 
> stylesheet, I decided against it, trying to avoid evaluating 
> those Boolean functions more than necessary.  
> 
> In general, which approach is better practice?  

I would think the boolean function probably gives better reusability.

Michael Kay
http://www.saxonica.com/


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent