[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: namespace and schema



jtsillas writes:
>------=_Part_4_25793043.1058908870948
>Content-Type: text/plain; charset="utf-8"
>Content-Transfer-Encoding: quoted-printable
>
>New to the list..
>
>The draft says that the following is legal:
>
><rpc xmlns=3D"http://ietf.org/xmlconf/1.0/base";>
><get-config><source><running/><source>
>
>         <config xmlns=3D"http://hohoho.com"/>
>
></get-config>
></rpc>

This is a bug in the draft. The 'config' element is
in the http://ietf.org/xmlconf/1.0/base namespace,
but the contents are 'any', so you can either
change namespaces on the content:

       <config>
         <my-config xmlns="http://hohoho.com"/>
       </config>

Or use a prefix for the contents

       <config xmlns:my="http://hohoho.com";>
         <my:config/>
       </config>

Or switch namespaces and prefix the config element:

       <base:config xmlns="http://hohoho.com"; xmlns:base="http://ietf.org/xmlconf/1.0/base";>
         <my-config/>
       </base:config>

The textual representation take be any of these, and there
are other possibilities.

This is one of the cool features of the SAX API: you get element
names (and attributes) with their associated namespace regardless
of where the namespace mapping was defined.

Thanks,
 Phil

--
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/>