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

Re: use of xsl:key in cross-referencing

Subject: Re: use of xsl:key in cross-referencing
From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx>
Date: Sat, 15 Mar 2003 19:38:30 -0500
xsl key approach
Xiaocun,

The most "elegant" way I can see to approach this (if I understand your question correctly) is to think of it as a grouping problem, as if you didn't have any information at all on what questionnaires the questions belonged to, and then just use the usual "Muenchian" or other approach to grouping. This does have the effect of losing the ordering in which questionnaires are listed in your first row group, in favor of the order in which they appear on questions; if you must have this order, you'll have to get even less elegant and combine the methods.

At 03:35 PM 3/15/2003, you wrote:
The way I currently handles it is create a xsl:key
matching rows in the 2nd group (questions) using the
1st cell.

Sounds good.


  When I process the 1st group of rows
(questionnaires), I call key() function by passing in
the value in the 2nd cell.

Ignore the first group of rows and just iterate over the questions, using your key to group them.


  The problem with this
approach is that it ignores question with a
questionnaire not defined in the 1st group.

Covering all the questions, you'll -- cover all the questions.


  Is there
an elegant way to address this problem?

As I said, they'll come out in the order they come out in. I'm not sure this approach counts as elegant.


An attempt, anyhow.

Cheers,
Wendell


___&&__&_&___&_&__&&&__&_&__&__&&____&&_&___&__&_&&_____&__&__&&_____&_&&_ "Thus I make my own use of the telegraph, without consulting the directors, like the sparrows, which I perceive use it extensively for a perch." -- Thoreau


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.