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 "Boris Kolpackov (JIRA)" <xe...@xml.apache.org> on 2005/07/14 13:28:13 UTC

[jira] Created: (XERCESC-1459) error reporting for schema validation disregards public ids

error reporting for schema validation disregards public ids
-----------------------------------------------------------

         Key: XERCESC-1459
         URL: http://issues.apache.org/jira/browse/XERCESC-1459
     Project: Xerces-C++
        Type: Bug
  Components: Validating Parser (Schema) (Xerces 1.5 or up only)  
    Versions: 2.6.0    
 Environment: all
    Reporter: Boris Kolpackov


I was trying to assign my own public id for an InputSource instance so that later I could use it to print error messges:

SAX2XMLReader* parser (XMLReaderFactory::createXMLReader());

InputSource* input_source (
        new (XMLPlatformUtils::fgMemoryManager)
        LocalFileInputSource (file_path.c_str ()));

input_source->setPublicId (file_path.c_str ());

parser->loadGrammar (*input_source, Grammar::SchemaGrammarType);

This however works only for certain messages. For example if I misspell closing tag I get an error message with my public id. If I refer to a non-existent type in schema file the public id is 0. After some looking around I found that 
TraverseSchema.cpp has the following code all over:

    fLocator->setValues(fSchemaInfo->getCurrentSchemaURL(), 
                         0,
                        ((XSDElementNSImpl*) elem)->getLineNo(),
                        ((XSDElementNSImpl*) elem)->getColumnNo());

Where second argument (0) is for public id.


-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


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