[lxml-dev] Whoops, Internal Error

Stefan Behnel stefan_ml at behnel.de
Tue May 1 08:52:15 CEST 2007


Hi Martin,

a quick test (after renaming cpe-1.0.xsd to xccdf-1.1.xsd) didn't show any
problem with lxml trunk and libxml2 2.6.17. Since you didn't mention any of
the versions of lxml or libxml2 you are using, I assume it's just a problem
with an older libxml2 version. XML-Schema is still under development in
libxml2, so any newer version is likely to provide better support and bug
fixes. Please upgrade and retry.

Regards,
Stefan


Martin Thomas wrote:
> I have attached the file to be validated and the schema that was causing
> a problem (there are 5 more schemas involved but I didn't think you
> needed them - either download them or ask me to email them) as well as a
> python script that I used to create the problem.
> 
> The output is as follows:
> ios.xml:41:ERROR:SCHEMASV:SCHEMAV_INTERNAL: Internal error:
> xmlSchemaIDCRegisterMatchers, Could not find an augmented IDC item for
> an IDC definition.
> ios.xml:41:ERROR:SCHEMASV:SCHEMAV_INTERNAL: Internal error:
> xmlSchemaValidateElem, calling xmlSchemaValidateElemDecl().
> ios.xml:41:ERROR:SCHEMASV:SCHEMAV_INTERNAL: Internal error:
> xmlSchemaDocWalk, calling xmlSchemaValidateElem().
> 
> The line number in ios.xml corresponds to a cpe-list that is defined in
> the attached schema.  If I remove it from ios.xml, everything else
> passes.
> 
> Cheers // Martin
> 
> 
> 
>  On Mon, 2007-04-30 at 11:12 -0500, martin at martinthomas.net wrote:
>> Using the lxml rpm for FC6 and Python 2.4, I get an internal error  
>> when I try validating a document against a XMLschema document.  The  
>> xml document that I am trying to validate and the XMLschema which I am  
>> validating against both came from NIST (contained in the 'Complete  
>> 1.1.3 Schema Bundle .zip' at http://nvd.nist.gov/scap/xccdf/xccdf.cfm).
>>
>> The error message reads Internal error: xmlSchemaIDCRegisterMatchers,  
>> Could not find an augmented IDC item for an IDC definition.
>>
>> I'll write this up properly tonight and send in an error log, along  
>> with all the schema documents etc unless someone tells me otherwise.
>>
>> Cheers // Martin
>>
>> _______________________________________________
>> lxml-dev mailing list
>> lxml-dev at codespeak.net
>> http://codespeak.net/mailman/listinfo/lxml-dev
>>
>> ------------------------------------------------------------------------
>>
>> from lxml import etree
>>
>> xsd = etree.ElementTree(file='xccdf-1.1.xsd')
>>
>> doc = etree.ElementTree(file='ios.xml')
>>
>> xsv = etree.XMLSchema(xsd)
>> try:
>>     xsv.validate(doc)
>> except Exception, e:
>>     pass
>>
>> print e.error_log
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> lxml-dev mailing list
>> lxml-dev at codespeak.net
>> http://codespeak.net/mailman/listinfo/lxml-dev


More information about the lxml-dev mailing list