c-dev@xerces.apache.org
[Top] [All Lists]

[jira] Created: (XERCESC-1459) error reporting for schema validation dis

Subject: [jira] Created: (XERCESC-1459) error reporting for schema validation disregards public ids
From: "Boris Kolpackov (JIRA)"
Date: Thu, 14 Jul 2005 13:28:13 +0200 CEST
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@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: c-dev-help@xxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>
  • [jira] Created: (XERCESC-1459) error reporting for schema validation disregards public ids, Boris Kolpackov (JIRA) <=