Jump to content

sancho2

Members
  • Posts

    4
  • Joined

  • Last visited

sancho2's Achievements

Newbie

Newbie (1/7)

0

Reputation

  1. The other online validator I tried is http://codebeautify.org/xmlvalidator I now see that it isn't complaining about an invalid declaration, but it is complaining about 'xml' being the first letters in a processing instruction. And that goes back to 'xml' being reserved. (After reading more of the W3C Recommendation) Isn't it the case that 'xml' is reserved but only for processing instructions? If that is the case then the W3Schools page on xml tag name rules has got it completely wrong (regarding point 3). And Firefox (Expat Parser) is either mis-handling the processing statement validation or deliberately ignoring this rule. I realize this issue is of little importance. I am just trying to better understand what is correct. If you were writing an XML Parser would you: A. Allow the letters 'xml' to preface either processing instructions or tag names. B. Invalidate only processing instructions prefaced with the letters 'xml' (allow them for tag names). C. Other Again, I thank you for your time answering my questions.
  2. Thanks for the links by the way. I have another question with regards to the declaration. The w3schools validator is accepting declarations that begin with <?xml but will also accept any valid tag character after xml. For example the validator accepts <?xmlstu12345 version="1.0" encoding="UTF-8"?> as a valid declaration. Another online validator shows the obvious error. This is how it is described on the W3C Recommendation page you linked.: XMLDecl ::= '<?xml'
  3. Fair enough. I would only recommend updating the second page I linked as it quite clearly states that element names must follow the naming rules and number 3 is this:
  4. The xml validator located here: http://www.w3schools.com/xml/xml_validator.asp is accepting tags beginning with 'xml'. For example the tag <xml /> is accepted as valid. According to this page: http://www.w3schools.com/xml/xml_elements.asp xml elements cannot begin with those 3 characters.
×
×
  • Create New...