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

Re: another schema issue



Cridlig Vincent <vincent.cridlig@loria.fr> wrote:
> Martin Bjorklund a écrit :
> > I didn't quite understand all implications of configInlineType:
> >
> >      <!--
> >        Type for <config> element
> >        -->
> >      <xs:complexType name="configInlineType">
> >        <xs:complexContent>
> >          <xs:restriction base="xs:anyType"/>
> >        </xs:complexContent>
> >      </xs:complexType>
> >
> >      <xs:element name="config" type="configInlineType"/>
> >
> >
> > so I tried to validate an edit-config message with the schema in the
> > draft and xmllint.
> >
> > It complained and said that the <config> element's type is empty,
> > which makes sense I suppose.  There's a restriction on anyType which
> > restricts it to nothing.
> >   
> Same for me. I validates in Java but not in libxml2 (C). I suspect Java 
> is wrong but not sure.
> This is the same problem as filter previously.
> Add something like this solve the problem, instead of xs:complexContent:
> <xs:sequence>
>          <xs:any processContents="skip"/>
>        </xs:sequence>

You have to do

   <xs:sequence>
          <xs:any processContents="skip" maxOccurs="unbounded"/>
   </xs:sequence>

To support e.g. this as a reply to get-config:

<rpc-reply>
  <data>
    <interfaces xmlns="urn:ifMib:...">
      ...
    </interfaces>
    <system xmlns="....">
      ...
    </system>
  </data>
</rpc-reply>


> Also, if I remember well the xpath attribute of filter is not set to 
> optional. I think it should.

It has a default value, so maybe 'use' is not required.  The XSD spec
isn't very easy to understand...  xmllint doesn't complain anyway.



/martin

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