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

Re: Alternative to x!y (proposal)

From: Norman Walsh <Norman.Walsh@Sun.COM>
Date: Mon, 28 Aug 2006 10:16:15 -0400
To: public-xml-processing-model-wg@w3.org
Message-ID: <878xl96j4g.fsf@nwalsh.com>
/ Innovimax SARL <innovimax@gmail.com> was heard to say:
[...]
| == III. Base element ==
| If like Henri proposed, the @href can contain a LIST of xs:anyURI, we can
| imagine to have the use of xml:base or any specific attribute to say all those
| stuff are taken relatively to this url, so this had an extra attribute only for
| href case. (ok it's a weak argument, but the idea behind is that is seems like
| each construct has special cases which don't overlap)

Instead of allowing a list of hrefs, I'd prefer to have an aggregator
component

  <p:step name="loadseveral" component="p:aggregate">
    <p:declare-input name="foo" href="href1"/>
    <p:declare-input name="bar" href="href1"/>
    <p:declare-input name="baz" href="href1"/>
  </p:step>

I think using href to refer to a single document will be all that's
necessary in the overwhelming majority of cases. If you have to
instantiate a separate component for the relatively (if not very)
uncommon case of loading more than one URI, I'm not going to be
disturbed by that.

| == IV. Forget of attribute ==
| If a user, which we now all, DO READ ALL THE SPECS, in the PREVIOUS syntax,
| write something like
| <p:input port="document"/>
| which is perfectly allowed.
| Are we sure, that the least surprise is to have in this case :
| * an empty sequence of document ?
| * a sequence of empty document ?
| * a shortcut to say to take the last result of last output (in a minimization
| case) ?
| * an error ?
| The pros for Murray's proposal in this case, is that <p:input port="document"/>
| is ONLY the declaration part and that the port is NOT instanciated.

As far as I can see, the only opportunity for confusion here is that

  <p:input port="document"/>

either does not have a binding or it has a "here" document binding to
an empty sequence of documents. Since there is no XML syntax for an
empty sequence of documents, I'm pretty sure I'd be comfortable saying
that you can't instantiate such a thing with a here document. We can
add a component

  <p:step name="getempty" component="p:empty-document-sequence"/>

to instantiate an empty sequence and say that <p:input port="document"/>
has no binding.

| === 2. Sequence ===
| As Henri, pointing this out, we need a <p:sequence> element for here document.
| And because of the simple case pointed out by Norm with

No, we can say that a here document can only instantiate a single XML
document. If you want several, you can instantiate them and aggregate them
together in another component:

  <p:step name="loadseveralothers" component="p:aggregate">
    <p:declare-input name="foo"><a/>/</p:declare-input>
    <p:declare-input name="bar"><?pi?><b/></p:declare-input>
  </p:step>

As a general principle, I think we should make the simple things
simple and the complex things possible. We don't have to make the
complex things as simple as (or only very marginally more complex
than) the simple things.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh
XML Standards Architect
Sun Microsystems, Inc.

Received on Monday, 28 August 2006 14:16:05 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 8 January 2008 14:21:48 GMT