|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: XSLT merging XML documents
Oliver,
Taking the example below:
<a>
<b>First</b>
<b>Second</b>
</a>
If we were to have
<a>
<b>Forst</b>
</a>
How is the algorithm to distinguish between "forst" being an erroneous
spelling of "first" or a different animal altogether. The answer is, it
can't. Which is why I thought your idea of using attributes to define
equivalent nodes was rather clever. In this way you are deferring the
logic to the user of the algorithm by requiring him/her to define how to
compare equivalent nodes.
If there are to be more than one type of an element at the same level then
the user must define how to determine equivalence among them by using
attributes.
For example
<a name="Annie">
<addr>Some town</addr>
</a>
compared with
<a name="Annie">
<addr>Some other town</addr>
</a>
it is obvious that the address is wrong, but if we look at:
<a>
<b>
<name>Annie</name>
<addr>Some town</addr>
</b>
</a>
compared with
<a>
<b>
<name>Annie</name>
<addr>Some other town</addr>
</b>
</a>
there is no generic algorithm that could distinguish whether these are two
different items or the same item with a difference.
In answer to your question
<a>
<b>First</b>
<b>Second</b>
</a>
is poorly defined for a differencing/merging utility
Thanks
Tom
-----------------------------------------------------------------
Visit our Internet site at http://www.reuters.com
Any views expressed in this message are those of the individual
sender, except where the sender specifically states them to be
the views of Reuters Ltd.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
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








