Any ideas?_______________________________________________Anfang der weitergeleiteten E-Mail:Von: Truong An Nguyen <ngtruongan@gmail.com>Betreff: Re: [basex-talk] Error by retrieving an attribute of the element returned by the root functionDatum: 21. November 2011 14:38:51 MEZAn: Lukas Lewandowski <lukas.lewandowski@uni-konstanz.de>
Thanks very much for your response.How can I use "instance of" with Basex? I can not do: $a instance of Action. Action an abstract ComplexType.ThanksAnOn Mon, Nov 21, 2011 at 10:34 AM, Lukas Lewandowski <lukas.lewandowski@uni-konstanz.de> wrote:
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.
Lukas2011/11/21 Truong An Nguyen <ngtruongan@gmail.com>_______________________________________________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
BaseX-Talk mailing list
BaseX-Talk@mailman.uni-konstanz.de
https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk