Jump to content
akwky

XML schema "all" element example is wrong

Recommended Posts

Hi all, please pardon me if i post to wrong section (it took me 3 days to even gain access this site).

In your xsd tutorial, the Example 2 description is plain wrong, and it is confusing people. The faulty page is here: https://www.w3schools.com/xml/el_all.asp The error must be there for a long time, it even has its own post on stackoverflow https://stackoverflow.com/questions/5677154/how-do-i-make-items-optional-in-xsall

Quote: "The example above indicates that the "firstname" and the "lastname" elements can appear in any order and each element CAN appear zero or one time!"

To allow each subelement to be missing, the minOccurs attribute must be put to the subelements, not the xs:all itself.

Please fix the embarassing error. :-)

Share this post


Link to post
Share on other sites

Unfortunately this site has no connection with the administrators of w3shools.com, posting this error here, won't  receive any attention to fix this error, but I suggest you go to 'About' page on W3schools.com then at bottom of page, click report error link.

  • Thanks 1

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...