|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Testing 2 XML documents for equality - a solution
> This is a nice feature provided by Saxon (infact very > nice). And is much more optimized than the named > template I wrote (in the stylesheet I posted last), as > Saxon's function runs in native Java code.. For the vast majority of nodes this is still a) very expensive way of comparing them and b) doesn't help with the comparison. For a given element node if you calculate an XPath to the current node, and then use that XPath to find a node in the other document, you have two nodes, you then need to compare whether they are equal, but that is _exactly_ the problem you are trying to solve. The earlier stylesheet just took the string value of the node but that is just the concatenation of all the element content so loses most of the markup information. What is wrong with the much simpler alternative of just writing out the string corresponding to a specific "canonical" linearisation, and then jsut comparing those two strings? David ________________________________________________________________________ This e-mail has been scanned for all viruses by Star. The service is powered by MessageLabs. For more information on a proactive anti-virus service working around the clock, around the globe, visit: http://www.star.net.uk ________________________________________________________________________
|
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
|

Cart








