Altova Mailing List Archives>Archive Index >microsoft.public.xml Archive Home >Recent entries >Thread Prev - Re: Problem Flattening XSD Files [Thread Next] Re: Problem Flattening XSD FilesTo: NULL Date: 6/3/2007 11:09:00 PM Dear Priscilla, Thank you so much. I was trying to leave both the extension and restriction in the same element, which is illegal. To answer your question, I have two versions of a very long XSD file. I wrote an application to the older version and I must now update it to use the newer version, so I need to see what changed between the versions. The problem is that the XSD has undergone significant structural and global name changes, so a text comparison is useless. After I "flatten" both versions, I'll then be able to do a meaningful text comparison. Thanks for your help, and for writing your highly-informative book, which I've been referring to regularly. "Priscilla Walmsley" wrote: > 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 | |||
|
