首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > JAVA > Java Web开发 >

xsd报错,the prefix "xml" cannot be bound to any namespace other its usua

2012-03-22 
xsd报错,the prefix xml cannot be bound to any namespace other its usual ...xsd:schema xmlnshtt

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">

热点排行