Jesdisciple Posted March 8, 2008 Share Posted March 8, 2008 See http://www.w3.org/2001/03/webdata/xsv?docA...n&style=xsl I don't understand the errors... For example: http://error-logger.googlecode.com/files/e...ogger.xsd:11:6: Invalid per cvc-complex-type.1.3: undeclared attribute {None}:useIs it trying to validate my schema against my XML? Attribute "use" is defined in the schema of schemas, right?Thanks! Link to comment Share on other sites More sharing options...
boen_robot Posted March 8, 2008 Share Posted March 8, 2008 Your schema itself is invalid. As such, no XML can be validated against it before it becomes valid.The attribute "use" is not valid for xs:element. It's only for xs:attribute. For elements, you can use the minOccurs and maxOccurs attributes.In addition, I also notice that you have your xs:element elements inside a xs:complexType element. You can't do that. You need to use one of xs:all, xs:sequence, xs:choise, and then declare the elements inside that element. Link to comment Share on other sites More sharing options...
Jesdisciple Posted March 8, 2008 Author Share Posted March 8, 2008 New URL: http://www.w3.org/2001/03/webdata/xsv?docA...n&style=xsl This one gives me: http://error-logger.googlecode.com/svn/tru...logger.xsd:6:5: Invalid per cvc-complex-type.1.2.4: element {http://www.w3.org/2001/XMLSchema}:attribute not allowed here (1) in element {http://www.w3.org/2001/XMLSchema}:all, expecting [{http://www.w3.org/2001/XMLSchema}:annotation,$,{http://www.w3.org/2001/XMLSchema}:element]: Where am I supposed to put the attributes? (It doesn't say in the tutorial, that I can find.) Link to comment Share on other sites More sharing options...
Kahor Posted June 6, 2008 Share Posted June 6, 2008 Try this, the sequence can be replaced by "all" or "choice", if your elements contains no other elements but just attribute(s)s, then just delete everything between the sequence tags (<xs:sequence></xs:sequence> included).Everything is explained in this very website xml schema tutorial, feel free to read it. <xs:element name="example"> <xs:complexType> <xs:sequence> <xs:element ... ... </xs:sequence> <xs:attribute name="" type=""/> </xs:complexType></xs:element> Link to comment Share on other sites More sharing options...
Jesdisciple Posted June 6, 2008 Author Share Posted June 6, 2008 Thanks for the reply, Kahor, but you're a little late... I got that fixed with help from the W3C's schema mailing list. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.