Subject: Re: RELAX NG Schema for NETCONF

From: Ondrej Zlosky <[email-masked]>
Date: Tue, 14 Dec 2004 13:57:35 +0100

Hello, 

I'm sorry that this is not "true" reply but I subscribed now and can use only messages from web archive.

> Here is a RELAX NG schema for the NETCONF protocol.
> It's not any shorter than the XSD that appears in the draft,
> but it's somewhat easier to understand at first glance (imho).

> The protocol examples in the -04 draft have all been validated 
> against this schema.

I was testing this Relax NG scheme and it looks ok. I propose few improvements because I think
that next changes better cover ietf netconf draft. Please, let me know if I am wrong.

Add <config> element to config type.

<define name="config">
+ <element name="config">
    <zeroOrMore>
      <ref name="anyElement"/>
    </zeroOrMore>
+ </element>
</define>

Therefore next example looks like valid (which obviously is not):

<rpc message-id="4" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
  <edit-config>
    <target>
      <running/>
    </target>
    <xxx/>
  </edit-config>
</rpc>

----

This is missing in xsd schema as well:

<define name="error-option">
  <element name="error-option">
    <choice>
+     <value>rollback-on-error</value>
      <value>stop-on-error</value>
      <value>ignore-error</value>
    </choice>
  </element>
</define>

----

And previously discussed multiple errors:

<define name="rpcReplyType">
  <choice>
    <element name="ok">
      <empty/>
    </element>
+   <oneOrMore>
      <ref name="rpcErrorType"/>
+   </oneOrMore>
    <element name="data">
      <optional>
        <ref name="anyElement"/>
      </optional>
    </element>
  </choice>
</define>

----

And I have one question.
Is this example correct? It is in draft (rollback-on-error capability), but neither xsd schema nor Relax NG can't validate it (due to bad order).

       <rpc message-id="101" xmlns="urn:ietf:params:xml:ns:netconf:base:1.0">
         <edit-config>
           <error-option>rollback-on-error</error-option>
           <target>
             <running/>
           </target>
           <config>
             <top xmlns="http://example.com/schema/1.2/config">
               <interface>
                 <name>Ethernet0/0</name>
                 <mtu>100000</mtu>
               </interface>
             </top>
           </config>
         </edit-config>
       </rpc>

It is supposed to be interleaved or it is mistake in draft?

Thanks.

-- 
Bc. Ondrej Zlosky
[email-masked]
[email-masked]
www.liberouter.org/netopeer/

--
to unsubscribe send a message to [email-masked] with
the word 'unsubscribe' in a single line as the message text body.
archive: <http://ops.ietf.org/lists/netconf/>

---

From: Ondrej Zlosky <[email-masked]>
Date: Tue, 14 Dec 2004 14:07:28 +0100

Hello,

I'm sorry that this is not "true" reply but I subscribed now and can use 
only messages from web archive.

> The protocol examples in the -04 draft have all been validated

I was testing this Relax NG scheme and it looks ok. I propose few 
improvements because I think that next changes better cover ietf netconf 
draft. Please, let me know if I am wrong.

<define name="config">

----

----

----

And I have one question.
Is this example correct? It is in draft (rollback-on-error capability), 
but neither xsd schema nor Relax NG can't validate it (due to bad order).

Thanks.