Hi John, Thanks for your input.
This is required for doing a schema to schema mapping and produce the XSLT stylesheet for the transformation. So when we present the schema to the user it makes sense to display the schema data structure with all such internal types resolved. This will show the schema structure closer to the way the instance document will look like. As you hinted this is not a simple task as there can be as many number of complexTypes with nested references. I would appreciate any ideas towards the same. Regards, Sheen List: xerces-j-user Subject: Re: Resolving complex types From: John Keyes <[EMAIL PROTECTED]> Date: 2002-03-06 14:00:58 [Download message RAW] 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]
