Closed
Bug 305096
Opened 19 years ago
Closed 19 years ago
Schema Validation does not handle inheritance of simple types
Categories
(Core Graveyard :: XForms, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: doronr, Assigned: doronr)
Details
(Keywords: fixed1.8.0.2, fixed1.8.1)
Attachments
(2 files)
52.13 KB,
patch
|
Details | Diff | Splinter Review | |
52.62 KB,
patch
|
Details | Diff | Splinter Review |
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.
Solution:
I added a nsSchemaDerivedSimpleType struct, which contains all possible facets
and a baseType member. nsSchemaDerivedSimpleType gets passed around when needed
and added to.
Assignee | ||
Comment 1•19 years ago
|
||
Attachment #193180 -
Flags: superreview?(peterv)
Assignee | ||
Comment 2•19 years ago
|
||
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.
Assignee | ||
Comment 3•19 years ago
|
||
Comment on attachment 193180 [details] [diff] [review]
patch
going to check this in without review for time reason.
Attachment #193180 -
Flags: superreview?(peterv)
Assignee | ||
Comment 5•19 years ago
|
||
Assignee | ||
Comment 6•19 years ago
|
||
new patch checked in.
Assignee | ||
Comment 7•19 years ago
|
||
checked into 1.8.1
Assignee | ||
Comment 8•19 years ago
|
||
reopening since we need this on 1.8.0.x
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 9•19 years ago
|
||
fixed on 1.8.0.2
Status: REOPENED → RESOLVED
Closed: 19 years ago → 19 years ago
Keywords: fixed1.8.0.2
Resolution: --- → FIXED
Updated•9 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•