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]
Other format: [Raw text]

RE: preceeding:sibling?


> Thanks for the link. I have in fact got a working stylesheet that
> does remove the duplicates, however it only seems to work on xml
> documents that are small, say the example xml with the previous mail.
>
> If I apply it to a larger file, say, 20Mb the duplicates
> appear once more.
>
> This tends to suggest to me that my stylesheet is ok but
> Saxon may need
> more space? to remove the duplicates as it may have to compare each
> attribute with thousands of others. Unless there is a more
> elegant way of
> doing this? My machine has 256meg RAM, 900Mhz.
>
> Could anyone suggest a solution? More memory or different stylesheet?

Saxon isn't going to produce wrong answers just because your document is too
big, there is something else going on here. Perhaps an extra layer of
hierarchy, which means the duplicates are no longer siblings of each other?

Note that the preceding-sibling method of removing duplicates has O(n*n)
performance. For a scaleable solution, you need to use <xsl:key> and the
Muenchian method.

Michael Kay
Software AG
home: Michael.H.Kay@ntlworld.com
work: Michael.Kay@softwareag.com


 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]