XML.orgXML.org
FOCUS AREAS |XML-DEV |XML.org DAILY NEWSLINK |REGISTRY |RESOURCES |ABOUT
OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]
Re: Fwd: [xml-dev] Not using mixed content? Then don't use XML

> I've used XML schemata (DTDs and XSDs) for many years and they have served
> me very well.  Their use has helped me avoid many traps in data that I
> generate and in data that I accept from others, and they have amply paid for
> their use repeatedly.

One issue I still haven't found a good solution or answer to is when
you have additional 'business rules' validation performed by the
application:

- application parses the xml and validates it using the xsd

- the application then performs some additional validation of 'business rules'

This has the following problem:

- the xsd alone isn't sufficient for a 3rd party to check the xml will
parse successfully

Do you then:

- move all the business rules into the XSD ?

or

- provide 3rd parties with the parsing side of your app, so they can
verify the xml using that ?

If you add all the business rules to the XSD, you then leave the 3rd
party to decipher cryptic xsd failure messages- cvc-complexType
anyone?  The 3rd party would much prefer some human readable docs,
rather than learn XSD.

Then, do you just expect the xml to be correct in your application, or
do you still perform the business rule checks?  The reality of the
situation is you have to perform the checks again, so then you open
yourself up to a mismatch between xsd and application.  You would of
course much prefer to provide the user with tailored errors messages,
they would prefer that too.

How do members of the list handle this situation?

cheers

-- 
Andrew Welch
http://andrewjwelch.com


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 1993-2007 XML.org. This site is hosted by OASIS