SimpleType和Attribute的XML Schema?

我正在尝试创建一个可以捕获 XMLXML模式,看起来像这样:
<tagname description="simple string type attribute">
false <!-- simple boolean type -->
</tagname>

但遇到困难.甚至可以定义一个模式来捕获这个或是我在snipe hunt

干得好
<xs:element name="tagname">
        <xs:complexType>
            <xs:simpleContent>
                <xs:extension base="xs:boolean">
                    <xs:attribute name="description" type="xs:string" use="required"/>
                </xs:extension>
            </xs:simpleContent>
        </xs:complexType>
    </xs:element>

这里是经过验证的样品

<tagname xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="file:/C:/Untitled2.xsd" description="123">
    true
</tagname>

相关文章

php输出xml格式字符串
J2ME Mobile 3D入门教程系列文章之一
XML轻松学习手册
XML入门的常见问题(一)
XML入门的常见问题(三)
XML轻松学习手册(2)XML概念