wchknight Posted July 5, 2007 Share Posted July 5, 2007 Hi, I ve created an xHtml wif Xforms, so upon submiting the form, I nid to check it with my xsd before it eventually pass it to the xml file.However, it seems tht it doesnt check with the xsd and still pass it to the xml file even thought it is wrong data type.Maybe somehow I misunderstood the codes or some mistakes I haf made, hope someone can correct me.Thxbelow are my codes:The xhtml file <xf:model Schema="testing.xsd"> <xf:instance src="testing.xml"> <data> <to/> </data> </xf:instance> <xf:submission id="form1" action="testing2.xml" method="put"/> </xf:model> XSD file <?xml version="1.0"?><xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"><xs:element name="data"> <xs:complexType> <xs:sequence> <xs:element name="to" type="xs:integer"/> </xs:sequence> </xs:complexType></xs:element></xs:schema> Link to comment Share on other sites More sharing options...
boen_robot Posted July 5, 2007 Share Posted July 5, 2007 I fell into this trap once too.It seems attached XML schemas can only validate simple types... or maybe complex ones too. Not sure about that. Still, it doesn't validate the whole structure of the submitted XML, but only the types of the controls being filled. Read more about it on W3C's tutorial on XForms for HTML authors. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.