This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

RE: 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

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]