Improbe XPath syntax to be more robust against changes in signal order

This commit is contained in:
Sebastian Dröge 2009-05-28 10:43:08 +02:00
parent 5e66913e72
commit f0a7451058
2 changed files with 7 additions and 7 deletions

View file

@ -1,8 +1,8 @@
<?xml version="1.0"?>
<metadata>
<attr path="/element/element-signals/signal[1]/params/type[1]" name="name">Pad</attr>
<attr path="/element/element-signals/signal[1]/params/type[2]" name="name">Last</attr>
<attr path="/element/element-signals/signal[2]/params/type[1]" name="name">Pad</attr>
<attr path="/element/element-signals/signal[3]/params/type[1]" name="name">Pad</attr>
<attr path="/element/element-signals/signal[3]/params/type[2]" name="name">Caps</attr>
<attr path="/element/element-signals/signal/name[child::text()='new-decoded-pad']/../params/type[1]" name="name">Pad</attr>
<attr path="/element/element-signals/signal/name[child::text()='new-decoded-pad']/../params/type[2]" name="name">Last</attr>
<attr path="/element/element-signals/signal/name[child::text()='removed-decoded-pad']/../params/type[1]" name="name">Pad</attr>
<attr path="/element/element-signals/signal/name[child::text()='unknown-type']/../params/type[1]" name="name">Pad</attr>
<attr path="/element/element-signals/signal/name[child::text()='unknown-type']/../params/type[2]" name="name">Caps</attr>
</metadata>

View file

@ -1,5 +1,5 @@
<?xml version="1.0"?>
<metadata>
<attr path="/element/element-signals/signal[1]/params/type[1]" name="name">Probability</attr>
<attr path="/element/element-signals/signal[1]/params/type[2]" name="name">Caps</attr>
<attr path="/element/element-signals/signal/name[child::text()='have-type']/../params/type[1]" name="name">Probability</attr>
<attr path="/element/element-signals/signal/name[child::text()='have-type']/../params/type[2]" name="name">Caps</attr>
</metadata>