Book a Demo

Author Topic: XML schema - simple type extension  (Read 3579 times)

dobrmat

  • EA Novice
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
XML schema - simple type extension
« on: January 13, 2011, 06:21:26 am »
I have problem with generating schema which includes extension of simple type.
When I import schema:

<?xml version="1.0" encoding="ISO-8859-2"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<xsd:complexType name="widthType">
   <xsd:simpleContent>
     <xsd:extension base="xsd:decimal">
       <xsd:attribute name="units" type="xsd:string" use="optional"/>
     </xsd:extension>
   </xsd:simpleContent>
</xsd:complexType>
</xsd:schema>

EA creates simple type 'decimal', that is restriction of 'xsd:decimal'.
When I generate this schema it has the following form:

<?xml version="1.0" encoding="ISO-8859-2"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema">
      <xsd:complexType name="widthType">
            <xsd:simpleContent>
                  <xsd:extension base="decimal">
                        <xsd:attribute name="units" use="optional" type="xsd:string"/>
                  </xsd:extension>
            </xsd:simpleContent>
      </xsd:complexType>
      <xsd:simpleType name="decimal">
            <xsd:restriction base="xsd:decimal"/>
      </xsd:simpleType>
</xsd:schema>

How to avoid  generating of  type 'decimal'? It should be simply 'xsd:decimal' as in original schema.