Jump to content

sancho2

Members
  • Posts

    4
  • Joined

  • Last visited

Posts posted by sancho2

  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'

×
×
  • Create New...