The XML editor could highlight unused namespace declarations (using grey color).
In addition, intention to remove usused namespace declaration could be added.
"Usages" from xsi:schemaLocation attribute should be ignored I presume.
Description
The XML editor could highlight unused namespace declarations (using grey color).
In addition, intention to remove usused namespace declaration could be added.
"Usages" from xsi:schemaLocation attribute should be ignored I presume.
This has to be handled with care because the declared prefix could be used by some non-native xml mechanism, like in XSLT where you need an "ordinary" namespace declaration to use a prefix in an XPath expression but which would appear as unused.
Of course this could be solved by providing a proper API to track declarations and their usages, including those from plugins - which would hopefully also introduce the ability to rename namespace prefixes...
Sascha Weinreuter - 14 Nov 07 01:07 This has to be handled with care because the declared prefix could be used by some non-native xml mechanism, like in XSLT where you need an "ordinary" namespace declaration to use a prefix in an XPath expression but which would appear as unused.
Of course this could be solved by providing a proper API to track declarations and their usages, including those from plugins - which would hopefully also introduce the ability to rename namespace prefixes...
Indeed, I postponed creating this issue in the past because of such edge cases.
+1 for prefix renaming.
Prefix highlighting would also be nice, however I also like the current "prefix+tagname" based resolving.
Perhaps highlighting could work at least from namespace declaration? (at the moment the text-based highlighting is not quite useful if the prefix is short - or worse, only a single character like the "c" taglib in JSPX)
Taras Tielkes - 14 Nov 07 02:15 Indeed, I postponed creating this issue in the past because of such edge cases.
+1 for prefix renaming.
Prefix highlighting would also be nice, however I also like the current "prefix+tagname" based resolving.
Perhaps highlighting could work at least from namespace declaration? (at the moment the text-based highlighting is not quite useful if the prefix is short - or worse, only a single character like the "c" taglib in JSPX)
Of course this could be solved by providing a proper API to track declarations and their usages, including those from plugins - which would hopefully also introduce the ability to rename namespace prefixes...