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)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: doronr, Assigned: doronr)

Details

(Keywords: fixed1.8.0.2, fixed1.8.1)

Attachments

(2 files)

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.
Attached patch patchSplinter Review
Attachment #193180 - Flags: superreview?(peterv)
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] patch going to check this in without review for time reason.
Attachment #193180 - Flags: superreview?(peterv)
checked into trunk
Status: NEW → ASSIGNED
Whiteboard: xf-to-branch
new patch checked in.
checked into 1.8.1
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
reopening since we need this on 1.8.0.x
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
fixed on 1.8.0.2
Status: REOPENED → RESOLVED
Closed: 19 years ago19 years ago
Keywords: fixed1.8.0.2
Resolution: --- → FIXED
Whiteboard: xf-to-branch
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: