OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

xacml message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Subject: [xacml] XPath with namespace

XPath expression becomes complicated when it uses namespaces. For example,
a simple XPath /Request/Subjects/SubjectId becomes
/*[namespace-uri()="urn:oasis:names:tc:xacml:0.15h:context" and local-name
and local-name()="Subjects"]/*[namespace-uri()
="urn:oasis:names:tc:xacml:0.15h:context" and local-name()="SubjectId"]

The above expression shows the correct use of an XPath that can generally
handle namespaces without fixing namespace prefixes. There are a couple of
ways to make expressions simpler with some assumptions based on specific
XPath implementation. In case of Apache Xalan, a simple XPath
can be processed if the context node set (handed to the XPath API) contains
namespace definitions at the top node (Request element) such as xmlns:xctx
="urn:oasis:names:tc:xacml:0.15h:context" xmlns:md


IBM Tokyo Research Laboratory, Internet Technology
Tel. +81 (46) 215-4642   Fax +81 (46) 273-7428

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [Elist Home]

Powered by eList eXpress LLC