Hi An,
the root function returns the root of the tree to which the current node belongs, usually be a document node. You can retrieve the attribute according to your root element e.g. by $otx/ROOT_ELEMENT/@package, where ROOT_ELEMENT ist the root element of your document.
Lukas
Hi,In my xquery, I use the root() function to return the root element of an element. I could get the root element, but I couldn't get any attributes of it.For example:for $value in collection()/otx/imports/importlet $otx:=root($value)return $otx/@packageThanksCheers,An
_______________________________________________
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk