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

Using key to group large documents

Subject: Using key to group large documents
From: Heinz Seldte <HeinzS@xxxxxxxxx>
Date: Wed, 17 Mar 2004 07:04:06 +0200
heinz group
Hi there,

I have to group information in the hypothetic format:

<item>
   <prop1>x</prop1>
   <prop2>y</prop2>
   <prop3>z</prop3>
   <lots-of-other-info-for-display/>
</item>

I need to group info in the items as follows:

prop1
  prop2
     prop3

(Thus - first by prop1, then prop2, then prop3)

To do this, I am using keys, but I am encountering very bad performance when
using Xalan.  To improve the performance I have now produced only one key
using a concatenation of all properties to group the items:

    <xsl:key name="per" match="//item" use="concat(prop1,concat(prop2,
prop3))"/>

After grouping I have to produce a fairly complex matrix (output as an html
table) for each item (since the grouped items are then combined and
displayed in a single row based on other item info). This also takes quite a
while, so I have resorted to taking a multi-pass approach by using the Xalan
nodeset function to first apply-imports to produce an xml document with the
grouped items and then apply templates to this nodeset to produce the html.

My question is this - is there some "rule-of-thumb" max size where the input
documents should rather be grouped or split by the processes producing them
rather than the stylesheet?  I do not want to do this, since the grouping is
based purely on a presentation requirement and I do not want the application
or business layer to worry about these issues. With the above scenario,
using Xalan 2.3.1 on linux I seem to start having problems around the 2Meg
mark with 1500 items.

Any suggestions on alternative methods etc would be much appreciated. 


 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.