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

RE: Comparing 2 XMLs for differences in structure / X

Subject: RE: Comparing 2 XMLs for differences in structure / X path of the documents and not the CONTENT ? XSL or another way? If XSL How ?
From: "Michael Kay" <mhk@xxxxxxxxx>
Date: Tue, 8 Jun 2004 08:33:16 +0100
compare xmls
It should be possible to describe the structural constraints on the source
documents using an XML Schema. If that is not adequate, you could look at
Schematron.

XSLT 2.0 attempts to tackle this issue by allowing you to link a stylesheet
to a schema for the source documents.

Michael Kay 

> -----Original Message-----
> From: SANWAL, ABHISHEK (HP-Houston) [mailto:abhishek.sanwal@xxxxxx] 
> Sent: 07 June 2004 22:40
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject:  Comparing 2 XMLs for differences in structure 
> / X path of the documents and not the CONTENT ? XSL or 
> another way? If XSL How ?
> 
> 
> We have incoming XMLs from another system and we essentially have a
> translation with one-to-one xpath mapping to our xml model. 
> 
> What we will be doing is adding a schema validation to the given
> incoming feed.
> 
> The content inside this XML structure will be updated on a 
> regular basis
> and that is what we want.
> 
> But, if anytime the X-Path Mapping between the Source XML and
> Destination XML is broken we want to be able to know that a 
> given source
> element/attribute was not present in the SOURCE XML. 
> 
> The way we want to maybe do this is have a SAMPLE / REFERENCE 
> SOURCE XML
> that has the "correctly mapped" structure. We will always want to do a
> structure compare between the incoming SOURCE XML and the 
> reference XML.
> 
> This is something that can not be captured by XSDs (or can it?). XSDs
> might end up generalizing the structure and allow validation 
> even when a
> certain number elements have disappeared and that breaks the MAPPING.
> Also, if we do an XML Diff since the content will essentially 
> have been
> updated we don't want a CONTENT-TO-CONTENT comparison (that 
> will always
> change). We want a STRUCTURE-to-STRUCTURE i.e. Absolute X-PATH to
> Absolute X-Path mapping validation.
> 
> Any ideas? How we could go about doing this? Please comment. 
> 
> Thanks,
> ____________________________________________________________
> 
> Abhishek Sanwal
> HP - Houston Campus
> ............................................................ 
> 
> 
> --+------------------------------------------------------------------
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail: <mailto:xsl-list-unsubscribe@xxxxxxxxxxxxxxxxxxxxxx>
> --+--
> 
> 



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.