Last Comment Bug 305096 - Schema Validation does not handle inheritance of simple types
: Schema Validation does not handle inheritance of simple types
: fixed1.8.0.2, fixed1.8.1
Product: Core Graveyard
Classification: Graveyard
Component: XForms (show other bugs)
: Trunk
: x86 All
-- normal (vote)
: ---
Assigned To: Doron Rosenberg (IBM)
: Stephen Pride
Depends on:
  Show dependency treegraph
Reported: 2005-08-18 07:33 PDT by Doron Rosenberg (IBM)
Modified: 2016-07-15 14:46 PDT (History)
2 users (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---

patch (52.13 KB, patch)
2005-08-19 10:55 PDT, Doron Rosenberg (IBM)
no flags Details | Diff | Splinter Review
patch that doesn't break :) (52.62 KB, patch)
2006-01-27 15:00 PST, Doron Rosenberg (IBM)
no flags Details | Diff | Splinter Review

Description User image Doron Rosenberg (IBM) 2005-08-18 07:33:53 PDT
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
inherited type.


I added a nsSchemaDerivedSimpleType struct, which contains all possible facets
and a baseType member.  nsSchemaDerivedSimpleType gets passed around when needed
and added to.
Comment 1 User image Doron Rosenberg (IBM) 2005-08-19 10:55:05 PDT
Created attachment 193180 [details] [diff] [review]
Comment 2 User image Doron Rosenberg (IBM) 2005-10-07 11:42:43 PDT
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 3 User image Doron Rosenberg (IBM) 2006-01-25 08:38:45 PST
Comment on attachment 193180 [details] [diff] [review]

going to check this in without review for time reason.
Comment 4 User image Doron Rosenberg (IBM) 2006-01-26 12:53:53 PST
checked into trunk
Comment 5 User image Doron Rosenberg (IBM) 2006-01-27 15:00:43 PST
Created attachment 209905 [details] [diff] [review]
patch that doesn't break :)
Comment 6 User image Doron Rosenberg (IBM) 2006-01-31 12:45:30 PST
new patch checked in.
Comment 7 User image Doron Rosenberg (IBM) 2006-02-15 11:03:21 PST
checked into 1.8.1
Comment 8 User image Doron Rosenberg (IBM) 2006-02-16 11:49:28 PST
reopening since we need this on 1.8.0.x
Comment 9 User image Doron Rosenberg (IBM) 2006-02-24 12:57:55 PST
fixed on

Note You need to log in before you can comment on or make changes to this bug.