ZIP-based packages and URI references into them ODF proposal

Excerpted requirements from independent inquiry on same topic:


The problem is is all about identifying resources within a package from

outside a package by an URL.

In the end we would like to use two independent solutions:  package

schema and fragment identifier

1)  Package schema solution:

Specify a package schema in the future by a standards body (perhaps

extent JAR URL) to share among zipped document types, e.g. ODF, Widgets

(W3C Widget group), OOXML, ZIP, etc..

This might take some time to communicate and register at IANA.

Advantage: Even a URL to a file within the package can be used as

BaseURI (have to be absolute no fragment identifier allowed).

2)  Fragment identifier solution:

Specify for our ODF MIMETYPEs a fragment identifier similar to the one

used by HTML, just extended for a package format. The problem as we

might have multiple XML files within the package with the same xml:id we

need in addition the path to make the ID unique.

Advantage: Web user know this technic basically from HTML.

For time reasons I would like to stick for now with the second solution:

According to the URI RFC (

URI         = scheme ":" hier-part [ "?" query ] [ "#" fragment ]

fragment      = *( pchar / "/" / "?" )

I would like to propose for ODF 1.2 the following:

A fragment identifier for an OpenDocument format mediatype

(odf-fragment) refers to a resource within the OpenDocument package.

An odf-fragment consists either of a stream-path,  a stream-path and a

fragment identifier of a stream or as abbreviation an xml:id.

The xml:id shall always belong to the root "/content.xml" stream.

The fragment within the ODF fragment has to be resolved accordingly to

the mimetype of the stream.

odf-fragment = [ "#"  stream-path  | ( stream-path "?" fragment ) |

xml-id ]

stream-path =  "/" pchar *( pchar  |  "/" )

fragment      = *( pchar  | "/" | "?" )

xml-id     =  see W3C xml:id spec

The following two URLs are considered equal:


Received on Friday, 31 October 2008 15:09:29 UTC