의 유효성을 검사하는 방법은 JDK 7하게 IntelliJ IDEA는 : XML 스키마 1
와 IDEA 1302에서 XML 스키마 1.1을 시도하고 이것은 내가 튜토리얼에서 가져온 XML 스키마 코드입니다. 내가하게 IntelliJ IDEA에서이 파일을 열고 "유효성 검사"를 클릭하면, 다음과 같은 오류를 얻을 :
CVC-복잡한 type.2.4.a을 : 잘못된 내용이 요소 'OpenContent라는'로 시작 발견되었다. '{ "http://www.w3.org/2001/XMLSchema"중 하나 주석, "http://www.w3.org/2001/XMLSchema"simpleContent를, "http://www.w3.org/2001/XMLSchema"complexContent, "http://www.w3.org/2001/XMLSchema"그룹 "http://www.w3.org/2001/XMLSchema"모든 "http://www.w3.org/2001/XMLSchema"선택 "http://www.w3.org/2001/XMLSchema" : sequence, "http://www.w3.org/2001/XMLSchema": 속성, "http://www.w3.org/2001/XMLSchema": attributeGroup, "http://www.w3.org/2001/XMLSchema : anyAttribute} '가 필요합니다.
<?xml version="1.0"?> <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.books.org" xmlns:pub="http://www.books.org" elementFormDefault="qualified"> <complexType name="Publication" abstract="true"> <openContent mode="interleave"> <any /> </openContent> <sequence> <element name="Title" type="string" /> <element name="Author" type="string" /> <element name="Date" type="gYear"/> </sequence> </complexType> <complexType name="BookPublication"> <complexContent> <extension base="pub:Publication"> <openContent mode="none"> </openContent> <sequence> <element name="ISBN" type="string"/> <element name="Publisher" type="string"/> </sequence> </extension> </complexContent> </complexType> <element name="BookStore"> <complexType> <sequence> <element name="Book" type="pub:BookPublication" maxOccurs="unbounded" /> </sequence> </complexType> </element> </schema>
IDEA에서 사용하는 유효성 검사기를이를 확인하거나 업그레이드 할 수있는 방법이 있나요 :
이
는 XSD 파일은 XML 스키마 1.1 향상된 기능을 사용하고 있습니다?<schema>
에 xmlns:vc="http://www.w3.org/2007/XMLSchema-versioning"
및 vc:minVersion="1.1"
를 추가
[스키마 1.1 기능이 필요한 xml 스키마를 나타내는 방법] (https://stackoverflow.com/questions/21555511/how-to-indicate-that-an-xml-schema-that- requires-schema-1-1-features) – Joost