Jump to content
Jesdisciple

Validation

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!

Share this post


Link to post
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.

Share this post


Link to post
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.)

Share this post


Link to post
Share on other sites

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>

Share this post


Link to post
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. :)

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...