Currently, the code assumes that schema simpletypes inherit from builtin types.
So xsd:restriction and unions/lists can only inherit from builtin types right now.
So for example, type Foo may restrict type Bar (say with an enumeration), which
itself restricts xsd:string. So to validate against Foo, we need to walk the
inheritance tree until we find something that isn't a restriction (builtin or
union/list). As we walk, we store the restriction facets, making sure that once
we find a facet, we don't overwrite it with the same facet defined on an
I added a nsSchemaDerivedSimpleType struct, which contains all possible facets
and a baseType member. nsSchemaDerivedSimpleType gets passed around when needed
and added to.
Created attachment 193180 [details] [diff] [review]
peterv: could you take a look at this anytime soon? We'd like this in 1.8,
since complex types won't make it I assume (too big of a patch).
I've verified it passes my testsuite and all, so no regressions.
Comment on attachment 193180 [details] [diff] [review]
going to check this in without review for time reason.
checked into trunk
Created attachment 209905 [details] [diff] [review]
patch that doesn't break :)
new patch checked in.
checked into 1.8.1
reopening since we need this on 1.8.0.x
fixed on 126.96.36.199