Closed
Bug 526376
Opened 16 years ago
Closed 16 years ago
schema-validation: validate complex types with simpleContent
Categories
(Core Graveyard :: XForms, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: imphil, Assigned: imphil)
Details
Attachments
(2 files)
Binding to a node with such a schema will currently result in no schema validation:
<xsd:element name="Testelement">
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:integer">
<xsd:attribute name="checked" type="xsd:boolean"/>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
The attached patch fixes that (and only that) case, where we only extend the element with attributes, and don't restrict the node content itself.
The latter problem would require probably major changes in the way schema-validation passes type information to xforms. Currently this is done by attaching the schema type to the instance node. This is probably not possible with complex types (bug 349810 is about that)?
I know the patch doesn't solve the problem entirely, but at least it makes the current code work a bit better without completely rethinking the interaction between xforms and schema-validation. And it solves my problem for now ;-)
Doron, Aaron, et al.: any ideas on how to accomplish this?
| Assignee | ||
Comment 1•16 years ago
|
||
| Assignee | ||
Comment 2•16 years ago
|
||
| Assignee | ||
Updated•16 years ago
|
Attachment #410098 -
Flags: review?(aaronr)
Comment on attachment 410098 [details] [diff] [review]
patch
Looks ok to me. Doron should probably review, too, though.
Attachment #410098 -
Flags: review?(aaronr) → review+
| Assignee | ||
Updated•16 years ago
|
Attachment #410098 -
Flags: review?(doronr)
Updated•16 years ago
|
Attachment #410098 -
Flags: review?(doronr) → review+
| Assignee | ||
Comment 4•16 years ago
|
||
alex, could you check this into hg?
Comment 5•16 years ago
|
||
sure, landed - http://hg.mozilla.org/schema-validation/rev/710191b42011
Assignee: nobody → mail
Status: ASSIGNED → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
| Assignee | ||
Comment 7•16 years ago
|
||
I didn't test it on 1.9.0, but it shouldn't cause any problems. It seems Mozilla wants continue to support Firefox 3.0 for at least some more months, so yes, get it on cvs trunk.
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
•