Problem with validation of XSD 1.1

Hello,

at first: sorry for every grammar and typing error in the following lines, but english isn't my native language ..... I hope that it's readable yet :).

Actually I try to validate a xml schema v1.1 (because I want to use the assert functionality) with PhpStorm 7.0, but the validation of the xsd file fails and I get the following error message:

cvc-complex-type.2.4.a: Invalid content was found starting with element 'xs:assert'. One of '{"http://www.w3.org/2001/XMLSchema":attribute, "http://www.w3.org/2001/XMLSchema":attributeGroup, "http://www.w3.org/2001/XMLSchema":anyAttribute}' is expected.


I was not really sure about if this is a problem of the IDE, or if I did something wrong with the XSD ... so I searched for a solution of this problem, but haven't found something yet.

I would be glad, if someone can give me an advice on how this could be done.

By the way - this is the example xsd file I tried:

<?xml version="1.0" encoding="UTF-8"?> <xs:schema         xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://tf/test" targetNamespace="http://tf/test"         elementFormDefault="qualified">     <xs:element name="root" type="rootType"/>     <xs:complexType name="rootType">         <xs:all minOccurs="0">             <xs:element name="example">                 <xs:complexType>                     <xs:sequence>                         <xs:element name="example_1"/>                         <xs:element name="example_2"/>                         <xs:element name="example_3" minOccurs="0"/>                         <xs:element name="example_4"/>                     </xs:sequence>                     <xs:assert test="(example_4 = '1' and not(example_3))"/>                 </xs:complexType>             </xs:element>         </xs:all>     </xs:complexType> </xs:schema>


Regards.

0

Hello,

We've checked the file you provided in the post and it validates OK without assert function. For now, xsd 1.1 is not supported out-of-the-box, but you can check discussion at http://youtrack.jetbrains.com/issue/IDEA-108745 - there is a way to change xerces jar file, however, it's not recommended - it might be not stable and officially not supported. The library will be updated in the distribution when it becomes stable and well-tested.

Thank you!

0

Thank you for reply - so actually the best solution for me is to use a workaround until the xsd 1.1 is stable and supported natively (without the use of any tricks) by the distribution.

Thank you for support!

0

请先登录再写评论。