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

Re: XSLT merging XML documents

Subject: Re: XSLT merging XML documents
From: T_MULLEN 58211 6th Singer St <Tom.Mullen@xxxxxxxxxxx>
Date: Fri, 28 Jul 2000 15:20:48 +0000 (GMT)
merge xml algorithm
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


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.