bblfsh / web

Web client for Babelfish server
http://dashboard.bblf.sh
GNU General Public License v3.0
23 stars 21 forks source link

@type XPath does not work in Semantic mode #196

Closed vmarkovtsev closed 5 years ago

vmarkovtsev commented 5 years ago

I search by //*[@type='uast:FunctionGroup'] XPath in Semantic mode and get 0 results. Tried Go and Python samples. This is unexpected, because, e.g. //*[@role='Comment'] works.

Having played a little, I see that no @type-based XPath works for all the samples.

P.S. //name in Java and //Name in Go work, too.

dennwc commented 5 years ago

@type maps directly to XML node name/type, so should be: //uast:FunctionGroup.

vmarkovtsev commented 5 years ago

This indeed works.

vmarkovtsev commented 5 years ago

Right, RTFM: it is written in the docs.