Altova Mailing List Archives


RE: "sorted" axis (was: Remove duplicates from a node-set according to content)

From: Kay Michael <Michael.Kay@------->
To:
Date: 7/28/1999 5:41:00 PM
> This is really a question to those developing the XSL spec: is this a
> reasonable requirement? or am I on the wrong side of the 80/20 divide?
> is my vague hope for "sorted" axes doomed to disappointment?

It comes up so often that it MUST be a reasonable requirement. If you want
to do it in less than 35mins, try SAXON's group-by construct. 

(It's proprietary, though with extension elements becoming respectable it
will soon become more of a "standard extension" than a "proprietary
extension" - not that this makes any practical difference!)

The SAXON construct doesn't solve the problem by giving you sorted axes, it
does it by allowing you to write code that in effect allows you to add a
layer of hierarchy to a nodeset, so you can say

for each group of consecutive nodes with the same value of EXPR do
-- start of group processing
---- for each node withing the group do
------ process the node
---- end 
-- end of group processing
end

(It's puzzled me for a while that the design of XSL seems to have learnt
very little from 25 years of experience in designing report writers!)

Mike Kay


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Disclaimer

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.