[xmlsec] Problems with XPath: continued
Aleksey Sanin
aleksey@aleksey.com
Wed, 19 Jun 2002 11:42:51 -0700
Forgot to mention one more option: you can use the XPath Filter 2
(http://www.w3.org/TR/xmldsig-filter2/) instead of the original
XPath transform. It is not finally defined yet but you should get
desired results using very simple exporession:
//Root/Field[3]
Aleksey
Aleksey Sanin wrote:
> Hi!
>
> I can explain why your attempts fail but I have no good solution
> for you. All I can suggest is: 1) add unique 'id' attribute to
> the Field nodes and use it to select required node
> 2) write a message to LibXML2 mailing list <mailto:xml@gnome.org>
> and hope that one of smart guys there will suggest something.
> I'll keep thinking and if I'll find something I'll let you know.
>
> Aleksey.
>
> Hans-Juergen.Heinrich@de.gi-de.com wrote:
>
>> Hi,
>>
>> I'm still having problems with XPath:
>> According to your recommendation, "ancestor-or-self::DataField" as
>> an XPath expression works.
>> But what can I do if there is more than one element of the same name
>> in the document and I want to select one of them, say, the third one?
>>
>> "ancestor-or-self::DataField[3]" does not work, for example. I also
>> tried something like "/Root/Field[3]". The effect is always the same: I
>> can change portions of the document which are not below the third
>> occurring "DataField"-element, and the signature will still change,
>> which
>> is not what I expect.
>>
>> Greetings,
>> Hans-Juergen
>>
>> _______________________________________________
>> xmlsec mailing list
>> xmlsec@aleksey.com
>> http://www.aleksey.com/mailman/listinfo/xmlsec
>>
>>
>
>
> _______________________________________________
> xmlsec mailing list
> xmlsec@aleksey.com
> http://www.aleksey.com/mailman/listinfo/xmlsec