Validome-Logo

HTML / XHTML / WML / XML Validator

 
Validome - Validator Home de | en
Validome-Logo

Error in the XML-Declaration

The validation of the XML-Declaration will be done on the basis of the official W3C Specification.

  Validome W3C-Validator WDG-Validator Total-Validator Site Valet-Validator

HTTP-Header:
Content-Type: application/xhtml+xml; charset=ISO-8859-1

  1: <?xml version="1.0" encoding="ISO-8859-1"?>
  2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3:     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4: 
  5: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
  6:   <head>
  7:     <title>no error</title>
  8:   </head>
  9:   <body />
 10: </html>

There is no Error.

  Validome W3C-Validator WDG-Validator Total-Validator Site Valet-Validator

HTTP-Header:
Content-Type: application/xhtml+xml; charset=ISO-8859-1

  1: <?xml 
  2:     version =
  3:   "1.0" 
  4:  encoding
  5:  =
  6:  "ISO-8859-1"
  7:  ?>
  8: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  9:     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 10: 
 11: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
 12:   <head>
 13:     <title>no error</title>
 14:   </head>
 15:   <body />
 16: </html>

White Spaces (blank, return, line feed or tabulator) are allowed between Attributes, so if there are some in the XML-Declaration, no Error message may be displayed.

  Validome W3C-Validator WDG-Validator Total-Validator Site Valet-Validator

HTTP-Header:
Content-Type: application/xml; charset=UTF-8

  1: <!DOCTYPE root [
  2:   <!ELEMENT foo EMPTY>
  3:   <!ELEMENT root (foo)>
  4: ]>
  5: <root>
  6:  <foo/>
  7: </root>

XML-Declarations in XML-documents are not mandatory.

  Validome W3C-Validator WDG-Validator Total-Validator Site Valet-Validator

HTTP-Header:
Content-Type: application/xhtml+xml; charset=ISO-8859-1

  1:   <?xml version="1.0" encoding="ISO-8859-1"?>
  2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3:     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4: 
  5: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
  6:   <head>
  7:     <title>XML-Declaration is not at the document beginning</title>
  8:   </head>
  9:   <body />
 10: </html>

The XML-Declaration has to start at the beginning of the Document (Specification 2)

  Validome W3C-Validator WDG-Validator Total-Validator Site Valet-Validator

HTTP-Header:
Content-Type: application/xhtml+xml; charset=ISO-8859-1

  1: <?xml verzion="1.0" encoding="ISO-8859-1"?>
  2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3:    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4: 
  5: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
  6:   <head>
  7:     <title>syntax error</title>
  8:   </head>
  9:   <body />
 10: </html>

Naturally, the Syntax of the XML-Declaration should also be validated.

  Validome W3C-Validator WDG-Validator Total-Validator Site Valet-Validator

HTTP-Header:
Content-Type: application/xhtml+xml; charset=ISO-8859-1

  1: <?xml version="#" encoding="ISO-8859-1"?>
  2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3:     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4: 
  5: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
  6:   <head>
  7:     <title>illegal xml version</title>
  8:   </head>
  9:   <body />
 10: </html>

The version designation allowes just latin characters (a-z, A-Z), numeric characters (0-9) and the special characters ".", "-", ":" and "_".

  Validome W3C-Validator WDG-Validator Total-Validator Site Valet-Validator

HTTP-Header:
Content-Type: application/xhtml+xml; charset=ISO-8859-1

  1: <?xml version="a:Z-._0" encoding="ISO-8859-1"?>
  2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3:     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4: 
  5: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
  6:   <head>
  7:     <title>illegal xml version</title>
  8:   </head>
  9:   <body />
 10: </html>

The syntax of this version designation "a:Z-._0" is right, but the meaning of it is totally stupid.
At the moment only XML version 1.0 exists, but the version designation has to be validated, so that future XML-Versions can be valitated according to the right DTD or scheme.

  Validome W3C-Validator WDG-Validator Total-Validator Site Valet-Validator

HTTP-Header:
Content-Type: application/xhtml+xml; charset=ISO-8859-1

  1: <?xml version="" encoding="ISO-8859-1"?>
  2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3:     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4: 
  5: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
  6:   <head>
  7:     <title>missing XML-Version</title>
  8:   </head>
  9:   <body />
 10: </html>

A version designation has to exist.

  Validome W3C-Validator WDG-Validator Total-Validator Site Valet-Validator

HTTP-Header:
Content-Type: application/xhtml+xml; charset=ISO-8859-1

  1: <?xml version="1.0" encoding="#"?>
  2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3:     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4: 
  5: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
  6:   <head>
  7:     <title>illegal charset</title>
  8:   </head>
  9:   <body />
 10: </html>

The name of a charset encoding has to start with latin characters (a-z, A-Z).
The following characters may be latin characters (a-z, A-Z), numeric characters (0-9) or the special characters ".", "-", "_".

  Validome W3C-Validator WDG-Validator Total-Validator Site Valet-Validator

HTTP-Header:
Content-Type: application/xhtml+xml; charset=ISO-8859-1

  1: <?xml version="1.0" encoding="9ISO-8859-1"?>
  2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3:     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4: 
  5: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
  6:   <head>
  7:     <title>illegal charset 2</title>
  8:   </head>
  9:   <body />
 10: </html>

Also this charset encoding statement is invalid.

  Validome W3C-Validator WDG-Validator Total-Validator Site Valet-Validator

HTTP-Header:
Content-Type: application/xhtml+xml

  1: <?xml version="1.0" encoding="UTF-99"?>
  2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3:     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4: 
  5: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
  6:   <head>
  7:     <title>unknown charset</title>
  8:   </head>
  9:   <body />
 10: </html>

If the charset encoding statement in the XML-Declaration is syntactically right, but unknown, this also has to be reported.

  Validome W3C-Validator WDG-Validator Total-Validator Site Valet-Validator

HTTP-Header:
Content-Type: application/xhtml+xml; charset=ISO-8859-1

  1: <?xml version="1.0" encoding="ISO-8859-1" lang="de"?>
  2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3:     "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4: 
  5: <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="de" lang="de">
  6:   <head>
  7:     <title>syntax error</title>
  8:   </head>
  9:   <body />
 10: </html>

Arbitrary Attributes are not allowed in the XML-Declaration.
So those ones have to be reported.

  Validome W3C-Validator WDG-Validator Total-Validator Site Valet-Validator

HTTP-Header:
Content-Type: application/xhtml+xml; charset=ISO-8859-1

  1: <?xml version="1.0" encoding="ISO-8859-1"?>
  2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3:    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4: 
  5: <html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de">
  6:   <head>
  7:     <title>to many XML-declarations</title>
  8:   </head>
  9:   <body>
 10:     <?xml version="1.0" encoding="ISO-8859-1"?>
 11:   </body>
 12: </html>

The XML-Declaration may not be defined more often, than once per document.

  Validome W3C-Validator WDG-Validator Total-Validator Site Valet-Validator

HTTP-Header:
Content-Type: application/xhtml+xml; charset=ISO-8859-1

  1: <?xml version="1.0" encoding="ISO-8859-1" standalone="foo"?>
  2: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
  3:   "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4: 
  5: <html xmlns="http://www.w3.org/1999/xhtml" lang="de" xml:lang="de">
  6:  <head>
  7:    <title>illegal standalone-value</title>
  8:  </head>
  9:  <body />
 10: </html>

In standalone attribute there are only 'yes' or 'no' allowed.

Top   v2.6.9 - 24.4.2008 © validome.org - all rights reserved Datenschutzerklärung

Valid XHTML 1.0