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

RE: Identical entries in different input documents s

Subject: RE: Identical entries in different input documents should appear in the output document only once
From: "Meyer, Roland 1. (NSN - DE/Germany - MiniMD)" <roland.1.meyer@xxxxxxx>
Date: Mon, 10 Sep 2007 07:47:46 +0200
RE:  Identical entries in different input documents   s
Hi David,

thanks for that input. I tried both solutions. At least the code can be
reduced :-). In runtime I could not see a difference for my example (but
I only measured in units of seconds) - when I have time I might check
this with detailed measurements.


Roland



-----Original Message-----
From: ext David Carlisle [mailto:davidc@xxxxxxxxx]
Sent: Friday, September 07, 2007 10:55 PM
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: Re:  Identical entries in different input documents should
appear in the output document only once


> That's all ... Wow :-)

it's a bit more than you need though:-)


   <xsl:for-each select="current-group()[1]"> <!-- In my case all blocks

is (always) the same thing as

   <xsl:for-each select="."> <!-- In my case all blocks

which is always the same thing as

     <!-- In my case all blocks

so the code can be


<xsl:for-each-group select="document($allFiles)//root/block"
group-by="idTag">
 <!-- In my case all blocks
from different files are really identical -->
      <xsl:call-template name="makeMyTransformationOnTheBlock"/>
</xsl:for-each-group>


If <root> is always the top level element, using /root/block instead of
//root/block would save the processor a lot of work as // implies
(except when Michael optimizes it away) a full search to arbitrary depth
of each document to find all elements of that name.


David

________________________________________________________________________
The Numerical Algorithms Group Ltd is a company registered in England
and Wales with company number 1249803. The registered office is:
Wilkinson House, Jordan Hill Road, Oxford OX2 8DR, United Kingdom.

This e-mail has been scanned for all viruses by Star. The service is
powered by MessageLabs.
________________________________________________________________________

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.