I have described schema in file personal3.xsd and designed document personal-schema3.xml.
 
When try to parse personal-schema3.xml I get the following error:
 
Error at file "personal-schema3.xml", line 7, column 16
   Message: Element 'person' is not valid for content model: '(person)+'
Below is a fragment which creates and initializes parser:
 
    DOMParser *parser = new DOMParser;    
    parser->setValidationScheme(DOMParser::Val_Auto);
    parser->setDoNamespaces(true);
    parser->setDoSchema(true);   
    parser->setValidationSchemaFullChecking(true);
 
    DOMTreeErrorReporter *errReporter = new DOMTreeErrorReporter();   
    parser->setErrorHandler(errReporter);
    
    try
    {
        parser->parse(gXmlFile);
    }
    catch (...)
    {
        cerr << "An error occured during parsing\n " << endl;
    }
If this is not a bug, couldn't you tell me what I'm doing wrong.
<?xml version="1.0" encoding="UTF-8"?>
<my:personnel xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
              xmlns:my="http://my.com";
              xsi:schemaLocation="http://my.com personal3.xsd">
  <my:person>First</my:person>
  <my:person>Second</my:person>
</my:personnel>

Attachment: personal3.xsd
Description: Binary data

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to