xml-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "David Bau" <David....@bea.com>
Subject RE: XML Beans details
Date Thu, 03 Jul 2003 22:30:04 GMT
On Thursday, July 03, 2003 5:23 PM, Neil Graham <neilg@ca.ibm.com> writes:
>
> How does this approach handle things like the schema unique particle
> attribution or element declarations consistent constraints?  
> Clearly you
> could parse schema documents simply using information from the
> schema-for-schemas, but using that alone, surely it's not possible to
> handle all conditions imposed on valid schemas by that spec.

Ah, Neil, you're a man in the trenches with Schema along with me!

Briefly here, not to bore everybody with the details.

The current schema for schema posted by w3c is _almost_ good
enough to use without special treatment.  But not perfectly.
There are three issues we had with it:

(1) The most serious is that the schema is not valid according
to the particle valid (restriction) rule, so it simply doesn't
compile [unless you use our -nopvr switch].  This is a known
problem - let me dig out the email - link here:

http://lists.w3.org/Archives/Member/w3c-xml-schema-ig/2002Feb/0027.html

basically in the w3c the issue seems to have been left as
"somebody just needs to fix the schema for schema" but the official
posted s4s hasn't been updated to reflect this fact yet.
So when we bootstrap with s4s we use a very-slightly-modified
schema-for-schema that adjusts it, following Henry Thompson's
suggestion in his proposal linked above.

(2) The schema for schema redefines builtin types that are
supposed to be built-in.  Sort of like trying to define "int" in
Java - it's not legal in a normal schema.  So we basically
special-case this situation in the compiler and ignore those
definitions when compiling s4s.

(3) S4s also hasn't been updated according to the errata that
has to do with permitting whitespace in XPaths.  So we removed
the erroneous regular expressions from our bootstrapping S4S and
deal validation of xpath syntax in our code.

Other than that, things worked great.

Relying on s4s has been a huge timesaver. Having schema
validation and automated binding from an authoritative
xsd file is really quite useful, just like us XML-heads
have been telling people all along!


David Bau
XML Bean Architect


---------------------------------------------------------------------
In case of troubles, e-mail:     webmaster@xml.apache.org
To unsubscribe, e-mail:          general-unsubscribe@xml.apache.org
For additional commands, e-mail: general-help@xml.apache.org


Mime
View raw message