Title: RE: Can't access content model in SEnumVal when complex type = All

Thanks for your response to 1.)

2.) was already answered by Tinny Ng.

Thanks,
Siehnai

    -----Original Message-----
    From:   PeiYong PY Zhang [SMTP:[EMAIL PROTECTED]]
    Sent:   Monday, February 18, 2002 2:32 PM
    To:     [EMAIL PROTECTED]
    Subject:        Re: Can't access content model in SEnumVal when complex type = All

    Williamson,

    "Williamson, Siehnai" wrote:

      1.)� While running the SEnumVal example using the personal-schema.xml file, I realized that getFormattedContentModel() returns nothing when the complex type for the element equals "All" (see element "name" in personal-schemal.xml).� After further research, it appears that the switch statement in the method formatNode(...) of the ContentSpecNode class does not check for an "All" event.� As a result, the content model for the element is never formatted when its complex type is "All."

    ���� Your finding is valid, please open a bug in the bugzilla for the record.
    ���� The code for ContentSpecNode::All has been added and available from CVS.

      2.)� Why does SchemaElementDecl in SEnumVal example contain elements from the XML document even if it is not in the schema?� Shouldn't it only contain those elements or values that are listed in the schema?

      I have a dummy xml document with a root element called "dummy" pointing to the document's schema.� Whenever I run SEnumVal, the last element retrieved from SchemaElementDecl is this "dummy" element.� Since I don't know if the user will use the word "dummy" as the root element for her dummy document, I can't therefore check for "dummy" and eliminate it in my application.� The only alternative is to figure out the last element validated and then assume that this is the root element from the xml document.

    ����� Please forward us your sample instance document and xsd file to reproduce what you have, (is it on windows?, please
    specify the platform), thanks.

    Rgds,
    Peiyong

Reply via email to