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

Re: Figuring out for-group-by

Subject: Re: Figuring out for-group-by
From: Barry Lay <blay@xxxxxxxxxxxxxxxxxxx>
Date: Fri, 09 Jul 2004 13:26:28 -0400
barry lay
I am getting a little closer. I have managed to pull out more-or-less what I am after with

<xsl:value-of select="current-group()/key[string() = 'Kind']/following-sibling::string[1][string() = 'Apple Lossless audio file']/preceding-sibling::key[string() = 'Track ID']/following-sibling::integer[1]"/>

but I am concerned that the various keys may not always be in this order so the "preceding-sibling" search may not work. I can see that I can use for-each with current-group to iterate through the sets of keys so that may be more efficient than chasing up and down the tree.

Barry Lay wrote:

I am running into trouble doing a transform with for-group-by. I am currently running Saxon 7.9.1 and am in the process of upgrading to 8.0. I thought I would post what I am up to in case my approach is wrong.

I have an XML file that looks like this:

<?xml version="1.0" encoding="UTF-8"?>
<plist version="1.0">
<key>Major Version</key><integer>1</integer>
<key>Minor Version</key><integer>1</integer>
<key>Application Version</key><string>4.6</string>
<key>Music Folder</key><string>file://localhost/Volumes/120%20GB/Music/iTunes/iTunes%20Music/</string>

   <key>Library Persistent ID</key><string>4AB531F8615308F0</string>
           <key>Track ID</key><integer>35</integer>
           <key>Name</key><string>Last Time</string>
           <key>Album</key><string>Something Like Human</string>
           <key>Kind</key><string>AIFF audio file</string>
            <!-- more key-value pairs -->
        <!-- more dict groups -->

Current Thread


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.
First Name
Last Name
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.