The following comment has been added to this issue:

     Author: Michael Glavassevich
    Created: Fri, 11 Jun 2004 11:02 AM
       Body:
I tend to view the parser configuration as being the parser itself. The XMLReader 
hooked up to it is a filter which transforms the XNI events from the end of the 
pipeline to SAX.

Defining such a property on the XMLReader would allow users to replace the parser 
components with some new set, but it would blow away the rest of their preferences as 
they are stored on the parser configuration, a side effect I somehow doubt users would 
like or expect. XNI was not designed to accomodate this. There's no generic way to 
copy features and properties from one configuration to another.

I believe such a property belongs on a factory. XMLReaderFactory doesn't provide a 
means for setting them though JAXP could work.
---------------------------------------------------------------------
View this comment:
  http://issues.apache.org/jira/browse/XERCESJ-976?page=comments#action_36049

---------------------------------------------------------------------
View the issue:
  http://issues.apache.org/jira/browse/XERCESJ-976

Here is an overview of the issue:
---------------------------------------------------------------------
        Key: XERCESJ-976
    Summary: System properties should not be used to configure parser
       Type: Improvement

     Status: Unassigned
   Priority: Major

    Project: Xerces2-J
 Components: 
             XNI
   Versions:
             2.6.2

   Assignee: 
   Reporter: elharo

    Created: Thu, 3 Jun 2004 8:51 AM
    Updated: Fri, 11 Jun 2004 11:02 AM
Environment: All

Description:
The use of system properties to configure the parser is a major problem in many 
environments.  In particular the org.apache.xerces.xni.parser.XMLParserConfiguration 
is causing major troubles. Among these:

1. It is impossible to set this property in an applet environment due to security 
restrictions. 

2. While this property can be set in a server-side environment, it then affects all 
classes loaded on the server, even those loaded by a different class loader which may 
not have access to the class org.apache.xerces.xni.parser.XMLParserConfiguration 
points to. Setting this property in one servlet can break otehr servlets that also 
dependn on Xerces.

3. Different parser objects used for different purposes may require different 
configurations. This is not possible when one system property controls them all.

A *method* such as setParserConfiguration() should be provided that replaces this 
system property. Furthermore, this method should have object-scope rather than 
system-scope so it's possible for different applications running in the same VM as is 
common in server environment, to configure their parsers differently.  Several XOM 
users have reported different problems that all trace back to this system property and 
its global scope.


---------------------------------------------------------------------
JIRA INFORMATION:
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

If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to