Jump to content

Validation


Jesdisciple

Recommended Posts

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}:use
Is 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

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

New URL: http://www.w3.org/2001/03/webdata/xsv?docA...n&style=xsl This one gives me:

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

  • 2 months later...

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...