Re: Java representation of a complex schema type

2009-06-29 Thread Michael Glavassevich
Hi David, Sorry, I should have been clearer. You need to get the enclosing complex type definition. When you're processing the *parent* element you would retrieve its type definition from the ElementPSVI and then use it to find the XSParticles for its children. Thanks. Michael Glavassevich XML

Re: Java representation of a complex schema type

2009-06-28 Thread govelogo
Hi Michael, If I understand you correctly, I have done this, XSElementDeclaration xsElemDel = elemPSVI.getElementDeclaration(); XSTypeDefinition xsTypeDef = xsElemDel.getTypeDefinition(); XSComplexTypeDefinition xsComplexTypeDef; if (xsElemDel.getTypeDefinition().ge

Re: Java representation of a complex schema type

2009-06-28 Thread Michael Glavassevich
getEnclosingCTDefinition() is only going to work for local element declarations. A faster route than starting from the XSModel (which you can only retrieve from the validation root anyway) would be to get the type definition [1] from the ElementPSVI and walk to the XSParticle from there. Note that

Re: Java representation of a complex schema type

2009-06-28 Thread Jeff Greif
Sorry to reply to my own post, but I forgot to mention that from the XSElementDeclaration you can get its enclosing complex type definition (using getEnclosingCTDefinition()) and from there work back to the particle for the element declaration. Jeff On Sun, Jun 28, 2009 at 6:36 PM, Jeff Greif wro

Re: Java representation of a complex schema type

2009-06-28 Thread Jeff Greif
>From the ElementPSVI on the root of the document, you can get the XSModel using getSchemaInformation. From there you can work your way through the complex type definition to the XSParticle whose term is the XSElementDeclaration in question, and get access to the max/minOccurs info. Jeff On Sun,

Re: Java representation of a complex schema type

2009-06-28 Thread govelogo
Hi Mukul, I think you are right. I could not find a way to get a XSComplexTypeDefinition from an ElementPSV. I am building parser between XML and MS Excel for some business analysts. To be able to present an sequence type inside the Excel template as required, I need to know which elements are of

Re: Java representation of a complex schema type

2009-06-26 Thread Mukul Gandhi
Hi David, Using the public APIs provided in, XSElementDeclaration it seems you cannot retrieve occurrence indicator values (maxOccurs and minOccurs) of an element declaration. Perhaps somebody can correct me.. Just curious, why do you need to retrieve this information using an API, as an end us