[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: XML namespace advice
Andy Bierman <ietf@andybierman.com> wrote:
> IMO, it is reasonable for the agent to assign the netconf NS
> as the default NS, in the event <hello> or <rpc> PDUs without any
> NS declarations are received, if they are received on netconf
> connections (i.e., any port the agent is listening as a netconf port).
>
> If such a PDU contains elements or attributes that are not
> in the netconf NS that the agent is using, then you should generate the
> appropriate errors. So even if the agent can figure it
> out without namespaces, it SHOULD generate unknown-element
> or unknown-attribute errors in this case. (I think it's
> anti-user-friendly, but what can you do, it's XML ;-)
I don't think you'd have to generate unknown-element in this case
because of XML rules. If you get an instance document w/o xmlns
declarations, the elements in the instance document don't belong to
any namespace. If you treat an 'rpc' element without a namespace
declaration to mean the 'rpc' element from the netconf namespace, you
can treat the 'interfaces' element to mean the 'interfaces' element
from the ifMIB namespace.
I think it's logical to either be strict (which we are today) or else
allow an instance document w/o namespaces whatsoever.
(First I thought that the elementFormDefault="qualified" attribute in
the netconf schema meant that the schema required instance documents
to qualify the top-level elements with a namespace, but I'm not so
sure anymore (although libxml2 seems to work like that). XML Schema
is tricky...)
/martin
--
to unsubscribe send a message to netconf-request@ops.ietf.org with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/netconf/>