Re: Error Inconsistencies

/ Innovimax SARL <innovimax@gmail.com> was heard to say:
| the model of error is
| <err:errors>
|   (err:error*)
| </err:errors>
|
| and
|
| <err:error
|  name? = NCName
|  type? = QName
|  code? = QName
|  href? = anyURI
|  line? = integer
|  column? = integer
|  offset? = integer>
|   (anyElement*)
| </err:error>
|
| but the p:error component A.1.3 Error
|
| [[
| For example, give the following invocation:
|
| <p:error name="bad-document">
|   <p:option name="code" value="12">
|   <p:option name="description" value="The document element is unknown."/>
| </p:error>
|
| The error vocabulary element (and document) generated on the error
| output port is:
|
| <err:errors name="bad-document" type="p:error">
| <err:error code="12">
| The document element is unknown
| </err:errors>
| </err:errors>
| ]]
|
| use 12 as a QName
| and put attributes on err:errors

Yes, the code should be a QName. Also, I think the declaration for
p:error should be:

<p:declare-step type="p:error">
  <p:option name="code"/>
  <p:option name="href"/>
  <p:option name="line"/>
  <p:option name="column"/>
  <p:option name="offset"/>
  <p:option name="description"/>
</p:declare-step>

I'm can imagine allowing an input port for the err:error body:

  <p:input port="message"/>

with the semantic that if the document element on the "message" port
is err:error then its content becomes the content of the generated
err:error, otherwise the whole document appears in the err:error.

Hmm, I'm not sure that's very clear. I mean that

<p:error name="myerr1">
  <p:input port="message">
    <p:inline>
      <err:error>Foo</err:error>
    </p:inline>
  </p:input>
</p:error>

would generate

  <err:error name="myerr1">Foo</err:error>

but

<p:error name="myerr2">
  <p:input port="message">
    <p:inline>
      <somethingelse>Bar</somethingelse>
    </p:inline>
  </p:input>
</p:error>

  <err:error name="myerr2"><somethingelse>Bar</somethingelse></err:error>

But that may be complete overkill.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | It is seldom that any liberty is lost
http://nwalsh.com/            | all at once.--David Hume

Received on Tuesday, 1 May 2007 13:26:15 UTC