以文本方式查看主题

-  中文XML论坛 - 专业的XML技术讨论区  (http://bbs.xml.org.cn/index.asp)
--  『 DTD/XML Schema 』  (http://bbs.xml.org.cn/list.asp?boardid=23)
----  Axis 1.0 不支持simpleContent extension and restriction 有什么替代方法吗  (http://bbs.xml.org.cn/dispbbs.asp?boardid=23&rootid=&id=39736)


--  作者:king821221
--  发布时间:11/6/2006 12:01:00 PM

--  Axis 1.0 不支持simpleContent extension and restriction 有什么替代方法吗
各位高人:
   我正在升级我们的系统使用的AXIS。原来用的是0.0.95。现在要升级到1.0.0。但是编译是遇到一个大问题:
   Unsupported Simple Content Extension
我的xml schema文件中使用了simpleContent,我上AXIS的官方网站去看了看,发现如下
解释:
Apache Axis2 Version 1.0
Known Issues and Limitations
   Axis Data Binding (ADB) does not cover all of XML Schema; its an 80-20 design  point. Unsupported XML Schema features include:
    Simple content extension and restriction
   Complex content restriction
看到这个后,我差点没晕掉。我的文件中 Simple content extension and restriction 是基本元素,它竟然不支持。但是我不能改变生成的XML 文件的形式,唯一的办法找一个替代方法,但是没找到,所以来找各位帮忙啦:
比如:
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"

    xmlns:ego="http://www.egocom/ego/2005/05/schema"

    targetNamespace="http://www.egodddscom/ego/2005/05/schema" elementFormDefault="qualified">

   <xsd:element name="Rlimit">

     <xsd:complexType>

        <xsd:simpleContent>

            <xsd:extension base="xsd:integer">

                 <xsd:attribute name="name" type="ego:rlimitName" use="required"/>

                 <xsd:attribute name="type" type="ego:rlimitType" default="soft"/>

            </xsd:extension>

        </xsd:simpleContent>

      </xsd:complexType>

</xsd:element>

The result xml file should be :

<ego:Rlimit
name=" ego:rlimitName [1]"
type=" ego:rlimitType [0..1]">
xsd:integer
</ego:Rlimit>


--  作者:king821221
--  发布时间:11/6/2006 1:19:00 PM

--  
我试过很多方法 ,但是目前为止都不能在不改变生成XML文件格式的前提下解决这个问题
如果有什么高见,请发到我的邮箱:king821221@163.com
--  作者:ufouser
--  发布时间:5/15/2009 11:33:00 AM

--  
试试complexContent呢
W 3 C h i n a ( since 2003 ) 旗 下 站 点
苏ICP备05006046号《全国人大常委会关于维护互联网安全的决定》《计算机信息网络国际联网安全保护管理办法》
46.875ms