Re: p:error

/ Rui Lopes <rlopes@di.fc.ul.pt> was heard to say:
| We should keep the code as required, otherwise how could a pipeline author
| perform a p:choose on /err:errors/err:error/@code ?

I'm not talking about err:error, but p:error, the user-level step that
causes an error. In particular:

<p:choose name="version">
  <p:when test="/*[@version = 2]">
    <p:validate-xml-schema>
      <p:input port="schema">
	<p:document href="v2schema.xsd"/>
      </p:input>
    </p:validate-xml-schema>
  </p:when>

  <p:when test="/*[@version = 1]">
    <p:validate-xml-schema>
      <p:input port="schema">
	<p:document href="v1schema.xsd"/>
      </p:input>
    </p:validate-xml-schema>
  </p:when>

  <p:when test="/*[@version]">
    <p:identity/>
  </p:when>

  <p:otherwise>
    <p:error description="Required version attribute missing."/>
  </p:otherwise>
</p:choose>

There's no value in forcing me to put a code there. Nor a description,
if it comes to that. Users will just use code="" and description=""
if they have to, and that's no more useful than making them optional.

| On a side note, the error vocabulary in the spec (appendices D and E) are bound
| to the c: prefix.

Fixed.

| Moreover, if @code is made required for p:error, it should be
| required as well on E.2 (err:error) and on the schemas.

I'm reminded of something Eve Maler used to say when we were designing
DocBook: "you can't legislate morality". Making attributes required
isn't going to make people do the right thing.

                                        Be seeing you,
                                          norm

-- 
Norman Walsh <ndw@nwalsh.com> | Everything should be made as simple as
http://nwalsh.com/            | possible, but no simpler.

Received on Tuesday, 3 July 2007 11:58:05 UTC