[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: Poll for consensus on edit operations
> I'd like an
> Xpath expert to redo the 'chassis' example I did but use a
> different (child element based) naming scheme instead of
> a simple attribute. I'd like to see how the path to
> "ip-filter.1" is constructed in this case. I suspect the
> expression is rather complex, if possible at all.
The attribute vs. element based naming scheme doesn't affect the
XPATH expression all that much. All that's required is to remove
the @ from the predicate. Here's Andy's example with
attributes as instance names.
<modify
start-path="//chassis/slots/slot[instance-id='3']/ports/port[instance-id
='7']/duplex-mode">
<chassis>
<slots>
<slot>
<instance-id>3</instance-id>
<ports>
<port>
<instance-id>7</instance-id>
<duplex-mode>auto</duplex-mode>
</port>
</ports>
</slot>
</slots>
</chassis>
</modify>
<create
start-path="//chassis/slots/slot[instance-id='3']/ports/port[instance-id
='7']/filters/ip-filters/ip-filter[instance-id='1']">
<chassis>
<slots>
<slot>
<instance-id>3</instance-id>
<ports>
<port>
<instance-id>7</instance-id>
<filters>
<ip-filters>
<ip-filter>
<instance-id>1</instance-id>
<action>permit</action>
<direction>both</direction>
<address>
<addr-type>ipv4</addr-type>
<addr>192.168.1.1</addr>
</address>
</ip-filter>
</ip-filters>
</filters>
</port>
</ports>
</slot>
</slots>
</chassis>
</create>
But this is big and unwieldy. Along the lines of one of Andy's
suggestions, this kind of request:
<modify
start-path="//chassis/slots/slot[instance-id='3']/ports/port[instance-id
='7']">
<duplex-mode>auto</duplex-mode>
</modify>
is attractive. However this would make at least a subset of XPATH
a requirement. Also once we've started moving down this road the next
logical place to stop is XSLT. Why stop with just one memory hungry
standard when you can have two?
I'd like NETCONF to be something that does not require a Ph.D.
in XML to understand and use. We should keep it simple. This protocol
aims to replace screen-scraping, after all. It can replace floor wax
and dessert toppings in version 2.0.
Rob
--
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/>