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

Key: IDEADEV-5534
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Normal Normal
Assignee: Maxim Mossienko
Reporter: Jason Winnebeck
Votes: 0
Watchers: 1
Operations

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

Internal IDEA validation does not understand xs:any

Created: 10 Apr 06 17:46   Updated: 17 Apr 06 18:21
Component/s: XML editing
Fix Version/s: Demetra 5231, 5.1.2

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
File Attachments: 1. XML File anyBug.xml (0.2 kb)
2. File anyBug.xsd (0.4 kb)

Environment: IDEA 5.1.1 Windows XP bundled JRE 1.5

Build: 4,192
Fixed in build: 5,227
Severity: Medium


 Description  « Hide
This bug is related to IDEADEV-5076, 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.

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>
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>


 All   Comments   Work Log   Change History      Sort Order:
Jason Winnebeck - 10 Apr 06 17:51
Formatting fixes

Maxim Mossienko - 10 Apr 06 20:38
IDEA complains that aValidTag has no definition (in IDEADEV-5076 there is one). Why this message is not appropriate for you?

Jason Winnebeck - 10 Apr 06 21:17
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.