> Using a label instead of a key would make all this much easier, since
> you could just request all the nodes called "service". Furthermore, it
> wouldn't change the structure of the tree at all, since the value
> currently used as the node name (using key) would become the node
> value (currently unset), hence having:

I agree with you. XPath comes from XML, and the path itself is made of
element names, that are declared in a document type definition or a
schema. In other word, it should be possible to know in advance all the
different paths to query the tree. Any user defined string should be in
a value. Your example is a good one, because the service name is a key
and is user defined, hence this should be a value instead. 

Maybe we can make this policy clear on the wiki, for example: 
http://augeas.net/page/Common_patterns

It breaks compatibility with clients assuming the legacy tree
structure... If we change it, we have to make it clear in the next
release to inform people about changes and urge update their scripts,
until we have a better way to handle such situations...  

Cheer, 

Francis

_______________________________________________
augeas-devel mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/augeas-devel

Reply via email to