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

RE: errorInfoContent



> I believe the following snippet meets NETCONF's requirements.
> Please take a look. To simplify the XSD a little, session-id must 
> appear first, if it appears.
> 
>   <xs:complexType name="errorInfoType">
>     <xs:sequence>
>       <xs:element name="session-id" type="SessionId"
>         minOccurs="0" maxOccurs="1"/>
>       <xs:sequence minOccurs="0" maxOccurs="unbounded">
>         <xs:sequence>
>           <xs:element name="bad-attribute" type="xs:QName"
>             minOccurs="0" maxOccurs="1"/>
>           <xs:element name="bad-element" type="xs:QName"
>             minOccurs="0" maxOccurs="1"/>
>           <xs:element name="ok-element" type="xs:QName"
>             minOccurs="0" maxOccurs="1"/>
>           <xs:element name="err-element" type="xs:QName"
>             minOccurs="0" maxOccurs="1"/>
>           <xs:element name="noop-element" type="xs:QName"
>             minOccurs="0" maxOccurs="1"/>
>         </xs:sequence>
>       </xs:sequence>
>       <!-- elements from any other namespace are also allowed to
>            follow the NETCONF elements -->
>       <xs:any namespace="##other" minOccurs="0" 
> maxOccurs="unbounded"/> 
>     </xs:sequence>
>   </xs:complexType>

One small improvement. session-id only appears
with lock errors, and shouldn't appear with any of the
other error-info tags, so I moved it into a choice.

  <xs:complexType name="errorInfoType">
    <xs:sequence>
      <xs:choice>
        <xs:element name="session-id" type="SessionId"/>
        <xs:sequence minOccurs="0" maxOccurs="unbounded">
          <xs:sequence>
            <xs:element name="bad-attribute" type="xs:QName"
              minOccurs="0" maxOccurs="1"/>
            <xs:element name="bad-element" type="xs:QName"
              minOccurs="0" maxOccurs="1"/>
            <xs:element name="ok-element" type="xs:QName"
              minOccurs="0" maxOccurs="1"/>
            <xs:element name="err-element" type="xs:QName"
              minOccurs="0" maxOccurs="1"/>
            <xs:element name="noop-element" type="xs:QName"
              minOccurs="0" maxOccurs="1"/>
          </xs:sequence>
        </xs:sequence>
      <xs:choice>
      <!-- elements from any other namespace are also allowed
           to follow the NETCONF elements -->
      <xs:any namespace="##other" minOccurs="0" maxOccurs="unbounded"/> 
    </xs:sequence>
  </xs:complexType>


Rob

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