Subject: RE: Validating with the Operations Schema

From: "Hare, Michael" <[email-masked]>
Date: Fri, 2 Jun 2006 11:20:40 -0500

Ah, so.. 
That addresses the xpath filter issue, but not [really] the empty set content issue for the config, data and filter nodes.

I went back in the maillist archive and found the email discussion.

The proposed solution in the archive was to simply skip the content checking.

Especially with the introduction of the proposed 'select' attribute for the filter node, the 
payload for these 3 elements are aligned and in a private namespace.
Simply skipping the check is one method, but specifying elements to be in a namespace other
than the netconf namespace provides a bit more sanity checking to what is actually
being included for the payload.

Anyway..

I look forward to the revised base XSD and to results from the upcoming Notifications meeting as the current notification xsd has even worse problems than the base schema.

Thanx,

- mike

-----Original Message-----
From: Andy Bierman [mailto:[email-masked]]
Sent: Friday, June 02, 2006 10:02 AM
To: Hare, Michael
Cc: Netconf Mailing List (E-mail)
Subject: Re: Validating with the Operations Schema

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