[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Whacky XML editor in Intellij IDEA
Hello! 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 <foo xmlns="http://whacky.com"/> 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 [1], where they defend this behaviour, referring to the section 4.3.2 of the "XML Schema Part 1: Structures" [2], 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." and: "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 any order: ... 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? [1] http://www.intellij.net/forums/thread.jsp?forum=5&thread=2021 [2] http://www.w3.org/TR/xmlschema-1/#schema-loc -- Oleg Tkachenko http://blog.tkachenko.com Multiconn Technologies, Israel
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|