santuario-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Berin Lautenbach <be...@wingsofhermes.org>
Subject Re: Signing only a few nodes, not the whole document
Date Wed, 29 Mar 2006 09:09:07 GMT
Peter.Nordlund@elekta.com wrote:
> I want to sign only some nodes in my document.
> As I understand it, this can be made with an id-attribute.
> This is not really the way I want to do it.
> If I got it right, it should be possible to do something like this if I
> want to sign all creditCardNo nodes:
> 
> DSIGReference* ref =
> sig->createReference(MAKE_UNICODE_STRING("#xpointer(//creditCardNo)"));
> 
> which now results in the following error:
> => Message: Unsupported Xpointer expression found

The xpointer support is not that complex.  The standard requires support
for barename Xpointer URIs ("#id") and recommends support for
#xpointer("/") and $xpointer(id("id")).

So you either need to use an Id (the common way to do it) or use an
XPath transform to select the nodes you want to use.

Cheers,
	Berin

Mime
View raw message