当前位置: 代码迷 >> Java Web开发 >> xsd报错,the prefix "xml" cannot be bound to any namespace other its usual .该怎么解决
  详细解决方案

xsd报错,the prefix "xml" cannot be bound to any namespace other its usual .该怎么解决

热度:996   发布时间:2016-04-17 10:32:38.0
xsd报错,the prefix "xml" cannot be bound to any namespace other its usual ...
<xsd:schema xmlns="http://www.w3.org/XML/1998/namespace" 
  targetNamespace="http://www.w3.org/XML/1998/namespace" 
  xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
  elementFormDefault="qualified">
报错如下
The prefix "xml" cannot be bound to any namespace other than its usual namespace; neither can the namespace for "xml" be bound to any prefix other than "xml".
请高人指点指点

------解决方案--------------------
<xsd:schema 
targetNamespace="http://www.w3.org/XML/1998/namespace" 
xmlns:xsd="http://www.w3.org/2001/XMLSchema" 
elementFormDefault="qualified">

或者干脆

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
  相关解决方案