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 Alberto Massari <am...@progress.com> on 2004/09/15 19:08:22 UTC

RE: No response - (XERCESC-1263) Abstract type not handled correctly by cached grammar

At 18.01 15/09/2004 +0100, Matthew Berry wrote:
>Alberto,
>
>As you guessed this has worked and my document is now validated correctly.
>
>Is the behaviour I was observing a bug in Xerces or is the step you
>described the correct way to set up the parser? If it is a bug it would be
>good to have a patch file as soon as is convenient.

I would call it a bug; what I suggested you can be seen as a workaround, or 
as a performance improvement (the default scanner, IGXMLScanner, is slower 
because it has to adapt to use either schemas or DTDs; SGXMLScanner and 
DGXMLScanner are the versions that only know about either XMLSchema or DTD; 
WFGXMLScanner doesn't perform validation at all, and it's the fastest).

Not to forget about this discovery, can you add a comment on Jira about the 
fact that it works if you use the SGXMLScanner?

Thanks,
Alberto


>Thanks for all your help.
>Matthew
>
>
> > Hi Matthew,
> > just to test if this is the cause of the problem, try adding a call to
> >
> > setProperty(XMLUni::fgXercesScannerName, XMLUni::fgSGXMLScanner)
> >
> > This should force the usage of the scanner that only known about
>XMLSchema,
> > and ignores any DTD.
> >
> > Alberto
> >
> > At 17.33 15/09/2004 +0100, Matthew Berry wrote:
> > >Alberto (and team)
> > >
> > >Note: The problem I am having only occurs if the document node is an
> > >abstract type. It passes validation if the abstract type is embedded
>within
> > >another element.
> > >
> > >I have tried to debug the problem further by delving in the Xerces
>source.
> > >
> > >It would appear that although I have set 'fgXercesSchema', for the
>document
> > >element IGXMLScanner::fValidator is of type DTDValidator. When we then
> > >process a child element, its is of type SchemaValidator. (I'm observing a
> > >break point in IGXMLScanner::scanRawAttrListforNameSpaces)
> > >
> > >DTDValidataor::handlesSchema returns false, and this has the effect that
> > >this line (IGXMLScanner2.cpp:1264):
> > >
> > >         if (fValidator && fValidator->handlesSchema())
> > >
> > >evaluates to false and the XsiType is not copied into the SchemaValidator
> > >which would then be picked up later.
> > >
> > >Does this make sense? Can you comment further?
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
>For additional commands, e-mail: xerces-c-dev-help@xml.apache.org



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