I am trying to get the schema type of a field in an xml. My parser config
looks like the following:

 
       // Discard comment nodes in the document.
    //
    conf->setParameter (XMLUni::fgDOMComments, false);

    // Enable datatype normalization.
    //
    conf->setParameter (XMLUni::fgDOMDatatypeNormalization, true);

    // Do not create EntityReference nodes in the DOM tree. No
    // EntityReference nodes will be created, only the nodes
    // corresponding to their fully expanded substitution text
    // will be created.
    //
    conf->setParameter (XMLUni::fgDOMEntities, false);

    // Perform namespace processing.
    //
    conf->setParameter (XMLUni::fgDOMNamespaces, true);
    conf->setParameter (XMLUni::fgXercesDOMHasPSVIInfo,true); //Keep
validation info

    // Do not include ignorable whitespace in the DOM tree.
    //
    conf->setParameter (XMLUni::fgDOMElementContentWhitespace, false);

    // Enable validation.
    //
    conf->setParameter (XMLUni::fgDOMValidate, true);
    conf->setParameter (XMLUni::fgXercesSchema, true);
    conf->setParameter (XMLUni::fgXercesSchemaFullChecking, false);

    // Xerces-C++ 3.1.0 is the first version with working multi import
    // support.
    //
#if _XERCES_VERSION >= 30100
    conf->setParameter (XMLUni::fgXercesHandleMultipleImports, true);
#endif

        // Use the loaded grammar during parsing.
    //
    conf->setParameter (XMLUni::fgXercesUseCachedGrammarInParse, true);

    // Disable loading schemas via other means (e.g., schemaLocation).
    //
    conf->setParameter (XMLUni::fgXercesLoadSchema, false);

    // We will release the DOM document ourselves.
    //
    conf->setParameter (XMLUni::fgXercesUserAdoptsDOMDocument, true);


I am using xerces under code synthesis xsd. 
My schema looks like the following:

<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>

    <xs:include schemaLocation="customType.xsd"/>

    <xs:complexType name="typeA">
        <xs:sequence>
            <xs:element name="someParam" type="customType" minOccurs="0"
maxOccurs="1"/>
            <xs:element name="somebool" type="xs:boolean" minOccurs="0"
maxOccurs="1"/>
        </xs:sequence>
    </xs:complexType>

</xs:schema>


When I try to access the type of node "someParam", the string "anyType" is
returned. I am looking for it
to return "customType".

Any advice?
Thanks



--
View this message in context: 
http://apache-xml-project.6118.n7.nabble.com/Xerces-3-1-4-getSchemaTypeInfo-returns-anyType-for-custom-complex-element-tp42900.html
Sent from the Xerces - C - Users mailing list archive at Nabble.com.

Reply via email to