Subject: [xsl] A difference in node builds From: "Vorndran, Charles P" <Charles.Vorndran@xxxxxxxxxxxxx> Date: Mon, 08 Sep 2003 07:36:15 -0400 |
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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] how to evaluate a dyna ge, Andrew Welch | Thread | RE: [xsl] A difference in node buil, Michael Kay |
RE: [xsl] how to extrac some child , Michael Kay | Date | Re: [xsl] following-sibling on attr, Dimitre Novatchev |
Month |