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

RE: When to Validate XML?


how to validate xml format

> This is more like passing an Object and let each app coerce 
> to its local 
> type, and succeed if such coercion is possible (as per 
> generalization).
> 
> However, what if one of the apps want to be more precise, and 
> not want 
> to rely on wildcards? Can it not map the schema URI to a 
> locally defined 
>   (and more precise) schema?

Yes, as long as that schema uses derived types (or element substitution, but
that's a one-way proposition). The point is that type derivation gives you
some ability to customizing the schema for the local app. If data is to flow
bidirectionally, then the originating source has to react passively to
extended type information (restricted types are not an issue for the
originating source). So the original schema has control of the valuespaces
*for data items it knows about* and preserves and regurgitates additional
information for extended type instances it doesn't know about. If approach
is somehow unreasonable for the originating source, then it can finalize its
definitions, which prevents type derivations.

> 
> By this, I'm not advocating a magic and unknown world where 
> no App has 
> as idea of what's flowing through. I'm just debating the 
> possibility of 
> such "local" decisions. The same applies to constraints too.

I think we're in basic agreement, I'm just trying to clear up any
misunderstanding.

> An app may choose to validate what it is interested in and not worry 
> about the rest, still adhearing to a common schema. This is 
> fine, expect 
> when I consider change propagation. When the common schema 
> changes, each 
> app will have to update its schemas (can be painful, sometimes) even 
> though it may not really depend on the changes. 

There was a thread, either here or on xmlschema-dev, that talked about
versioning of XML Schemas. Actually, Patricia Walmsley wrote it up on
Costello's Best Practices website:

http://www.xfront.com/BestPracticesHomepage.html

If you're app can access version information, it should be able to make
intelligent choices about how it wants to handle new versions (reject,
process laxly, full validation). If one is really clever (not me!), one
could encode diff information (using XSLT?) in the data model itself, which
an app could use to translate new version data into an into the old version
format. 

Derived schema documents are not always going to be valid with new versions
of the base schema, though. Hmmmm....


> If I add data binding 
> (from this list, I see that data binding is gaining 
> popularity) to this, 
> I see more troubles. Now, with each change, each app will 
> have to update 
> its data binding classes (that is compile, build, test, stage, and 
> deploy) for each change. (Makes me wonder where the "X" in 
> the XML has 
> gone).

There's not computing problem that can't be solved by adding another layer
of indirection :-)

Really, though, this is not a new problem. First of all, binding code
generated from schemas is going to be low-level. Your app developers will
want classes that offer higher-level conceptual models of the data. So, if
you divorce the application from the generated code by a layer in between,
you localize the code that needs to be changed when new binding code is
generated.

Granted, that works for minor data model tweaks and extensions, not for
wholesale modifications of the metadata structure. You really have no
recourse than to rewrite your application in that case; but if you build
your house on a shaky foundation, well...

> 
> I don't know if these issues are realistic, and I'm looking for 
> experiences from other people in this group.

So am I! Let's see what happens...

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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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.