XML not showing an error with XML schema 1.1
Answered
I have set XML schema version to 1.1 in Idea's settings, but this XML:
<?xml version="1.0" encoding="UTF-8"?>
<data min="14" max="10" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="assert.xsd" />does not show an error for min being greater than max with this XSD:
<xs:schema attributeFormDefault="unqualified" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:element name="data">
<xs:complexType>
<xs:attribute name="min" type="xs:int"/>
<xs:attribute name="max" type="xs:int"/>
<xs:assert test="@min le @max"/>
</xs:complexType>
</xs:element>
</xs:schema>Is there a problem with IDEA, or does the value in settings only affect the validation of the XSD and not the XML?
Please sign in to leave a comment.
Hi Stephen,
It is a problem with IDEA indeed. You are welcome to upvote the corresponding issue, IJPL-108981.
There are no workarounds for it I'm afraid.
See this article if you are not familiar with our bug tracking system.