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

Muenchian Grouping with Position() Constraints

Subject: Muenchian Grouping with Position() Constraints
From: "McDonald, Thomas" <Thomas.McDonald@xxxxxxxxxxxxxx>
Date: Fri, 13 Jun 2003 09:56:19 -0400
the letter people
Hi,

I am doing some Muenching grouping and in the result I want to constrain the
output, i.e., I don't want to show anything that matches the first three key
values.

For example, imagine you were making a phone book from the following xml and
you wanted to not show the first three names in the key (I assume the key is
kept in document order so I want to eliminate all names that are Aarron,
Aiken or Appleby).

<names>
<name><lname>Aarron</lname><first>Hank</first><name>
<name><lname>Aarron</lname><first>Ted</first><lname>
<name><lname>Aiken</lname><first>Joe</first></name>
<name><lname>Aiken</lname><first>Jill</first></name>
<name><lname>Appleby</lname><first>Joe</first></name>
<name><lname>Appleby</lname><first>Sarah</first></name>
<name><lname>Appleseed</lname><first>John</first></name>
<name><lname>Appleseed</lname><first>Susan</first></name>
<name><lname>Arson</lname><first>Joe</first></name>
<name><lname>Arson<lname><first>Bill</first></name>
<name><lname>Azzure<lname><first>Peg</first></name>
</names>

Consequently the result tree should look like 

<names>
<name>
<lname>Appleseed</lname>
<first>
 <fname>John</fname>
 <fname>Susan</fname>
</first>
</name>
<name>
<lname>Arson</lname>
<first>
 <fname>Joe</fname>
 <fname>Bill</fname>
</first>
</name>
<name>
<lname>Azzure</lname>
<first>
 <fname>Peg</fname>
</first>
</name>
</names>

Notice that the top three names from the document didn't appear in the
result tree.  


Regards,

Tom

fyi, if you want to know why I would do such a thing, just imagine that I am
selling phone books and people who pay get the WHOLE phone book, including
the first three names of every letter.  People who don't pay get the PARTIAL
phone book (excluding the first three people from every letter) until they
pay.  Muuuhuuuuhahahahahahahah!  Also, I must constrain by position in the
document so please don't offer a suggestion based on alphabetizing or some
other system.

 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.