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

A difference in node builds

Subject: A difference in node builds
From: "Vorndran, Charles P" <Charles.Vorndran@xxxxxxxxxxxxx>
Date: Mon, 08 Sep 2003 07:36:15 -0400
charles vorndran
I am having some difficulties using deep-equal() in Saxon 7.6.5 and the
problem doesn't seem to be in the function.  Instead, the problem seems to
be in the nodes that are being compared and how those nodes are built.

To verify that deep-equal() works, I created an xsl test environment that
creates two nodes from two xml files on the file system, using the
document() function.  I then compared these nodes with deep-equal().  When
one file is actually a copy of the other, deep-equal() returns a true on the
comparison.  When I modify one of the input files structurally, deep-equal()
returns a false.  So, I'm satisfied that deep-equal() works, at least for
what I want.

The problem is, in the real application I create a node, NODE1, with data
extracted from a larger xml input file, and compare NODE1 to NODE2 which is
imported from a file (FILE1) using document().  FILE1 was built from a
previous run of the same stylesheet, essentially being derived from a node
that is now represented by and should have been identical to NODE1.  Even
though I know that nothing has changed between runs, deep-equal() indicates
that the new NODE1 and the imported NODE2 are not the same.  Yet the files
created from the two nodes, using xsl:result-document and the same output
format, are identical according to diff.

Another reason why I suspect a node difference is that when I change the
output format to text (using xsl:output method="text"), the text characters
are the same but the spacing, linefeeds and tabbing are drastically
different.  Yeah, I know, whitespace differences shouldn't come into play
here but it does seem to cloud things up a bit.

So, I guess it's back "How do I inspect a node that is in memory?" unless
someone can give me some other suggestions as to what's happening.

Thanks

Chuck Vorndran

 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.