Priority
Normal
Type
Bug 
State
Fixed 
Assignee
Maxim Mossienko 
Subsystem
XML editing 
Affected versions
Fixed in
Fixed in build
Next build 
Build
7590
Fixed in build
8232
Severity
0
  • Submitted by   Serge Baranov
    22 months ago (12 Mar 2008 17:00)
  • Updated by   root
    3 weeks ago (17 Jan 2010 19:58)
  • Jira: IDEA-43113
    (history, comments)

IDEA-43113

XML empty namespace URI can't be ignored

0
Support feedback:

I have XML that has namespaces associated with the empty URI: Example

<foo xmlns:em="">blah</foo>

Although I have told Idea to ignore the external resource (and I double checked to make sure it made it into the ignore table) the editor continues to complain that the URI is unknown. Ignoring all other URIs has worked so I'm assuming its just the empty namespace it has problems with.

Issue was resolved
Comments (6)
 
History (1)
 
Links
 
Sascha Weinreuter
  Sascha Weinreuter
12 Mar 2008 17:09
(22 months ago)
#permalink
Hmm, as far as I know (not 100% sure though), it is not allowed to map any prefix to the empty URI. Only {{xmlns=""}} is valid - which is not flagged by IDEA.
Maxim Mossienko
  Maxim Mossienko
12 Mar 2008 20:05
(22 months ago)
#permalink
Xerces reports: The value of the attribute "prefix="xmlns",localpart="em",rawname="xmlns:em"" is invalid. Prefixed namespace bindings may not be empty.
William LaForest
  William LaForest
14 Mar 2008 20:44
(22 months ago)
#permalink
Although technically not allowed by the XML spec neither is having a non-prefixed namespace.(http://www.w3.org/TR/REC-xml-names/#sec-namespace). It is allowed by various parsers and editors and can be useful. Isn't it possible to support it in some fashion? Perhaps have something that allows you to ignore this specific error?

In any event I think some change would be good because the editor acts like it is letting you ignore (and in fact puts it in the ignore list) and then continues to flag it. Perhaps just disabling the ignore option for this?
Sascha Weinreuter
  Sascha Weinreuter
14 Mar 2008 20:56
(22 months ago)
#permalink
bq. [...] neither is having a non-prefixed namespace

Not quite. The spec says in Section 6.2 "Namespace Defaulting":

The attribute value in a default namespace declaration MAY be empty. This has the same effect, within the scope of the declaration, of there being no default namespace.


I agree though that the handling could be improved. Something about an unknown URI isn't the best possible error message ;)
William LaForest
  William LaForest
14 Mar 2008 21:07
(22 months ago)
#permalink
Ok.. I didn't think there was a problem with an empty URI for namespace but in the spec I was reading it specifically said:

The empty string, though it is a legal URI reference, cannot be used as a namespace name.


In any event I would much prefer to have an action which allows you to ignore this specific parse complaint so that if you want a document with empty prefixed name spaces to validate you could. This would be similar to ignoring certain complains in java.
Maxim Mossienko
  Maxim Mossienko
17 Mar 2008 16:57
(22 months ago)
#permalink
for convenience