[xsd-users] serialize empty element

Boris Kolpackov boris at codesynthesis.com
Mon Jan 29 03:47:55 EST 2007


Hi Bradley,

Bradley Beddoes <beddoes at intient.com> writes:

> Thats exactly right in this case to replace an empty XML DSig
> <Signature/> element with the correct calculated one, essentially the
> user would present an invalid Document structure which is the corrected,
> the empty <Signature/> being used to indicate what they wish to have
> signed (as there may be multiple places a Signature could live but you
> dont want to sign in them all).

You could have done this if Signature was a simple type like string
that allowed empty content. But XML DSig has complex content with
required elements several levels down. One way you can do this is
to maybe come up with a special NULL signature that will have all
required fields set to some special (empty) values and allow you
to distinguish it as a special case. E.g., Setting the Algorithm
attribute in SignatureMethod to some special URI.


hth,
-boris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 652 bytes
Desc: Digital signature
Url : http://codesynthesis.com/pipermail/xsd-users/attachments/20070129/351463e0/attachment.pgp


More information about the xsd-users mailing list