[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: compare two nodes (the child elements, not the str
Dear Wolfhart,
On 7/7/2011 12:55 AM, Wolfhart Totschnig wrote: For my particular case, I found a less complicated solution than Wendell's, but it's a particular solution, not a general one: Yes, but that will fail if you have two persons, one with the same last and first names and another with the same last and middle names ... The reason this is hard is that "equality" for node comparison purposes is impossible to specify adequately for the general case (largely but not entirely due to whitespace-related issues), so even a good general definition (such as in 2.0 deep-equal()) is only somewhat useful. So more powerful means have to be applied. I am amazed that there is no simple general solution for this kind of problem in XSLT 1.0. I thought I must be overlooking something obvious. XSLT 2.0 indeed makes life easier! I think part of the reason why XSLT 1.0 was so successful was that they limited the scope to a set of problems already well understood, deliberately leaving it to be filled out later. If they had tried to be more comprehensive and general, they might well have botched it. (Plus, we wouldn't have the useful alignment with XQuery as well as other advantages.) In other words, XSLT 2.0 is the correct approach even from the XSLT 1.0 point of view. Cheers, Wendell -- ====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|