Open main menu
Home
Random
Recent changes
Special pages
Community portal
Preferences
About Wikipedia
Disclaimers
Incubator escapee wiki
Search
User menu
Talk
Dark mode
Contributions
Create account
Log in
Editing
XML
(section)
Warning:
You are not logged in. Your IP address will be publicly visible if you make any edits. If you
log in
or
create an account
, your edits will be attributed to your username, along with other benefits.
Anti-spam check. Do
not
fill this in!
== Syntactical correctness and error-handling == {{Main|Well-formed document}} The XML specification defines an XML document as a [[Well-formed element|well-formed]] text, meaning that it satisfies a list of syntax rules provided in the specification. Some key points include: * The document contains only properly encoded legal Unicode characters. * None of the special syntax characters such as <code><</code> and <code>&</code> appear except when performing their markup-delineation roles. * The start-tag, end-tag, and empty-element tag that delimit elements are correctly nested, with [[tag omission|none missing]] and none overlapping. * Tag names are case-sensitive; the start-tag and end-tag must match exactly. * Tag names cannot contain any of the characters <code>!"#$%&'()*+,/;<=>?@[\]^`{|}~</code>, nor a space character, and cannot begin with "-", ".", or a numeric digit. * A single root element contains all the other elements. The definition of an XML document excludes texts that contain violations of well-formedness rules; they are simply not XML. An XML processor that encounters such a violation is required to report such errors and to cease normal processing.<ref name="quovadis">{{cite conference|first=Maik|last=Stührenberg|date=February 2013|title=Quo vadis XML? History and possible future directions of the Extensible Markup Language|conference=XML Prague 2013|location=Prague|isbn=978-80-260-3872-6|pages=141–162|conference-url=https://archive.xmlprague.cz/2012/files/xmlprague-2012-proceedings.pdf}}</ref><ref name="bray 2005">{{cite journal|first=Jim|last=Gray|date=1 February 2005|title=A Conversation with Tim Bray: Searching for ways to tame the world's vast stores of information|journal=Queue|volume=3|number=1|pages=20–25|doi=10.1145/1046931.1046941|doi-access=free|s2cid=23502115}}</ref> This policy, occasionally referred to as "[[Draco (lawgiver)|draconian]] error handling", stands in notable contrast to the behavior of programs that process [[HTML]], which are designed to produce a reasonable result even in the presence of severe markup errors.<ref>{{cite book|first=Mark|last=Pilgrim|date=6 August 2010|title=HTML5: Up and Running: Dive into the Future of Web Development|url=https://books.google.com/books?id=Mk3sW0on7OAC|publisher=O'Reilly|isbn=978-1-4493-9966-5|page=10}}</ref> XML's policy in this area has been criticized as a violation of [[Postel's law]] ("Be conservative in what you send; be liberal in what you accept").<ref>{{cite web|url=http://diveintomark.org/archives/2004/01/08/postels-law|archive-url=https://web.archive.org/web/20110514120305/http://diveintomark.org/archives/2004/01/08/postels-law|archive-date=2011-05-14|title=There are No Exceptions to Postel's Law [dive into mark]|website=DiveIntoMark.org|access-date=22 April 2013}}</ref> The XML specification defines a [[XML validation|valid XML document]] as a [[well-formed XML document]] which also conforms to the rules of a [[Document Type Definition]] (DTD).{{sfnp|Harold|Means|2002|p=29}}
Edit summary
(Briefly describe your changes)
By publishing changes, you agree to the
Terms of Use
, and you irrevocably agree to release your contribution under the
CC BY-SA 4.0 License
and the
GFDL
. You agree that a hyperlink or URL is sufficient attribution under the Creative Commons license.
Cancel
Editing help
(opens in new window)