|
[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Tree v. Table - A relational XML object model...?
At 6:31 AM -0500 2/27/03, John Cowan wrote:
>Most of those things aren't represented in SAX anyway. But what this model
>(which I otherwise like very much) absolutely boots on is mixed content:
>it simply can't represent it at all, and an incoming document with mixed
>content has to be rejected altogether.
>
Does it really? It seems to fit pretty nicely to me. For example,
<doc>This is <strong>very</strong> important.</doc>
Is stored as
1, 1, ELEMENT, "", doc, null
2, 2, PCDATA, "", null, "This is"
3, 2, ELEMENT, "", strong, null
4, 3, PCDATA, "", null, "very"
5, 2, ELEMENT, "", strong, null
6, 2, PCDATA, null, null, " important.
Whether this is useful or not I don't know, and it's not obvious how
attributes fit in. Probably another table.
You could use XPath values instead of DOM values. I think those are
more useful. And you could store either the element name or the
PCDATA content in a single field depending on node type. (Does that
violate normalization? I don't know, but probably. )
--
+-----------------------+------------------------+-------------------+
| Elliotte Rusty Harold | elharo@m... | Writer/Programmer |
+-----------------------+------------------------+-------------------+
| Processing XML with Java (Addison-Wesley, 2002) |
| http://www.cafeconleche.org/books/xmljava |
| http://www.amazon.com/exec/obidos/ISBN%3D0201771861/cafeaulaitA |
+----------------------------------+---------------------------------+
| Read Cafe au Lait for Java News: http://www.cafeaulait.org/ |
| Read Cafe con Leche for XML News: http://www.cafeconleche.org/ |
+----------------------------------+---------------------------------+
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|
|||||||||

Cart








