加载中…
个人资料
  • 博客等级:
  • 博客积分:
  • 博客访问:
  • 关注人气:
  • 获赠金笔:0支
  • 赠出金笔:0支
  • 荣誉徽章:
正文 字体大小:

cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1'

(2012-04-06 09:24:42)
标签:

it

分类: SSH

在从客户端向服务器端导入Excel的时候,需要与预设的XSD文档进行匹配。

有的时候在修改一列之后会提示一下错误:

<errors>
  <error column="739" line="2">cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type 'string_type'.</error>
  <error column="739" line="2">cvc-type.3.1.3: The value '' of element 'col_16' is not valid.</error>
  <error column="1112" line="2">cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type 'string_type'.</error>
  <error column="1112" line="2">cvc-type.3.1.3: The value '' of element 'col_16' is not valid.</error>
  <error column="1488" line="2">cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type 'string_type'.</error>
  <error column="1488" line="2">cvc-type.3.1.3: The value '' of element 'col_16' is not valid.</error>
  <error column="1861" line="2">cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type 'string_type'.</error>
  <error column="1861" line="2">cvc-type.3.1.3: The value '' of element 'col_16' is not valid.</error>
  <error column="2234" line="2">cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type 'string_type'.</error>
  <error column="2234" line="2">cvc-type.3.1.3: The value '' of element 'col_16' is not valid.</error>
  <error column="2610" line="2">cvc-minLength-valid: Value '' with length = '0' is not facet-valid with respect to minLength '1' for type 'string_type'.</error>
  <error column="2610" line="2">cvc-type.3.1.3: The value '' of element 'col_16' is not valid.</error>

 

以上提示的错误解决办法是:

在输入的数据中的最小长度和XSD中要求的最短长度是不符的。

解决方法:

在XSD文件中新定义数据类型将其最小长度设置为客户端要求的最短长度,相应的列使用该类型:

例如:

<xs:simpleType name="string_cifcode">
  <xs:restriction base="xs:string">
   <xs:minLength value="0"/>
  </xs:restriction>
 </xs:simpleType>

0

阅读 收藏 喜欢 打印举报/Report
  

新浪BLOG意见反馈留言板 欢迎批评指正

新浪简介 | About Sina | 广告服务 | 联系我们 | 招聘信息 | 网站律师 | SINA English | 产品答疑

新浪公司 版权所有