[ 
https://issues.apache.org/jira/browse/XERCESJ-1595?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13905556#comment-13905556
 ] 

Radu Coravu edited comment on XERCESJ-1595 at 2/19/14 3:30 PM:
---------------------------------------------------------------

I tried to find a full patch for this for our application but I run into 
additional problems with the method:

org.apache.xerces.impl.xs.XMLSchemaLoader.initGrammarBucket()

which basically when a new XML Parser is created copies all the content from 
the common grammar pool inside the grammar bucket, grammar bucket which is 
searched first for parsed schemas and which retrieves the schemas only based on 
the namespace.

So I cannot find an easy way to patch this with the existing Xerces code


was (Author: radu_coravu):
I tried to find a full patch for this for our application but I run into 
additional problems with the method:

org.apache.xerces.impl.xs.XMLSchemaLoader.initGrammarBucket()

which basically when a new XML Parser is created copies all the content from 
the common grammar pool inside the grammar bucket, grammar bucket which is 
searched first for parsed schemas and which retrieves the schemas only based on 
the namespace.

> Xerces grammar pool not working with no namespace XSDs
> ------------------------------------------------------
>
>                 Key: XERCESJ-1595
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-1595
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: XNI
>    Affects Versions: 2.11.0
>            Reporter: Eric Sirois
>            Assignee: Michael Glavassevich
>
> When loading XSDs with no namespace into the Xerces grammar pool, it assumes 
> every XSD with no namespace to be the same XSD doc.  In our case, when trying 
> to validate DITA documents, there could be a number of different types of 
> documents involved, for example map, topic, task and concepts.
> To get around the issue we need to ignore XSDs when loading the grammar pool. 
>  This affects the time needed to produce/transform documentation 
> significantly.
> If a namespace is available for the XSD, the grammar cache should use that. 
> If the there is no namespace available, then it should use the system ID of 
> the schema.



--
This message was sent by Atlassian JIRA
(v6.1.5#6160)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to