[Home] [By Thread] [By Date] [Recent Entries]


"Rick Jelliffe" <ricko@a...> writes:

> From: "Dare Obasanjo" <dareo@m...>
> 
> > I do agree that mixed content is the  probably the most relevant 
> > differentiator between data-centric & document-centric uses of XML.
> 
> I think mixed content also entails some other things:
>   * a presumption that data and elements are ordered, 
>   * a presumption that tags delimit ranges within some larger text stream
>    rather than independent atoms of information.
> These presumptions then require some syntactic form for better
> representing information items that are not mutually ordered and do contain
> atoms rather than ranges: hence attribute syntax.

Not to contradict this observation, but I don't think XML attributes
are almost exclusively of value to docheads.

I find an excellent, language-level, round-trippable mapping between
XML attributes and relational ones. Note that the mapping to elements
is not nearly as good.

* Like SQL attributes, XML attributes are semantically unordered.
* SQL attribute names must be unique within a relation, XML attribute
  names must be unique in an element.
* SQL attributes can be NULLable; XML attributes can be #IMPLIED.
* Like SQL attributes, XML attributes have names and atomic values
  (SQL99 even has an (anti-1NF) array datatype to map to tokenized
  attributes).
* XML attributes on an element can be viewed as a relation named by
  that element and vice versa.

<PERSON NAME="K. Ari Krupnikov" EMAIL="ari@c..." READS="xml-dev"/>

INSERT INTO PERSON (NAME, EMAIL, READS)
        VALUES ("K. Ari Krupnikov", "ari@c...", "xml-dev")

Ari.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member