Priority
Normal
Type
Bug 
State
Fixed 
Assignee
Maxim Mossienko 
Subsystem
XML editing 
Affected versions
Fixed in
Fixed in build
Next build 
Build
4192
Fixed in build
5227
Severity
0
  • Submitted by   Jason Winnebeck
    3 years ago (10 Apr 2006 17:46)
  • Updated by   root
    3 weeks ago (17 Jan 2010 19:28)
  • Jira: IDEA-31938
    (history, comments)

IDEA-31938

Internal IDEA validation does not understand xs:any

This bug is related to IDEA-31626, which I thought was related close enough that the fix there would fix this, but it didn't -- IDEA is marking xs:any content as red when it doesn't need to. The right-click->validate validates successfully, and the XML is loaded properly in the applications, which also validates against the schema as well using Xerces. I believe it also passes XMLSpy's tests.

The actual files I am working with are a lot more complicated than this, but the following example reproduces the problem.

{code:xml|title=anyBug.xsd}
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>

{code:xml|title=anybug.xml}
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="anyBug.xsd">
	<aValidTag>

	</aValidTag>
</root>


Environment: IDEA 5.1.1 Windows XP bundled JRE 1.5

Issue was resolved
Comments (3)
 
History (1)
 
Links
 
Jason Winnebeck
  Jason Winnebeck
10 Apr 2006 17:51
(3 years ago)
#permalink
Formatting fixes
Maxim Mossienko
  Maxim Mossienko
10 Apr 2006 20:38
(3 years ago)
#permalink
IDEA complains that aValidTag has no definition (in IDEA-31626 there is one). Why this message is not appropriate for you?
Jason Winnebeck
  Jason Winnebeck
10 Apr 2006 21:17
(3 years ago)
#permalink
It bothers me because IDEA marks up the file in red everywhere and marks the file as having errors, when in fact there are no errors in the file, because xs:any can stand for any tag. An XML validator normally would pass this file with no errors or warnings. In much larger files the red markup will be everywhere in the file and it is annoying.

The message may be appropriate, but then is there a way to get IDEA to stop marking those tags as errors? Really that is my problem is that all of the errors are visually distracting when editing the document and also make it harder to find "real" errors. Even if it were possible to turn off validation completely on the file (but IDEA still uses the schema to auto-complete tags if possbible), it might be a better situtation than what happens now.