OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: RE: [docbook-apps] What is Xml ?

|  -----Original Message-----
|  From: Kerry, Richard 
|  Please can someone direct me to an authoritative explanation 
|  of what constitutes a valid XML file ?
|  I've been provided with some "XML" files which are a bit like this :
|  <?xml?>
|  <category id="information">
|   <section id="general">
|    <element id="fileinfo" />
|   </section>
|  </category>
|  <category id="device">
|   <section id="Status">
|    <element id="1" />
|    <element id="2" />
|   </section>
|  </category>
|  They are described as "XML", together with a note that "... 
|  file can be created using any XML editor providing the 
|  format and tags required are used", though I get various 
|  errors from emacs+nxml-mode, XmlMind and Serna.
|  I think that they are not well-formed, on account of having 
|  two "root nodes".

That is right. The above is not XML. An XML document must have a single root

See http://www.w3.org/TR/xml/#sec-well-formed 

|  I'm also a bit surprised by the lack of the usual version, 
|  encoding and standalone attributes in the xml PI, though I 
|  suspect they are actually optional.

The XML declaration cannot be just <?xml?>. If present (it doesn't have to
be), the version must be given.

See http://www.w3.org/TR/xml/#sec-prolog-dtd (production 23).

|  And I've just found that it starts with (hex) ef bb bf, 
|  before the "<?" - is that a byte-order mark ?  Or just 
|  another non-standardness ?

That is a byte order mark (BOM) encoded in UTF-8. 



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]