MHonArc v2.5.2 -->
xacml message
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [Elist Home]
Subject: Re: [xacml] [CR] 0047:Function specification for XPath handler
Polar,
I should have written node comparisons (is or isnot) not op:node-equal.
Node comparison is described in http://www.w3.org/TR/xpath20/, Section
3.5.3:
In the definition of the node identity in XPath data model
(http://www.w3.org/TR/query-datamodel/),
function node-equal is used. It is a little complicated, but I meant that
semantics.
I don't mean deep-equal here.
====
3.5.3 Node Comparisons (is or isnot)
The result of a node comparison is defined by applying the following rules,
in order:
1.Each operand must be either a single node or an empty sequence;
otherwise a dynamic error is raised.
2.If either operand is an empty sequence, the result of the comparison
is an empty sequence.
3.A comparison with the is operator is true if the two operands are
nodes that have the same identity; otherwise it is false. A comparison with
the isnot operator is true if the two operands are nodes that have
different identities; otherwise it is false. See [XQuery 1.0 and XPath 2.0
Data Model] for a discussion of node identity.
Use of the is operator is illustrated below.
The following comparison is true only if the left and right sides each
evaluate to exactly the same single node:
//book[isbn="1558604820"] is //book[call="QA76.9 C3845"]
====
So in our case,
(xpath-equal "//md:patient[md:first='Alice']/ "//md:patient[md:last
='Johnson']")
shall return true if both xpath returns the identical node, <md:patient>.
<md:patient>
<md:first>Alice</md:first>
<md:last>Johnson</md:last>
</md:patient>
Does it make sense?
Michiharu Kudo
IBM Tokyo Research Laboratory, Internet Technology
Tel. +81 (46) 215-4642 Fax +81 (46) 273-7428
Polar Humenn
<polar@syr.edu> To: Michiharu Kudoh/Japan/IBM@IBMJP
cc: XACML <xacml@lists.oasis-open.org>
2002/09/20 04:39 Subject: Re: [xacml] [CR] 0047:Function specification for XPath handler
Michiharu,
You have refered me to "op:node-equal" for your desired fucntion
"xacml:xpath-equal". This specification states that two nodes are equal in
this sense if they have the same identity.
I'm confused on this notion of node identity. So, hopefully you can
resolve my confusion. It appears that the name of a node is its fully
qualified path by its element names (I think).
In your example you have
<Apply FunctionId="function:xpath-equal">
<AttributeValue>/Request/Subject/Attribute[@AttributeId
="role"]/AttributeValue
</AttributeValue>
<AttributeValue>/Request/Subject/Attribute[@AttributeId
="role"]/AttributeValue
</AttributeValue>
</Apply>
Noting that the two XPATH expressions are the same, and let's say the
particular "role" attribute of the request context contains "Doctor" are
you comparing:
1. "/Request/Subject/Attribute/AttributeValue" to
"/Request/Subject/Attribute/AttributeValue", or
2. "Doctor" to "Doctor"
The semantics in the:
> http://www.w3.org/TR/xquery-operators/
> Please see section 13.1.6
seems to suggest that 1 is the case.
Are you really looking to use "op:deep-equal"?
If you mean op:node-equal you must pick out the same node by name. This
really means that we are really only comparing their XPATH expressions to
see if they correspond.
(xpath-equal "//md:record/*" "//md:record/name")
would always be true, regardless, because although the "//md:record/*" can
match any //md:record/FavoriteElementNameHere.
I'm just confused. Help!
-Polar
[Date Prev]
| [Thread Prev]
| [Thread Next]
| [Date Next]
--
[Date Index]
| [Thread Index]
| [Elist Home]
Powered by eList eXpress LLC