[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Design of XML so that it may be efficiently strea

Subject: Re: Design of XML so that it may be efficiently stream-processed
From: Piotr Bański <bansp@xxxxx>
Date: Fri, 22 Nov 2013 11:55:18 +0100
Re:  Design of XML so that it may be efficiently  strea
Call this Chinese design: no siblings...

Seriously, restrictions on depth in streaming don't mean a ban on the existence of sibling elements, do they, hence the claim about billion levels seems a bit off (?)

> the processing cannot utilize data from preceding or following nodes

In many cases, the processing simply doesn't need to use the sibling data, and that's the beauty of it, isn't it?

Best,

Piotr

On 11/22/2013 11:41 AM, Costello, Roger L. wrote:
Hi Folks,

Consider XSLT code to process a node in the XML tree.

The rules of streaming say that the processing cannot utilize data from preceding or following nodes. Further, the XSLT code can only access one child (one downward selection rule).

Given those restrictions, I am led to the following XML design.

For each node:

1. Use lots of attributes. Store in them the data needed for processing the node.

2. Have one child element only.

So, to enable efficient stream processing, design XML like this:

<root a="..." b="..." c="...">
       <node d="..." e="..." f="...">
             <node g="..." h="..." i="...">
                   <node j="..." k="..." l="...">
                         <node m="..." n="..." o="...">
                               <node p="..." q="..." r="...">
                                   ...
                              </node>
                         </node>
                   </node>
             </node>
       </node>
</root>

This results in a massively deep tree. For Gigabyte-sized XML files, the nesting could be a billion levels deep (or more).

Do you agree with this XML design?

/Roger

Current Thread

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