[erlang-questions] ct_netconfc.erl: is this the expected behavior or is it a bug?
Martin Bjorklund
mbj@REDACTED
Wed Mar 12 10:52:49 CET 2014
Siri Hansen <erlangsiri@REDACTED> wrote:
> 2014-03-11 14:49 GMT+01:00 Martin Bjorklund <mbj@REDACTED>:
>
> > Hi,
> >
> > Siri Hansen <erlangsiri@REDACTED> wrote:
> > > Would this also work ?
> > >
> > > <?xml version=\"1.0\" encoding=\"UTF-8\"?>
> > > <rpc message-id=\"1\" xmlns=\"urn:ietf:params:xml:ns:netconf:base:1.0\">
> > > <edit-config>
> > > <target>
> > > <running/>
> > > </target>
> > > <config>
> > > <ElementA>
> > > <elementAId>1</elementAId>
> > > <elementB>
> > > <elementB>1</elementB>
> > > <elementC operation=\"delete\">
> > > <elementCId>6</elementCId>
> > > </elementC>
> > > </elementB>
> > > </ElementA>
> > > </config>
> > > </edit-config>
> > > </rpc>
> > >
> > >
> > > i.e. without the 'xc' prefix (the netconf base namespace is the default
> > > anyway).
> >
> > This is actually not how default namespaces work. The default
> > namespace does not apply to XML attributes.
> >
> >
> Thanks, Martin, for pointing that out! Is this a fact in general or do you
> mean that the default namespace would not apply to an XML attribute which
> is located inside an XML element that is not part of the default namespace?
It is general.
See e.g. http://www.rpbourret.com/xml/NamespacesFAQ.htm#doc_3,
http://www.rpbourret.com/xml/NamespaceMyths.htm#myth4
(see also http://www.rpbourret.com/xml/NamespacesFAQ.htm#politics_1)
Or if you prefer the spec:
http://www.w3.org/TR/REC-xml-names/#defaulting.
/martin
More information about the erlang-questions
mailing list