A few things:

1. Are you using the Java processor or the C++ processor?  What is your
platform and what version of the processor are you using?

2. Spaces are not valid in URLs, so the parser may be crapping out, then
trying to recover.  Xalan (either the Java or C++ processor) is not at all
involved in parsing a schema instance, or in validating it.

3. If you are using the C++ process, then the Xerces-C++ may be the cause
of the exception, as it uses exceptions to control flow when parsing
external entities like a schema file.

Dave



                                                                                       
                                               
                      "Racine, Michel"                                                 
                                               
                      <michel.racine@h         To:      <[EMAIL PROTECTED]>     
                                               
                      p.com>                   cc:      (bcc: David N 
Bertoni/Cambridge/IBM)                                          
                                               Subject: Performance hit/exception when 
top level element has namespace                
                      09/11/2002 07:36                                                 
                                               
                      PM                                                               
                                               
                      Please respond                                                   
                                               
                      to xalan-dev                                                     
                                               
                                                                                       
                                               
                                                                                       
                                               



I saw the thread of the performance hit with Xalan on large XML packets,
and it brought me to ask the following question.

I have an XML packet that has the top level element with some namespace
declarations/schema. When I use transform on this guy, I see an exception
in the debug output, and it takes nearly 2 seconds. If I remove the schema
location, it takes 30 ms.

The XML packet is valid, it's been validated by the Xerces parser with a
schema clean. But the transform has a hard time with it.

Included below is the top level element with the namespace declaration
that's causing me the problem. Also, the same element, omitting the schema
location, which then, doesn't cause the problem.

Problematic element:

<Envelope xmlns='http://www.hp.com/swapiv3'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:schemaLocation='http://www.hp.com/swapiv3 /hsvmafiles/schswapiv3.xsd'>

Working Element:

<Envelope xmlns='http://www.hp.com/swapiv3'
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>

Problematic declaration in the element:

xsi:schemaLocation='http://www.hp.com/swapiv3 /hsvmafiles/schswapiv3.xsd'

*There is a space between http://www.hp.com/swapiv3 and
/hsvmafiles/schswapiv3.xsd.

I am wondering why ? Any pointers would be great. I feel I am doing
something wrong there but I am not sure why since the parser likes it.

Thanks.

Michel Racine
System Analyst
Hewlett-Packard




Reply via email to