I agree you can use "the", or leave it out. You don't have to be consistent and always use "the", or never use it. As a native British English speaker I would probably write
I changed the command doc('t.xq')
in front of variables $p
and $q
with the variable $db
as follows. Now it works (plus, I used
function last()
to have the last (lowest) common ancestor).
but I can't explain why that "sounds right" to me, sorry!
Often in this type of writing, the reader already knows that variables must always start with $
and function calls are always followed by (...)
, etc. So you can use the variable and function names as "proper names" (like the names of people, cities, etc) which are never preceded by "the". For example
I changed [the] command doc('t.xq')
in front of $p
and $q
with $db
as follows. Now it works (plus, I used
last()
to have the last (lowest) common ancestor).
doc('t.xq')
should be after "command" though.