mrglavas    2004/07/18 13:06:41

  Modified:    java/src/org/apache/xerces/dom DOMConfigurationImpl.java
  Log:
  Fixing Jira Bug #950:

  http://nagoya.apache.org/jira/browse/XERCESJ-950

  

  Eliminating the check to see what the value of 'schema-type'

  is before setting schema-location is needed since the order in

  which they are set does not matter. schema-location should

  be "ignored" if schema-type has not been set, but it still must

  be allowed to be set. Patch thanks to Naela Nissar.
  
  Revision  Changes    Path
  1.31      +5 -20     
xml-xerces/java/src/org/apache/xerces/dom/DOMConfigurationImpl.java
  
  Index: DOMConfigurationImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-xerces/java/src/org/apache/xerces/dom/DOMConfigurationImpl.java,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- DOMConfigurationImpl.java 31 May 2004 05:31:30 -0000      1.30
  +++ DOMConfigurationImpl.java 18 Jul 2004 20:06:41 -0000      1.31
  @@ -644,25 +644,10 @@
               else if (name.equalsIgnoreCase(Constants.DOM_SCHEMA_LOCATION)) {
                   if (value instanceof String || value == null) {
                       try {
  -                        String schemaType = (String) getProperty(
  -                        Constants.JAXP_PROPERTY_PREFIX + Constants.SCHEMA_LANGUAGE);
  -                        if (schemaType == Constants.NS_XMLSCHEMA || value == null) {
  -                            // map DOM schema-location to JAXP schemaSource property
  -                            setProperty(
  -                                Constants.JAXP_PROPERTY_PREFIX + 
Constants.SCHEMA_SOURCE,
  -                                value);
  -                        }
  -                        else {
  -                            // schemaType must not be null.
  -                            // REVISIT: allow pre-parsing DTD grammars
  -                            String msg =
  -                                DOMMessageFormatter.formatMessage(
  -                                    DOMMessageFormatter.DOM_DOMAIN,
  -                                    "FEATURE_NOT_SUPPORTED",
  -                                    new Object[] { name });
  -                            throw new DOMException(DOMException.NOT_SUPPORTED_ERR, 
msg);
  -                        }
  -
  +                        // map DOM schema-location to JAXP schemaSource property
  +                        setProperty(
  +                            Constants.JAXP_PROPERTY_PREFIX + 
Constants.SCHEMA_SOURCE,
  +                            value);
                       }
                       catch (XMLConfigurationException e) {}
                   }
  
  
  

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

Reply via email to