Thanks for your replies,
Dear Anders,
I'm sorry: information on the original line and columns gets lost as
soon as a database, or a main memory instance of a document, is
created. If you look for ways to address the same XML nodes multiple
times, you may want to have a look at the fn:path(); it returns an
XPath expression to the adressed nodes [1]. A simple example:
for $item in doc('http://files.basex.org/xml/xmark.xml')//item
return path($item)
If you have create a database from your files, you can also use the
BaseX-specific db:node-pre() and db:open-pre() functions to directly
address nodes [2].
Hope this helps,
Christian
[1] http://www.w3.org/TR/xpath-functions-30/#func-path
[2] http://docs.basex.org/wiki/Database_Module
___________________________
On Wed, Jan 11, 2012 at 11:28 PM, Anders Hessellund
<anders.hessellund@gmail.com> wrote:
> Hi,
>
> we are experimenting with BaseX as a database for a large set of local XML
> files (3000-4000). When we query for individual elements and attributes in
> this portfolio of XML documents, is there any way to get location
> information about concrete elements and attributes. Specifically, we need to
> know filename, line number and column of element (start tags) and
> attributes. Is this possible? And if so, how?
>
> Thanks,
> Anders