[xmlsec] XPointer reference problem
Aleksey Sanin
aleksey@aleksey.com
Fri, 29 Nov 2002 08:21:35 -0800
Please, read section 3.2 from the FAQ http://www.aleksey.com/xmlsec/faq.html
Aleksey
Asbjørn Oskal wrote:
> Hi!
>
> I'm having some trouble signing using an xpointer reference.
>
> The XML document I'm trying to sign looks like this:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <Letter>
> Hello, World!
> <Info Id="SomeData">
> <!-- Commentary -->
> <Data1> Some data </Data1>
> <Data2> More data </Data2>
> </Info>
> </Letter>
>
> I do like this in my code. (from signing example 3):
>
> referenceNode = xmlSecSignedInfoAddReference(signedInfoNode,
> (const unsigned char *) "my-reference",
> (const unsigned char *) "#xpointer(id('SomeData'))",
> NULL);
>
>
> I debugged the signing process and it ends up in
> xmlSecTransformStateParseUri (transforms.c) where
>
> xmlXPtrEval(BAD_CAST (xptr + 1), ctxt);
>
> fails.
>
> The xptr contains #xpointer(id('SomeData')).
>
>
> Does this mean that the xmlXPtrEval cannot find the element <Info
> Id="SomeData"> ?
>
> Has anyone got a clue to what I am doing wrong here?
>
> :)