How to check if an XML document maps the same namespace prefix to two different namespace URIs (at different points).
If the condition above is met, print "YES", else do not print anything.
The input to the XQuery can be any well-formed XML file.
I am very new to XQuery and I just know the basics of XPath 1.0 and 2.0
The way I want to tackle the problem is the following: Get list of all namespace definitions in the file and then check if any of those appears twice in the file.
Example of attribute list we want to obtain (xmlns:f, xmlns:l, xmlns:d, xmlns:f). Then if any of the element of the list appears more than one time in the list, we need to return "YES", but I have no idea how to do this.