[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: notification-07 issue list (4 & 5)
"Sharon Chisholm" <schishol@nortel.com> wrote:
> <Andy>
> 4) XSD template for <notification> wrapper
>
> a) current definition is not what the WG agreed to, and does not
> even support the replayComplete notification correctly
>
> b) definition is not extensible, such that XSD cannot be properly
> used
> to specify extensions and restrictions
>
> </Andy>
>
> Actually, after Andy suggested some XSD to achieve being able to define
> notifications as proper extensions of the notification
> https://ops.ietf.org/lists/netconf/netconf.2007/msg00123.html
> I responded
> https://ops.ietf.org/lists/netconf/netconf.2007/msg00131.html
> suggesting that the XSD did not work as advertised in my tools, so I
> proposed something in the spirit of what Andy's stuff was trying to
> achieve but that validated in my tools.
Missing from both these posts are the XML that you actually got
validated. I can't get your suggestion to validate...
I think Andy's definition works fine (with some prefix/namespace
fixes) -- although the replayComplete can be made simpler like this:
<xs:element name="replayComplete"
substitutionGroup="ncEvent:notificationContent"/>
Using this, I can validate:
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<replayComplete xmlns="urn:ietf:params:xml:ns:netmod:notification"/>
</notification>
You can also define:
<xs:complexType name="FooType">
<xs:complexContent>
<xs:extension base="ncEvent:NotificationContentType">
<xs:sequence>
<xs:element name="target" type="xs:string"/>
</xs:sequence>
</xs:extension>
</xs:complexContent>
</xs:complexType>
<xs:element name="fooNotif"
type="FooType"
substitutionGroup="ncEvent:notificationContent"/>
And validate:
<notification xmlns="urn:ietf:params:xml:ns:netconf:notification:1.0">
<fooNotif xmlns="http://example.com/ns/notifs">
<target>foo</target>
</fooNotif>
</notification>
As Andy pointed out, this is consistent with how rpcs are done in the
base protocol.
/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/>