FW: Sketch of an idea to address widget/package addressing with fragID syntax and media-type defn.

I'm reposting this message here at the suggestion of the TAG. There is a resulting discussion thread based at [1], and I'll be posting a response there to suggest that any continuation of take place here.

Elsewhere [2], Larry Masinter has suggested taking inspiration from RFC 2557 [3], " MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)" which is also worthwhile.

BR,

Stuart Williams
[1] http://www.w3.org/mid/233101CD2D78D64E8C6691E90030E5C8245CCE9131@GVW1120EXC.americas.hpqcorp.net
[2] http://www.w3.org/mid/8B62A039C620904E92F1233570534C9B0118B26017B3@nambx04.corp.adobe.com
[3] http://www.ietf.org/rfc/rfc2557.txt
--
Hewlett-Packard Limited registered Office: Cain Road, Bracknell, Berks RG12 1HN
Registered No: 690597 England

-----Original Message-----
From: www-tag-request@w3.org [mailto:www-tag-request@w3.org] On Behalf Of Williams, Stuart (HP Labs, Bristol)
Sent: 28 November 2008 16:10
To: Marcos Caceres
Cc: www-tag@w3.org; public-webapps
Subject: Sketch of an idea to address widget/package addressing with fragID syntax and media-type defn.


[Resending with minor corrections and to get tracker's attention and include public-webapps]

I just wanted to float an outline of a not very baked idea for trying to solve the "widget referencing" problem with a media-type/fragment identifer approach - those IMO being the 'right' extension point in the web architecture to be trying to use for this purpose - ie a frag id syntax to go with a new or refined media-type specification for a packaging format. One vital requirement for the packaging format is that it maintains media-types for the things that the package contains so that the whole approach can nest.

This idea is inspired by (my half rememberings) of source routed email addresses where % get re-written to @ and right hand domains get eaten off of mail addresses so that say:

skw%hp.com%isp.com%somerelay.com@example.com progresively becomes:

        skw%hp.com%isp.com@somerelay.com ->
        skw%hp.com@isp.com ->
        skw@hp.com

as the message is routed via example.com, somerelay.com, isp.com and finally hp.com.

The approach below 'works' left to right stripping away the none fragment part of a URI and rewriting the leftmost ! in the remaining fragment with a # as one penetrates more deeply into a package structure.

I don't mean to suggest that this is all properly worked out - I may have violated numerous character restrictions in URI syntax. But in principle I think something like this could meet the widget addressing (and more general thing within package addressing) problem entirely within fragID/media-type space (which then leave it properly orthogonal to URI scheme).

Consider a package/containment structure as follow (where indentation represents path depth and  "n: [..]" represents named containment).

outer:  [ catalog.xml
          scripts
            myScript.js
          lib
            myLib.lib
            aLib.lib
          nestedPackages
            innerpkg: [
              catalog.xml
              scripts
                 nestedScript.js
              deeperPkgs
                moreNestedPkg: [
                   catalog.xml
                   scripts
                      deeplyNested.js
                   ...
                ]
            ]
            mypkg: [
              catalog.xml
              ...
            ]
         ]

An external reference to some target XML in the most deeply nested catalog.xml 'file' would look like this:

scheme://<authority>/<path>/outer#/nestedPackages/innerpkg!/deeperPkgs/moreNestedPkg!/catalog.xml!targetXMLId

Once focus shifts inside the outer package, references are re-written by replacing the leftmost ! with a # as follows:

- from within "outer" -> /nestedPackages/innerpkg#/deeperPkgs/moreNestedPkg!/catalog.xml!targetXMLId
- from within "innerpkg" -> /deeperPkgs/moreNestedPkg#/catalog.xml!targetXMLId
- from within "moreNestedPkg" -> /catalog.xml#targetXMLId

Relative references within a package hierarchy work as expected.

Relative Referencing more deeply into the package structure is straight forward.

Relative referencing up the hierarchy is not covered by this approach, though maybe another character could be reserved to act a bit like .. but at the package hierarchy level as opposed to internal to the package - I suppose that .. itself could be allowed to take you higher than the local package root - but some detailed work would have to be put in to checking compatibility with the normalisation of relative references in 3986.

The assumption here is that the package format also maintains media-type information for each of the things that it contains that all the packages, "outer", "innerpkg", "moreNestedPkg" and "mypkg" are marked with a media-type that defines a fragment identifier syntax and re-write rules as illustrated above.

Other characters than / and ! could be choosen as path and container separators respective.

Could this or something like it meet your requirements? If not... which ones does it fail to meet?

BR

Stuart
--
Hewlett-Packard Limited registered Office: Cain Road, Bracknell, Berks RG12 1HN
Registered No: 690597 England

[Traker: this is TAG ISSUE-61]

Received on Thursday, 4 December 2008 19:54:10 UTC