Re: Required attributes are not required by the XProc schema?

Thanks Henry,

I would add in some Schematron to check that, eventually embedded in the 
Relax NG schema.

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

Henry S. Thompson wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> George Cristian Bina writes:
> 
>> 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:
> 
> That's because the following is legal:
> 
>  <p:error>
>   <p:with-option name="code" select="'foo'"/>
>  </p:error>
> 
> It would be possible in RelaxNG (or XML Schema 1.1) to write the
> co-occurence constraints that relate option attributes to p:with-option
> children, but I don't blame Norm for ducking on that one. . .
> 
> ht
> - -- 
>        Henry S. Thompson, School of Informatics, University of Edinburgh
>                          Half-time member of W3C Team
>       10 Crichton Street, Edinburgh EH8 9AB, SCOTLAND -- (44) 131 650-4440
>                 Fax: (44) 131 651-1426, e-mail: ht@inf.ed.ac.uk
>                        URL: http://www.ltg.ed.ac.uk/~ht/
> [mail really from me _always_ has this .sig -- mail without it is forged spam]
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.2.6 (GNU/Linux)
> 
> iD8DBQFKccm4kjnJixAXWBoRAvn3AJ4hneK74Krquznp3KJFmguYFw94eQCfeBhR
> rxkFhxh3ClZQNbwGiG3rGI0=
> =/zv2
> -----END PGP SIGNATURE-----
> 

Received on Friday, 31 July 2009 09:09:09 UTC