XML attributes with defaults

Tom Scavo trscavo at gmail.com
Sun Jul 7 14:27:32 EDT 2013


On Sun, Jul 7, 2013 at 1:14 PM, Ian Young <ian at iay.org.uk> wrote:
>
> On 7 Jul 2013, at 15:52, Tom Scavo <trscavo at gmail.com> wrote:
>
>> Suppose an XML schema contains an XML attribute with a default. Can
>> someone give an example of an xmlsectool command that gives an error
>> if an XML document that satisfies the schema does not contain an
>> explicit value for that XML attribute?
>
> I'm not sure if you can demonstrate the classic issue using just xmlsectool, due to the way it handles schemas.  But if you wanted to try, you could:
>
> * sign a document (one where the attribute is absent) WITH schema validation, then try and verify it WITHOUT, or
>
> * sign a document WITHOUT schema validation, then try and verify it WITH

Hmm, both of those experiments work fine.

Tom


More information about the dev mailing list