Lists Home |
Date Index |
- To: xml-dev <email@example.com>
- Subject: Whacky XML editor in Intellij IDEA
- From: Oleg Tkachenko <firstname.lastname@example.org>
- Date: Fri, 29 Oct 2004 23:21:24 +0200
- Organization: Multiconn Technologies
- User-agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.3) Gecko/20040910
Talking about namespaces - surprisingly I found out there is a growing
amount of developers who truly believe any namespace URI in a XML
document must be resolvable to a schema document and otherwise XML
document isn't valid.
After some hot debates I found out the root of this belief is whacky
behaviour of (new?) Intellij IDEA's XML editor.
I just installed fresh IDEA release, created new XML file and typed
IDEA markes this line as error, highlighting "http://whacky.com" in red
and tooltiping "URI is not registered (Settings | IDE Settings |
Resources)". That means I supposed to go to Resources dialog and either
add http://whacky.com to the list of ignored external resources or to
map it to a local XML schema file.
I googled out a thread in IDEA support forum , where they defend this
behaviour, referring to the section 4.3.2 of the "XML Schema Part 1:
Structures" , which particularly says:
"Note: Experience suggests that it is not in all cases safe or
desirable from a performance point of view to dereference namespace
names as a matter of course. User community and/or consumer/provider
agreements may establish circumstances in which such dereference is a
sensible default strategy: this specification allows but does not
require particular communities to establish and implement such
conventions. Users are always free to supply namespace names as schema
location information when dereferencing is desired: see below."
"Given a namespace name (or none) and (optionally) a URI reference from
xsi:schemaLocation or xsi:noNamespaceSchemaLocation, schema-aware
processors may implement any combination of the following strategies, in
5 Attempt to resolve the namespace name to locate such a resource."
So they believe that's just fine and conformant.
Now while it's weird for me when XML editor forces me to resolve
namespace URI, apparently many Java devs working in IDEA (which is quite
popular IDE) take it as granted.
Can we (and should we) do something about it?
Multiconn Technologies, Israel