Hi Michael, Thanks a lot! ... few more questions, 1. Where is the [validity] property set? is it part of schema or configuration in the api?
2. it seems that the anonymous type needs to be set throught api, right? how to do that? 3. I came across such a chunk of xml, <ns35:item xmlns:ns35="http://ossj.org/xml/Common-CBEService/v1-5" xsi:type="ns35:ServiceSpecificationKey"> <ns37:applicationDN xmlns:ns36="http://ossj.org/xml/Common/v1-5" xmlns:ns37="http://ossj.org/xml/Common/v1-5 ">om.catalogue</ns37:applicationDN> <ns38:type xmlns:ns36="http://ossj.org/xml/Common/v1-5" xmlns:ns37="http://ossj.org/xml/Common/v1-5" xmlns:ns38="http://ossj.org/xml/Common/v1-5">service.spec.name</ns38:type> <ns39:primaryKey xmlns:ns36="http://ossj.org/xml/Common/v1-5" xmlns:ns37="http://ossj.org/xml/Common/v1-5" xmlns:ns38="http://ossj.org/xml/Common/v1-5" xmlns:ns39="http://ossj.org/xml/Common/v1-5 ">securitySuiteService</ns39:primaryKey> </ns35:item> I can not understand why it needs to assign multiple namespace prefix to the same schema. But even so, can I see these ns/schema pairs through TypeInfo and ElementPSVI objects? 4. I also came across this error, can you explain a little bit of what "abstract" means here? [Error] Input.xml:372:112: cvc-elt.2: The value of {abstract} in the element declaration for 'ns14:baseState_ProductOffering' must be false. its schema definition is as this, <element name="baseState_ProductOffering" type="string" abstract="true"/> thanks a lot, David On Fri, Jul 3, 2009 at 12:45 PM, Michael Glavassevich <mrgla...@ca.ibm.com>wrote: > govelogo <govel...@gmail.com> wrote on 07/03/2009 10:44:17 AM: > > > Hi there, > > > > > I am running the jaxp.TypeInfoWriter to parse a xml. For one > > element, I got this result, > > > > startElement(name="{http://crm.testschema. > > ca/xml/as/ServiceAndOfferMapping/v1-0}associatedWithServices",type="{ > > http://crm.testschema.ca/xml/as/ServiceAndOfferMapping/v1-0} > > > #AnonType_associatedWithServicesInstalledProductOfferingValueType",qname=" > > saom:associatedWithServices",attributes={}) > > > > inside the ServiceAndOfferMapping (saom) .xsd, > > "associatedWithServices" is defined here as below, (the schema for > > cbeservice-v1-5 is "http://ossj.org/xml/Common-CBEService/v1-5") > > > > <xs:complexType name="InstalledProductOfferingValueType"> > > <xs:complexContent> > > <xs:extension base="cbeproductoffering-v1-5:ProductOfferingValue"> > > <xs:sequence> > > <xs:element name="associatedWithServices" minOccurs="0"> > > <xs:complexType> > > <xs:complexContent> > > <xs:extension base="cbeservice-v1-5:ArrayOfServiceKey"/> > > </xs:complexContent> > > </xs:complexType> > > </xs:element> > > </xs:sequence> > > </xs:extension> > > </xs:complexContent> > > </xs:complexType> > > <xs:element name="serviceAndOfferMapping" type="saom: > > ServiceAndOfferMappingType"/> > > > > My question is why the type name is not shown as the base type ( > > cbeservice-v1-5:ArrayOfServiceKey), but rather like a garbage string > > (in red color)? > > Because the base type is not its type. The type of "associatedWithServices" > actually has no name. It's anonymous, however the API [1] you're using > requires that implementations produce an "anonymous type name" [2] to > uniquely identify the anonymous type and that is what you're getting. > > > many thanks, > > David > > [1] > http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/core.html#TypeInfo > [2] > http://www.w3.org/TR/2004/REC-DOM-Level-3-Core-20040407/glossary.html#dt-anonymous > > Thanks. > > Michael Glavassevich > XML Parser Development > IBM Toronto Lab > E-mail: mrgla...@ca.ibm.com > E-mail: mrgla...@apache.org > >