Required attributes are not required by the XProc schema?

I noticed for example that the error steps is described in the spec
http://www.w3.org/TR/xproc/#c.error
as
<p:declare-step type="p:error">
      <p:input port="source" primary="false"/>
      <p:output port="result" sequence="true"/>
      <p:option name="code" required="true"/>                       <!-- 
QName -->
</p:declare-step>

Note the required="true" set on the code option.
In the schema however we have a code attribute defined as optional:

<define name="Step-error">
     <element name="error">
       <optional>
         <ref name="name.ncname.attr"/>
       </optional>
       <ref name="common.attributes"/>
       <optional>
         <attribute name="code">
           <data type="QName"/>
         </attribute>
       </optional>
       <interleave>
         <zeroOrMore>
           <ref name="InputBinding"/>
         </zeroOrMore>
         <zeroOrMore>
           <ref name="WithOption"/>
         </zeroOrMore>
         <zeroOrMore>
           <ref name="Log"/>
         </zeroOrMore>
         <zeroOrMore>
           <choice>
             <ref name="Documentation"/>
             <ref name="PipeInfo"/>
           </choice>
         </zeroOrMore>
       </interleave>
     </element>
   </define>

Is this an error and needs to be corrected or there are some reasons for 
this difference?

Best Regards,
George
-- 
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger
http://www.oxygenxml.com

Received on Thursday, 30 July 2009 14:05:37 UTC