OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   Re: [xml-dev] XML structure. Need advice...

[ Lists Home | Date Index | Thread Index ]
  • To: xml-dev@lists.xml.org
  • Subject: Re: [xml-dev] XML structure. Need advice...
  • From: "Thomas B. Passin" <tpassin@comcast.net>
  • Date: Thu, 01 Apr 2004 00:42:50 -0500
  • In-reply-to: <406BA53D.6080803@splashmedia.co.nz>
  • References: <406BA53D.6080803@splashmedia.co.nz>
  • User-agent: Mozilla Thunderbird 0.5 (Windows/20040207)

Jaepil Kim wrote:

> 
> I m trying to build a word processor like Windows application.
> 
> One of the main features of this application is AutoSave. In hope of 
> reducing the time taken for the AutoSave, i was planning to save only 
> the modified sections.
> 
> So I structured my XML files like below.
> 
> //----------------------------------------------
> 
> Page01.xml
> <page id=”3464” modified_date=”2004/04/01”>
>   <block id=”213”>
>     <p>P4567.xml</p>
>     <p>P2345.xml</p>
>     <p>P6734.xml</p>
>   </block>
>   <block id=”156”>
>     <p>P4567.xml</p>
>     <p>P2345.xml</p>
>     <p>P6734.xml</p>
>   </block>
> </page>
> //----------------------------------------------
> 

I think it would be a huge mistake to structure files based on pages. 
That is because the page a bit of text is on depends greatly on the 
styling, margins, line break algorithm, etc.  Any change would be 
devastating.

You may want something like a change log or transaction file.  You would 
record all changes, as you might do for Undo capability.  Every so 
often, the changes could be merged back into the main file, much as is 
done in database practice.

As for parsing, I suggest searching for Rick Jeliffe's paper on the 
markup language and parser used for the Topologi editor.  That might be 
a good starting point.

Cheers,

Tom P




 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS