Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Problem Flattening XSD Files >Thread Next - Re: Problem Flattening XSD Files Re: Problem Flattening XSD FilesTo: NULL Date: 6/3/2007 6:07:00 PM
Hi,
You can do it in a single step as:
<xs:complexType name="TemperatureType4">
<xs:simpleContent>
<xs:restriction base="xs:anyType">
<xs:simpleType>
<xs:restriction base="xs:long">
<xs:minInclusive value="0"/>
</xs:restriction>
</xs:simpleType>
<xs:attribute name="AnAttr" type="xs:string"/>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
But why would you want to get rid of global types?
Priscilla
-------------------------------------------------------------------------
Priscilla Walmsley
http://www.datypic.com
Author, Definitive XML Schema (Prentice Hall 2001)
XQuery (O'Reilly 2007)
-------------------------------------------------------------------------
"uncaged" <uncaged@d...> wrote in message
news:25708CF6-628B-4A41-8C4C-2F5335515958@m......
> I'm writing an XSD flattener, that gets rid of global simple and complex
> types by merging them into global elements as anonymous types. Where I'm
> having trouble is when mixing restriction and extension of a
> simpleContent.
> For example:
>
> <xs:simpleType name="positiveLong">
> <xs:restriction base="xs:long">
> <xs:minInclusive value="0"/>
> </xs:restriction>
> </xs:simpleType>
>
> <xs:element name="positiveLongWithAttribute">
> <xs:complexType>
> <xs:simpleContent>
> <xs:extension base="x:positiveLong">
> <xs:attribute name="AnAttr" type="xs:string"/>
> </xs:extension>
> </xs:simpleContent>
> </xs:complexType>
> </xs:element>
>
> Thanks in advance.
>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
