schema写好后用xmlbeans打包生成xml,发现头部的attribute不能设置
这个是要求生成后的xml
<?xml version="1.0" encoding="UTF-8"?>
<root xmlns="urn:Declaration:datamodel:standard:CN:1000:1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<Head>
  <.....>
</Head>
<detail>
  <.....>
</detail>
<root>schema写法是这样
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"elementFormDefault="qualified">
<xs:element name="root">
<xs:complexType>
<xs:sequence>
<xs:element maxOccurs="unbounded" name="Head" type="Head"/>
<xs:element maxOccurs="unbounded" name="detail" type="detail" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:complexType name="Head">
    <some element......>
</xs:complexType>
<xs:complexType name="detail">
    <some element......>
</xs:complexType>
</xs:schema>生成以下:
<?xml version="1.0" encoding="UTF-8"?>
<root>
<Head>
  <.....>
</Head>
<detail>
  <.....>
</detail>
<root>问题:
<root xmlns="urn:Declaration:datamodel:standard:CN:1000:1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
在schema如何设置才生成出来?