Michael Rys

Musings on XML, XQuery and more...

<December 2008>
SuMoTuWeThFrSa
30123456
78910111213
14151617181920
21222324252627
28293031123
45678910


Navigation

Papers

SQL Server XML Whitepapers

Weblogging Links

MS Bloggers

Recommended Books

Other Blogs

Recommended Links

Presentations (Upcoming)

Presentations (Recent)

Subscriptions

News


Upcoming Presentations


TechEd 2007, Orlando, June 4 to June 8, 2007


Books I co-authored



www.flickr.com
This is a Flickr badge showing public photos from Michael Rys. Make your own badge here.
eXTReMe Tracker

Post Categories

Article Categories



What to call a conforming instance of an XML datatype

In my series on potential areas of confusions, let me cover one that has more do to with terminological correctness: What is the term for a valid instance of an XML datatype that is not constrained by an XML Schema collection?

Many writers that I have read over the last couple of weeks used the term “well-formed” (and I would not be surprised if we used the same term in some of our own literature). The term “well-formed” is an important term in XML 1.0:

2.1 Well-Formed XML Documents

[Definition: A textual object is a well-formed XML document if:]

  1. Taken as a whole, it matches the production labeled document.

  2. It meets all the well-formedness constraints given in this specification.

  3. Each of the parsed entities which is referenced directly or indirectly within the document is well-formed.

Document

[1]    document    ::=    prolog element Misc*

Matching the document production implies that:

  1. It contains one or more elements.

  2. [Definition: There is exactly one element, called the root, or document element, no part of which appears in the content of any other element.] For all other elements, if the start-tag is in the content of another element, the end-tag is in the content of the same element. More simply stated, the elements, delimited by start- and end-tags, nest properly within each other.

However, an XML datatype according to the ISO SQL-2003 standard allows any valid element content at the top. Basically it can match:

XML datatype ::= prolog  content

Obviously, this allows instances that are not well-formed according to the definition above (such as top-level text nodes, zero or more than 1 top-level element). So what should we call such XML fragments?

Some terms that I have heard and used myself over times are:

1. XML fragment
2. well-balanced XML
3. well-balanced XML fragment
4. XML content
5. XML datatype instance

Now 5 is a no-brainer, but then it is tautological :-).

Please feel free to express your preference and propose your own terms.

posted on Monday, May 10, 2004 8:12 PM by mrys


# Take Outs for 11 May 2004 @ Tuesday, May 11, 2004 9:39 PM

Take Outs for 11 May 2004

mrys

# Posts on XML: Values, Uses and Future @ Wednesday, June 09, 2004 12:06 AM

mrys




Powered by Dot Net Junkies, by Telligent Systems