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

Re: Appending to an XML document

  • From: uche.ogbuji@f...
  • To: "Ingo Macherius" <macherius@d...>, Larry Watanabe <LWatanab@J...>
  • Date: Fri, 10 Dec 1999 09:57:00 -0700

nam sybillam
> using entities of any kind does not change the underlying data model. 
> It's syntactic shugar, nothing more. The root of the problem (and a 
> great help in other cases) is indeed the fact that any XML 1.0 
> document must have a single root.

>From what I know of your problem, it seems as if you are the one who is 
confusing implementation issues with the underlying data model.

If I were faced with the same problem, my solution would be very simple.

The schema (your "underlying data model") for my XML logging document would be 
as follows:

<!ELEMENT log (entry*)>
<!ELEMENT entry (#PCDATA)>

My low-level logging code (where efficiency counts more than schematics) would 
manage a disk file in the form

<entry>Nam Sybillam quidem Cumis ego oculis meis vidi in ampulla 
pendere</entry>
<entry>Pueris respondebat "Volo perire"</entry>

And appending is as efficient as you please.  Let us say this disk file was 
"/var/log/classic.log"

The rest of the world (which is expecting an XML: document) would access the 
logs through the following

<?xml version="1.0">
<!DOCTYPE log [<!ENTITY lf SYSTEM "file:/var/log/classic.log">]>
<log>&lf;</log>

And ta-da!  We've satisfied both our efficiency and semantic concerns using 
XML 1.0.

So where is the problem?


-- 
Uche Ogbuji
FourThought LLC, IT Consultants
uche.ogbuji@f...	(970)481-0805
Software engineering, project management, Intranets and Extranets
http://FourThought.com		http://OpenTechnology.org



xml-dev: A list for W3C XML Developers. To post, mailto:xml-dev@i...
Archived as: http://www.lists.ic.ac.uk/hypermail/xml-dev/ and on CD-ROM/ISBN 981-02-3594-1
To unsubscribe, mailto:majordomo@i... the following message;
unsubscribe xml-dev
To subscribe to the digests, mailto:majordomo@i... the following message;
subscribe xml-dev-digest
List coordinator, Henry Rzepa (mailto:rzepa@i...)



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-2011 All Rights Reserved.