[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...?


relational xml
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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.