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

RE: XMl - DTD and Table Definition

  • From: Kay Michael <Michael.Kay@i...>
  • To: "'dietmar.loder@n...'" <dietmar.loder@n...>, xml-dev@i...
  • Date: Mon, 14 Jun 1999 13:50:00 +0100

dtd format
> I am in the area of XML! Now I have to export and import 
> large databases via XML-format. This data are structured in typical 
> master-detail relations (1 master have approximatly 15 to 25 details
records, one 
> exportfile have 30000 - 500000 master elements).
> If I write the details records like the standard XML format, shown in 
> serveral books and samples via www, I waste a lot of space 
> for Start-End-Tag's.  To minimize the filesize, I decide to use the
<table><th><td> 
> syntax.

The "standard" format you refer to (presumably something like
<BOOKS><BOOK><AUTHOR>Shakespeare</AUTHOR><TITLE>Hamlet</TITLE></BOOK></BOOKS
>)
is not a standard at all, it is merely a convention that many people use.

If space is a concern (and with big databases it certainly is) there are
several other approaches possible:
1. Compress the file using a standard compression utility.
2. Use shorter tags ( e.g. <A> for <AUTHOR> )
3. Identify columns by position rather than by name, for example:
<BOOKS COLUMNS="AUTHOR TITLE">
<R><C>Shakespeare</C><C>Hamlet</C></R>
This is similar to using TABLE & TD as you suggest (but shorter). You need
to think about how to represent null values, though: and if there are very
many nulls, you can end up using more space than with the named columns
approach.
4. If space is really tight you could even shorten the above to:
<R>Shakespeare<S/>Hamlet</R>
(where the empty tag <S/> acts as a separator); but you're starting to make
it more difficult to parse, eliminating the benefits of using XML in the
first place.
  
> Questions:
> 
> Is this allowed in a "well-formed" XML document?
Yes, you can use tags to mean anything you like so long as they are properly
nested.

Mike Kay

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 (un)subscribe, mailto:majordomo@i... the following message;
(un)subscribe 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-2013 All Rights Reserved.