[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
Re: [xml-dev] Do Schema-code binding tools typically ignore user-defined simple types?
- From: Boris Kolpackov <boris@codesynthesis.com>
- To: xml-dev@lists.xml.org
- Date: Thu, 23 Oct 2008 15:06:03 +0200
Hi David,
Karr, David <david.karr@wamu.net> writes:
> In your experience with tools that generate code from XML schemas, do
> they typically respect, or ignore, user-defined simple types, like
> length restrictions on xsd:string?
To answer this we need to define more precisely what "ignore" means.
I think what you mean here is ignore for the purpose of validating XML
and/or object model.
There are several different modes in which validation can happen, the
most common are:
1. Validation during parsing of XML to the object model. I believe
most tools support this either directly in the generated code or
indirectly via a validating underlying XML parser. Our tools
support this mode using both approaches.
2. Immediate validation as the object model is modified. I believe
there is only a small subset of XML schema constructs that are
desirable to validate like this and also possible to implement
efficiently. For more information on why it is so refer to this
analysis:
http://www.codesynthesis.com/pipermail/xsd-users/2008-January/001443.html
3. On-demand validation of the object model. In this case the user
performs a bunch of modifications on the object model and then
requests a re-validation of the object model or its fragment.
4. Validation during serialization of the object model to XML. Again,
this can be implemented either directly in the generated code or
indirectly via a validating underlying XML serializer. Our tools
support the generated code approach. Also note that (3) can be
implemented in terms of (4) by using a "do nothing" underlying
XML serializer.
Boris
--
Boris Kolpackov, Code Synthesis Tools http://codesynthesis.com/~boris/blog
Open source XML data binding for C++: http://codesynthesis.com/products/xsd
Mobile/embedded validating XML parsing: http://codesynthesis.com/products/xsde
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]