Hello Mr Glavassevich and thanks for your reply. So basically what you're saying is that it is not possible, while parsing the schema, to be informated that (for example): "this complex element has these simple elements as child elements, it also has an xsd:any"? The information that there's an xsd:any is completely lost?

- Eric

Michael Glavassevich wrote:
Hi Eric,

You're basically looking for which particle matched each element in the instance. This information is not available in the PSVI and not readily available from Xerces. Someone else asked a related question [1] a few years back. Might not be too difficult to handle yourself if you know that the sequences will always be simple.

Thanks.

[1] http://marc.info/?l=xerces-j-user&m=117066289132061&w=2 <http://marc.info/?l=xerces-j-user&m=117066289132061&w=2>

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: [EMAIL PROTECTED]
E-mail: [EMAIL PROTECTED]

Eric Lilja <[EMAIL PROTECTED]> wrote on 12/02/2008 08:12:54 AM:

 > Hello, I'm parsing schemas (by getting an XSModel and then getting the
 > top element and going from there) and what the program basically does is
 > creating a relational model of the schema. Complex element become tables
 > and their children that are attributes or simple elements that can occur
 > at most 1 time become columns in the tables. Now I need to handle
 > xsd:any. Consider the following schema:
 >
 > <?xml version="1.0" encoding="UTF-8"?>
 > <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";
 >      elementFormDefault="qualified"
 >      targetNamespace="myns" xmlns="myns">
 >      <xsd:element name="persons">
 >          <xsd:complexType>
 >              <xsd:sequence maxOccurs="unbounded">
 >                  <xsd:element name="person" type="personType"/>
 >              </xsd:sequence>
 >          </xsd:complexType>
 >      </xsd:element>
 >      <xsd:complexType name="personType">
 >          <xsd:sequence>
 >              <xsd:element name="name" type="xsd:string"/>
 >              <xsd:any namespace="##any" minOccurs="0"/>
 >          </xsd:sequence>
 >      </xsd:complexType>
 > </xsd:schema>
 >
 > What I want to happen here is that the complex element personType should
 > become a table in my relational model and it should get "name" as a
 > column (of type string) and the xsd:any should become a column of type
 > xml. However, during parsing I don't detect the xsd:any "construct". How
 > can I solve this?
 >
 > - EL
 >
 > ---------------------------------------------------------------------
 > 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