Andy Bierman <ietf@andybierman.com> wrote:
Hi,
I just read sec. 6.2.5 again in RFC 4741, and found yet another 'concern'
with subtree filtering.
The text in the 2nd sentence explicitly states wrt/ to
a content match node: "it represents an exact-match filter".
I cannot find any text anywhere that mentions canonical data formats,
or schema data type conversion. It is extremely likely that an
agent implementation will need to convert between a numeric data type
and a string representation of that data type to support this feature.
For interoperability, we should have a precise meaning of 'exact match'.
Does 'exact match' mean that the agent MUST NOT convert the
filter value to any schema-defined data type (i.e., convert number
to canonical and/or internal format, or adjust string whitespace or
convert character entities)?
Instead, the agent must compare a string representation of the internal
value to the exact filter string value.
Or is the agent allowed to convert the raw filter string to an internal
(schema defined) data type before comparing it to the value from the
target config?
IMO, the post-conversion compare is more user-friendly.
I fully agree.
But we also have this text in 6.2.5:
o Leading and trailing whitespace characters are ignored, but any
whitespace characters within a block of text characters are not
ignored or modified.
I think that's a mistake. If I have a xs:string in my db which has
the value " hello ", I cannot match it with a subtree filter. IMO, it
would have been better to not try to do whitespace adjustments, but
instead follow the normal rules imposed by the datatype.