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?
Comment on attachment 410098 [details] [diff] [review] patch Looks ok to me. Doron should probably review, too, though.
alex, could you check this into hg?
sure, landed - http://hg.mozilla.org/schema-validation/rev/710191b42011
Does this need to go into cvs trunk, too?
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.