Note lack of doc()
function in this query:
for $title in /bib/book/title
return
$title
Therefore context node must be provided by environment.
With Saxon we can use the -s
command line flag
to specify the input file:
% java -cp saxon7.jar net.sf.saxon.Query -s bib.xml query1.5 <?xml version="1.0" encoding="UTF-8"?> <title>TCP/IP Illustrated</title> <?xml version="1.0" encoding="UTF-8"?> <title>Advanced Programming in the Unix Environment</title> <?xml version="1.0" encoding="UTF-8"?> <title>Data on the Web</title> <?xml version="1.0" encoding="UTF-8"?> <title>The Economics of Technology and Content for Digital TV</title>