Subject: RE: errorInfoContent

From: "Rob Enns" <[email-masked]>
Date: Thu, 29 Dec 2005 09:45:06 -0800

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