W3C home > Mailing lists > Public > public-xml-processing-model-wg@w3.org > January 2012

RE: V.next: resource manager

From: <vojtech.toman@emc.com>
Date: Fri, 6 Jan 2012 03:28:16 -0500
To: <public-xml-processing-model-wg@w3.org>
Message-ID: <3799D0FD120AD940B731A37E36DAF3FE33FF223029@MX20A.corp.emc.com>
> How does this work if the mapping isn't known statically? I had in mind
> something like
>   <p:uri-scope>
>     <p:input port="catalog">
>       ...
>     </p:input>
>     ...
>   </p:uri-scope>

Norm, did you mean that you would pass some kind of a catalog document (for example in the c:catalog form that Henry suggested) to the "catalog" input port, or that you would just pass a bunch of XML documents as with any other step? It occurred to me that the latter might work, too - and you wouldn't even need the p:stash step.

The idea is that the p:uri-scope step/wrapper would take all documents passed to it via the "catalog" port, look at their base URIs, and construct a scoped catalog that would map all references to these base URIs in the sub-pipeline to the corresponding documents.

Applying this to your initial example, it might look as this:

<p:delete match="a" name="delete">
  <p:input port="source">
    <p:document href="http://example.com/doc.xml"/>
 <p:input port="catalog">
   <p:pipe step="delete" port="result"/>

   <p:input port="source">
         <!-- loads the document from the nearest in-scope catalog -->
         <xi:include href="http://example.com/doc.xml"/>

The obvious drawback of this solution is that you cannot map from a base URI A to a base URI B easily, but this could be solved easily by combining the above with the p:uri-scope/p:map-uri construct. 


Vojtech Toman
Consultant Software Engineer
EMC | Information Intelligence Group
Received on Friday, 6 January 2012 08:32:00 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 21:32:50 UTC