Closed kaby76 closed 2 years ago
Using the Arithmetic expression grammar, I can now print out the trees that have a certain depth:
trparse in.txt | trxgrep ' //SCIENTIFIC_NUMBER[count(ancestor::*) > 45]' | trtree
Basically, a problem in XSInteger parsing a string value. Fixed in the next release.
Fixed in v0.12.0
1+2+3+4+5+6+7+8+9
trparse in.txt | trxgrep ' count(//SCIENTIFIC_NUMBER/ancestor::*)'
Note, the xpath implementation doesn't have a way to create a tuple, so I can't do a count, and also return the node. That's a failure in xpath2 and I don't think it's available in xpath3.
This crashes in trxgrep. If I remove the function call "count()", it works.