Hi Sheen,

This is an XML transformation issue, i.e. XSLT.  The way to achive
this is to write a stylesheet that transforms the first schema
into the second one.  This is not a trivial task (i.e. invoking
a method) and as the schema becomes more complex the robustness and
completeness of the stylesheet will be called into question.

For what technical reason do you want to accomplish this?

-John K

Sheen Brisals wrote:

Hi,

Please can you tell me how to resolve explicit complexTypes within a schema document and generate a simple schema with annonymous complex types. if I have a schema like this,

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
<xsd:complexType name="Address">
  <xsd:sequence>
   <xsd:element name="name"   type="xsd:string"/>
   <xsd:element name="street" type="xsd:string"/>
   <xsd:element name="zip"    type="xsd:decimal"/>
  </xsd:sequence>

<xsd:element name="Customer" minOccurs="0" maxOccurs="unbounded">
    <xsd:complexType>
     <xsd:sequence>
      <xsd:element name="Name" type="xsd:string"/>
      <xsd:element name="Location" type="Address"/>
     </xsd:sequence>
    </xsd:complexType>
</xsd:element>
</xsd:schema>

how can I produce using the parser to have something like,

<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";>
<xsd:element name="Customer" minOccurs="0" maxOccurs="unbounded">
    <xsd:complexType>
     <xsd:sequence>
      <xsd:element name="Name" type="xsd:string"/>
      <xsd:element name="Location">
        <xsd:complexType>
         <xsd:sequence>
            <xsd:element name="name"   type="xsd:string"/>
            <xsd:element name="street" type="xsd:string"/>
            <xsd:element name="zip"    type="xsd:decimal"/>
         </xsd:sequence>
       </xsd:complexType>
     </xsd:sequence>
    </xsd:complexType>
</xsd:element>
</xsd:schema>

Can I achieve this using the parser or do I have to use some other means? Please give me few ideas.

Thanks,
Sheen


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]





--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to