(for $node in $doc//(@*,*)let $nn := node-name($node)let $ns-uri := namespace-uri-from-QName($nn)let $prefix := prefix-from-QName($nn)where $ns-urireturn ``[declare namespace `{ $prefix }` = "`{ $ns-uri }`"]``) => distinct-values()=> string-join(out:nl())
Am 14.02.2020 um 09:27 schrieb thufir <hawat.thufir@gmail.com>:I think I mainly need to add a namespace for fods:
thufir@dur:~/fods/flwor$
thufir@dur:~/fods/flwor$ basex text.xq
Stopped at /home/thufir/fods/flwor/text.xq, 3/14:
[XPST0081] No namespace declared for 'text:p'.
thufir@dur:~/fods/flwor$
thufir@dur:~/fods/flwor$ cat text.xq
for $foo in db:open("foo")
return $foo//text:p
thufir@dur:~/fods/flwor$
https://stackoverflow.com/q/60222478/262852
how do I know all the namespacess? from the libre office file?