[xsd-users] serialize empty element
Bradley Beddoes
beddoes at intient.com
Mon Jan 29 04:02:03 EST 2007
Boris Kolpackov wrote:
> 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.
Yes I have considered that possibility along with getting a list of ID's
to be signed and a few others that I will test out. Will let the list
know the best outcome in case there is any future interest.
>
>
> hth,
> -boris
--
Bradley Beddoes
Lead Software Architect
Intient - "Open Source, Open Standards"
More information about the xsd-users
mailing list