History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: IDEADEV-25333
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Maxim Mossienko
Reporter: Serge Baranov
Votes: 0
Watchers: 1
Operations

If you were logged in you would be able to see more operations.
IDEA: Development

XML empty namespace URI can't be ignored

Created: 12 Mar 08 17:00   Updated: 17 Mar 08 17:44
Component/s: XML editing
Fix Version/s: Diana 8243, Selena 7.0.4

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown

Build: 7,590
Fixed in build: 8,232
Severity: Medium


 Description  « Hide
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.



 All   Comments   Work Log   Change History      Sort Order:
Sascha Weinreuter - 12 Mar 08 17:09
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 - 12 Mar 08 20:05
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 - 14 Mar 08 20:44
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 - 14 Mar 08 20:56

[...] 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 - 14 Mar 08 21:07
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 - 17 Mar 08 16:57
for convenience