Re: Validating with the Operations Schema

Andy Bierman <ietf@andybierman.com> Fri, 02 June 2006 15:42 UTC

Received: from [10.91.34.44] (helo=ietf-mx.ietf.org) by megatron.ietf.org with esmtp (Exim 4.43) id 1FmBnA-0008VR-Hw for netconf-archive@lists.ietf.org; Fri, 02 Jun 2006 11:42:28 -0400
Received: from psg.com ([147.28.0.62]) by ietf-mx.ietf.org with esmtp (Exim 4.43) id 1FmBn9-0001bU-3M for netconf-archive@lists.ietf.org; Fri, 02 Jun 2006 11:42:28 -0400
Received: from majordom by psg.com with local (Exim 4.60 (FreeBSD)) (envelope-from <owner-netconf@ops.ietf.org>) id 1FmBjU-000GTU-7e for netconf-data@psg.com; Fri, 02 Jun 2006 15:38:40 +0000
X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on psg.com
X-Spam-Level:
X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.1
Received: from [205.178.146.55] (helo=omr5.networksolutionsemail.com) by psg.com with esmtp (Exim 4.60 (FreeBSD)) (envelope-from <ietf@andybierman.com>) id 1FmBjT-000GTJ-Aj for netconf@ops.ietf.org; Fri, 02 Jun 2006 15:38:39 +0000
Received: from mail.networksolutionsemail.com (ns-omr5.mgt.netsol.com [10.49.6.68]) by omr5.networksolutionsemail.com (8.13.6/8.13.6) with SMTP id k52FcbbC003272 for <netconf@ops.ietf.org>; Fri, 2 Jun 2006 11:38:37 -0400
Received: (qmail 17107 invoked by uid 78); 2 Jun 2006 15:03:06 -0000
Received: from unknown (HELO ?192.168.0.12?) (andy@andybierman.com@24.24.133.237) by 10.49.36.68 with SMTP; 2 Jun 2006 15:03:06 -0000
Message-ID: <448052F7.3060604@andybierman.com>
Date: Fri, 02 Jun 2006 08:02:15 -0700
From: Andy Bierman <ietf@andybierman.com>
User-Agent: Thunderbird 1.5.0.2 (Windows/20060308)
MIME-Version: 1.0
To: "Hare, Michael" <Michael.Hare@us.fujitsu.com>
CC: "Netconf Mailing List (E-mail)" <netconf@ops.ietf.org>
Subject: Re: Validating with the Operations Schema
References: <50B73C8966FCF840BABA099651DBE060011AB335@rchemx01.fnc.net.local>
In-Reply-To: <50B73C8966FCF840BABA099651DBE060011AB335@rchemx01.fnc.net.local>
Content-Type: text/plain; charset="ISO-8859-1"; format="flowed"
Content-Transfer-Encoding: 7bit
Sender: owner-netconf@ops.ietf.org
Precedence: bulk
X-Spam-Score: 0.1 (/)
X-Scan-Signature: 6d95a152022472c7d6cdf886a0424dc6

Hare, Michael wrote:
> Working through draft-ietf-netconf-prot-12 I find that the example XML 
> provided does not validate using the XSD provided in the same document.
> 

This was discussed in detail on the mailing list a few months ago.
There is already an RFC-Editor note dealing with the filter XSD issue.
This won't show up until the RFC is published.

The Xpath filter was changed to avoid needing to allow mixed content
in subtree filters.  The xpath expression is now an attribute instead
of element content:

   <filter type="xpath" select="xpath-filter-value"/>


Andy


> The main problem I have run into is the schema does not allow any 
> content within the <config>, <filter> or <data> nodes; the schema 
> defines these to be an empty set.
> 
> I have made a few changes to the XSD to allow validation:
> 
> For <config> the original XSD definition is:
> 
>         <xs:complexType name="configInlineType">
>                 <xs:complexContent>
>                         <xs:restriction base="xs:anyType"/>
>                 </xs:complexContent>
>         </xs:complexType>
> 
> By definition http://www.w3.org/TR/xmlschema-1/#key-efm, this resolves 
> to an empty set.
> 
> By changing this to:
> 
>         <xs:complexType name="configInlineType">
>                 <xs:sequence>
>                         <xs:any namespace="##other" processContents="lax"/>
>                 </xs:sequence>
>         </xs:complexType>
> 
> I am able to add elements from my namespace as a payload for <config> 
> which I believe is the desired results.
> 
> The other changes are along the same lines.
> 
> For the <data> type definition:
> 
>         <xs:complexType name="dataInlineType">
>                 <xs:complexContent>
>                         <xs:restriction base="xs:anyType"/>
>                 </xs:complexContent>
>         </xs:complexType>
> 
> Also resolved to an empty set.
> I changed this to:
> 
>         <xs:complexType name="dataInlineType">
>                 <xs:sequence>
>                         <xs:any namespace="##other" processContents="lax"/>
>                 </xs:sequence>
>         </xs:complexType>
> 
> and finally, the <filter> definition:
> 
>         <xs:complexType name="filterInlineType">
>                 <xs:complexContent>
>                         <xs:restriction base="xs:anyType">
>                                 <xs:attribute name="type" 
> type="FilterType" default="subtree"/>
>                         </xs:restriction>
>                 </xs:complexContent>
>         </xs:complexType>
> 
> Is also resolved to an empty set.
> I changed this to:
> 
>         <xs:complexType name="filterInlineType" mixed="true">
>                 <xs:sequence>
>                         <xs:any namespace="##other" 
> processContents="lax" minOccurs="0"/>
>                 </xs:sequence>
>                 <xs:attribute name="type" type="FilterType" 
> default="subtree"/>
>         </xs:complexType>
> 
> with the added attribute: mixed="true" to allow including XPath 
> expression when the 'type' attribute is set to 'xpath'
> 
> Are these valid changes to the Base XSD, or am I missing something?
> 
> Thanks,
> ---------------------------------
> Michael Hare
> NMI Engineering
> Fujitsu Network Communications
> 
> GnuPG Key fingerprint = 1AD4 726D E359 A31D 05BF  ACE5 CA93 7AD5 D8E3 A876
> 
> 


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