XML Vaildation support in IntelliJ

D

donghuad

Did anyone try to edit XML And XSD in intelliJ?

I wonder whether it support some XML validations, such as:

1) nillable=false
Although I defined an element should not be null, but it still allows
empty value.

2) xs:key
i tried to use "xs:key" to make the values of an element to be unique,
but seems no any effects..

Any advices will be highly appreciated!!

Any good XML Validator could be recommended?

-Dorothy
 
D

dorothyD

What i am trying to do is to check the uniqueness of "product" as
below:


<supported-products>
<product>m5</product>
<product>m10</product>
<product>m20</product>
<product>m40</product>
<product>m160</product>
<product>t640</product>
<product>t320</product>
</supported-products>


And I defined in XSD as below:


<xs:unique name="products-name-unique">
<xs:selector xpath=".//supported-products"/>
<xs:field xpath="./product/text()"/>
</xs:unique>


But it tells that


Error:Error:line (62)c-general-xpath: The expression
'./product/text()' is not valid with respect to the XPath subset
supported by XML Schema.


Any suggestions???


Thanks !!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top