pass fail xpath Var Var $Var foo.bar.baz $ '' $Var $Var/text() $Var/* $ $Var.bar !1 string('<scxml><final/></scxml>') $Var $Var + 1 $Var concat($Var, $Var) $Var $Var/text() + $Var/text() 123 $Var/* $Var/text() ( Var .. Var lastchild $Var $Var/* xyz foo 123 27 27 27 $Var $Var $Var $Var 's' $Var $Var $Var $Var "foo" $_event/name/text() $_event/type/text() $_event/sendid/text() $_event//text() $_event/raw/text() $_event/data/data[@id='']/text() $_event/data/data[@id='']/text() $_event/data/data[@id=Var'']/data/text() $_ioprocessors/processor[@name="http://www.w3.org/TR/scxml/#SCXMLProcessor"]/location/text() _ioprocessors/processor[@name="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"]/location/text() $_ioprocessors/processor[@name="http://www.w3.org/TR/scxml/#BasicHTTPEventProcessor"]/location/text() contains($_event/raw, 'POST') Var _event.type == 'external' contains($_event/raw, 'Var=') contains($_event/raw, '=') contains($_event/raw, ) re.search('=(\S+)$', _event.raw).groups()[0] substring-before(substring-after('Var=', $_event/raw), '&') re.search('\n\n(.*)', txt).group(1).split('&')[].split('=')[0] re.search('\n\n(.*)', txt).group(1).split('&')[].split('=')[1] $Var/text() = $Var = '' Var = 123 $Var/text() = $Var/text() $Var/data/text() = $Var = $ $_event/name = '' $_event/name and $_event/type and $_event/sendid and $_event/origin and $_event/origintype and $_event/invokeid and $_event/data In('') $Var and not($Var/text()) and not($Var/*) $_event/data/data[@id = 'Var']/text() = $_event/data = _event.data = 123 not($_event/data/*) $_name/text() = '' $_event/data/data[@id=] contains($Var, $Var) $Var/* or $Var/text() not($Var/text() or $Var/*) $/text() not(string($_event/)) ==!* true() 0>1 baz #_scxml_foo $Var/text()=$Var/text() $Var=$Var $_event/origintype/text() = '' D:\W3C\SCXMLTests\test300.py D:\foo $_event/origin/text() $_event/origintype/text()