You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Alain BOHL (JIRA)" <xe...@xml.apache.org> on 2010/07/06 10:34:50 UTC

[jira] Commented: (XERCESC-1933) After parsing an XML with PVI information kept, the DOMLSParser object crashes when released...

    [ https://issues.apache.org/jira/browse/XERCESC-1933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12885464#action_12885464 ] 

Alain BOHL commented on XERCESC-1933:
-------------------------------------

It works well for me.
Is it possible to know on which version of Xerces-c this fix will be included?
Thanks

> After parsing an XML with PVI information kept, the DOMLSParser object crashes when released...
> -----------------------------------------------------------------------------------------------
>
>                 Key: XERCESC-1933
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1933
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: DOM, Validating Parser (XML Schema)
>    Affects Versions: 3.1.1
>         Environment: Windows XP SP3, Visual Studio 8 (2005), also XQuilla 2.2.4 (but not necessary to get the crash)
>            Reporter: Alain BOHL
>            Assignee: David Bertoni
>         Attachments: file.xml, file.xsd, XERCESC-1933.patch
>
>
>     XMLPlatformUtils::Initialize();
>     DOMImplementation* impl =  DOMImplementationRegistry::getDOMImplementation(XMLString::transcode("Core"));
>     m_parser = impl->createLSParser(DOMImplementationLS::MODE_SYNCHRONOUS, 0);
>     DOMConfiguration  *config = m_parser->getDomConfig();
>     config->setParameter(XMLUni::fgDOMNamespaces, true);
>     config->setParameter(XMLUni::fgXercesSchema, true);
>     config->setParameter(XMLUni::fgXercesHandleMultipleImports, true);
>     config->setParameter(XMLUni::fgXercesSchemaFullChecking, true);
>     config->setParameter(XMLUni::fgDOMComments, false);// Suppression des commentaires
>     config->setParameter(XMLUni::fgDOMElementContentWhitespace, false);// Suppression des blancs
>     config->setParameter(XMLUni::fgDOMValidateIfSchema, true); //    config->setParameter(XMLUni::fgDOMValidate, true);
>     // enable datatype normalization - default is off
>     config->setParameter(XMLUni::fgDOMDatatypeNormalization, true);
>     //************** If the following line is deleted the crash does not happen ****************
>     config->setParameter(XMLUni::fgXercesDOMHasPSVIInfo, true);
>     // Creation et installation of the error handler
>     DOMReseauErrorHandler errorHandler;
>    config->setParameter(XMLUni::fgDOMErrorHandler, &errorHandler);
>     XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc = NULL;
>     // reset document pool
>     m_parser->resetDocumentPool();
>     if (xsdFile.length() > 0)
>     {
>            Grammar* grammar;
>            grammar = m_parser->loadGrammar(XMLString::transcode("file.xsd"), Grammar::SchemaGrammarType, true);
>            //************************** grammar is not NULL
>     }
>     doc = m_parser->parseURI(XMLString::transcode("file.xml"));
>     //***************************** No xml parser error were met
>     delete m_parser; //*********************** Crash on this line ***********************************

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org