Re: Request: Test suite for EFS.



On Wed, Feb 16, 2000 at 02:52:36AM -0500, Nat Friedman wrote:
> 
> Daniel Veillard writes:
>  > 
>  >   Is that the end of the XML format ? 
> 
>     I don't have any time to work on things which are not directly
> relevant to Evolution, but shipping Bonobo 1.0 is pretty important,
> both to Gnome and to me personally, so I'd like to help this happen.

  I afraid you are gonna object that you don't have time to pusue the issue
that it's too complicated and you have a product to ship. I already got this
argument for not switching gtkHtml to the libxml/DOM code. I feel concerned
about this. Until now Gnome was very nice in the sense that people took the
time to stick to Do The Right Thing even if it was a bit more painful/slower.

Maybe XML encoding is not the Right Thing for this, but I'm afraid the issue
may not be fully considered just by "lack of time" ...

>     No, that's not the end of XML.  But we do need a working structure
> storage mechanism in Bonobo very soon.  Now, I personally prefer XML,
> but there are some issues.  Here's how I envision an XML-based Bonobo
> structured storage file:
> 
> <?xml version="1.0"?>
> 
> <storage>
>     <activation-id>id-for-a-word-processor</activation-id>
>     <persistence-mime-type>
> 
>     <persistence-data>
>         ... data ...
>     </persitence-data>
> 
>     <embedded-stream>
>             <activation-id>id-for-embedded-object</activation-id>
>             <persistence-mime-type>mime-type-of-persince-data</persistence-mime-type>
>             <persistence-data>
>                 ... data ...
>             </persistence-data>
> 
>     </embedded-stream>
> 
>     <linked-stream>
>             <activation-id>id-for-linked-object</activation-id>
>             <filename>uri-to-linked-object-hydration-file</filename>
>     </linked-stream>
> 
>     <persistence-data>
>         ... data ...
>     </persistence-data>
> 
> </storage>

  The Right Way to do this in XML is to use namespaces.
I *strongly* suggest you read :

  http://www.w3.org/TR/REC-xml-names/
    
It starts with:
    "We envision applications of Extensible Markup Language (XML) where a
    single XML document may contain elements and attributes (here referred
    to as a "markup vocabulary") that are defined for and used by multiple
    software modules. One motivation for this is modularity"

Trying to design a XML format for compound document without having read
it waste of time. When designing the original gnumeric XML serialization
I did put a namespace, seems you guy didn't really understood the reason.
Read the short stuff I put on

  http://xmlsoft.org/#Namespaces

too.
  I did send mail to Miguel about how namaspaces should be used in bonobo
to switch/detect compound in document serialized in XML. This was requiring
registering the XML namespace URL for each application and make sure
that all serialization would declare the namespace, and build XML analizers
in a way flexible enought to skip element not in your "own" namespace.
Seems I didn't get heard, too bad.

> This is obviously pseudo-code and not usable directly.  But the main
> problem that it brings up is getting the MIME type of the embedded
> streams.  I think we have to add a get_mime_type() method to
> PersistStream.  We at least need to be able to detect if the stream is 
> going to send us back XML, so that we can just drop it in-place
> instead of base64 encoding it, or whatever.

  Note that embedding binary data in XML is *hard*. The best way is to
convert it to an ASCII encoding (uuencode, base64), escape "]]>" sequences
and put it in a CDATA construct

>     What OLE2 does (as I've described before on this list) is just
> write the activation ID in straight (this is especially easy since
> their activation IDs are fixed-length) and then dump in whatever
> stream the component spits out untouched.

  How are activation ID allocated ? Is that a registry ? who maintains it ?

>     So using XML makes me think "scary buffering."  But maybe I'm just 
> being timid.

  I don't understand. Are you just considering the memory requirements ?
I'm considering designing a serialization model which will be stable over time
and still readable in 20 years by generic tools.

Daniel

-- 
Daniel.Veillard@w3.org | W3C, INRIA Rhone-Alpes  | Today's Bookmarks :
Tel: +33 476 615 257  | 655, avenue de l'Europe | Linux XML libxml WWW
Fax: +33 476 615 207  | 38330 Montbonnot FRANCE | Gnome rpm2html rpmfind
 http://www.w3.org/People/all#veillard%40w3.org  | RPM badminton Kaffe



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]