As BaseX does not work on the XML textual representation, it might not be 
possible.


De : BaseX-Talk [mailto:basex-talk-boun...@mailman.uni-konstanz.de] De la part 
de ????? ??????
Envoyé : jeudi 5 juillet 2018 17:10
À : basex-talk@mailman.uni-konstanz.de
Objet : [basex-talk] Add line-number function



Hello, could the $err:line-number [1] variable help you ?

[1] http://docs.basex.org/wiki/XQuery_3.0#Try.2FCatch

Best regards,

Fabrice ETANCHAUD
cerfrancepch
No, $err:line-number show line number of xquery file.
I want this:

Example.xml ->
1: <root>
2:   <child>
3:      <grandchild>text1</grandchild>
4:      <grandchild>text2</grandchild>
5:      <grandchild>text3</grandchild>
6:      <grandchild>text4</grandchild>
7:    </child>
8: </root>

Xquery ->
let $f := doc("example.xml")
let $e := $f/root/child[1]/grandchild[3]

let $line := line-number($e)

And I want get $line = 5 !

Reply via email to