Re: [xml] xmlIO extensions



On Thu, Oct 30, 2003 at 10:02:46AM +0100, Morus Walter wrote:
Daniel Veillard writes:

  Why not it seems it would work fine too.
But even better, check how the OpenOffice guys did it and
reuse it if possible !

It's not OpenOffice but there's a virtual file system layer for java
in the apache jakarta project:
http://jakarta.apache.org/commons/sandbox/vfs/

They provide read only access to zip and jar files
http://jakarta.apache.org/commons/sandbox/vfs/filesystems.html#Zip%20and%20Jar

---
URI Format

zip://zip-file-uri[!absolute-path]

jar://zip-file-uri[!absolute-path]

Where zip-file-uri refers to a file of any supported type, including other 
zip files. Note that any ! characters in zip-file-uri must be escaped using 
%21. 
---

Of course one could restrict this to using local files for the zip-file-uri,
but it might be worth considering this syntax.

  Okay, looking at the example, yes this should work.
  zip:http://somehost/downloads/somefile.zip!/file.xml
is interesting, however forcing the paths within the archive to be
absolute sounds a bit strange, what happens if the / after ! is missing.
Writing back when not using a pure file access is not realistic but could
be expressed, that's rather good.


Regarding OpenOffice, I'm not sure, if they are using URL syntax at all.
Within the *.sxw there's just a META-INF/manifest.xml file listing the
files in the archive just using local names (i.e. 
<manifest:file-entry manifest:media-type="text/xml" 
manifest:full-path="content.xml"/>)
and (from a user point of view) OpenOffice itself just adresses the archive 
as a whole.
But I didn't look at OOs specs or sources.

  yeah, that should be asked there.

Daniel

-- 
Daniel Veillard      | Red Hat Network https://rhn.redhat.com/
veillard redhat com  | libxml GNOME XML XSLT toolkit  http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/



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