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

RE: alpha comparison

Subject: RE: alpha comparison
From: "Pawson, David" <DPawson@xxxxxxxxxxx>
Date: Mon, 10 Apr 2000 12:40:36 +0100
javascript sort alpha comparison
>> Is the sorted output tree count 
>> identical to the 
>> unsorted input count.
>
>xsl:sort doesn't remove duplicates, so if by count you meant count(),
>the numebr of nodes in the list, then the answer is always yes 
>isn't it?

Not with the sort of mistakes I make David :-)
I presumed (wrongly) that the input nodes were
already sorted, hence my 'pick just one' topic
using the following-sibling:: axis was flawed.


I need to check that 
none of my input data has been filtered out
by my poor scripting.

src is of the form
<section>
  <qna>
     <topic/>
  </qna>
</section>
with 7 sections

I can count input nodes <qna> OK.
I'm getting better at sorting etc,
but my output was missing about
40 qna's under a number of  topics.

This was the symptom.

A simple check would be
1. Do a qna count on the source document
2. Transform to html (7 files)
3. Read all 7 html files and count the (no longer) qna's
4. Check that count at 1 = count at 3.

I could bodge it and add an odd tag to count,
or try and be clever and count something within
the stylesheet, but I'm not, so I won't.

With any sort/group stylesheeet its surely a risk?
Data being lost due to weak filtering.


Regards, DaveP


 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.