[augeas-devel] [Augeas] #19: Enhance XPath notation
Augeas
trac at fedorahosted.org
Wed Sep 3 22:52:35 UTC 2008
#19: Enhance XPath notation
-------------------------+--------------------------------------------------
Reporter: lutter | Owner: lutter
Type: enhancement | Status: new
Priority: major | Milestone: wishlist
Component: Augeas | Version: 0.3.0
Keywords: |
-------------------------+--------------------------------------------------
Enhance the path expressions that Augeas understands to include constructs
like
{{{
/files/etc/hosts/*[ipaddr = "127.0.0.1"]
/files/etc/hosts/*[ipaddr = "127.0.0.1"]/alias[last() - 1]
/augeas/files//error
/files/etc/puppet/puppet.conf/section[value() = "main"]/vardir
}}}
A very rough sketch at a grammar is
{{{
PathExpr ::= (("/" | "//") StepExpr)+
StepExpr ::= (Name | "*" | "..") PredicateList
PredicateList ::= "[" PredExpr "]" *
PredExpr ::= ValueTest | PositionTest
ValueTest ::= (Name | "value()") "=" ValueLiteral
PositionTest ::= Number | "last()" ( "-" Number )
Name ::= /[^/[()]+/
ValueLiteral ::= '"' /[^"]*/ '"' | "'" /[^']*/ "'" | "nil"
Number ::= /[0-9]+/
}}}
--
Ticket URL: <https://fedorahosted.org/augeas/ticket/19>
Augeas <http://augeas.net/>
a configuration API
More information about the augeas-devel
mailing list