Subject: [Netconf] strict XML?

From: Andy Bierman <[email-masked]>
Date: Mon, 06 Jul 2009 10:03:53 -0700

Hi,

how strict should the agent be when parsing 'select' attribute
XPath expressions?  Specifically, what if prefixes are used
that do not have a matching xmlns attribute?

1)
 <get>
   <filter type="xpath" select="//foo:*" />
 </get>

2)
 <get>
   <filter type="xpath" select="//foo:*" xmlns:foo="blah"/>
 </get>

Are all the XML prefixes used in the XPath expression
supposed to be declared (IMO, yes), so (1) is an error?

Or is (1) just another no-match condition?

Or should the agent check the YANG default prefixes
to see if any of those match? (IMO, no)

Andy

---

From: Martin Bjorklund <[email-masked]>
Date: Mon, 06 Jul 2009 19:19:42 +0200 (CEST)

> supposed to be declared (IMO, yes), so (1) is an error?

Yes.  We need to properly define the XPath context for the XPath
expression.  4741 actually has this:

   the set of namespace declarations are those in
   scope on the filter element

which is correct (even if the text about default namespace is wrong
and needs to be fixed).  Then it follows from XPath 1.0 that (1) is an
error.

/martin

---

From: Ladislav Lhotka <[email-masked]>
Date: Tue, 07 Jul 2009 09:51:38 +0200

> supposed to be declared (IMO, yes), so (1) is an error?

Yes, it should be an error.

Lada

> _______________________________________________
> Netconf mailing list
> [email-masked]
> https://www.ietf.org/mailman/listinfo/netconf
-- 
Ladislav Lhotka, CESNET
PGP Key ID: E74E8C0C