You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by mr...@apache.org on 2004/12/20 07:09:41 UTC

cvs commit: xml-xerces/java/src/org/apache/xerces/impl/xs XMLSchemaValidator.java XMLSchemaLoader.java

mrglavas    2004/12/19 22:09:41

  Modified:    java/src/org/apache/xerces/parsers
                        StandardParserConfiguration.java
                        XML11Configuration.java
               java/src/org/apache/xerces/impl/xs/traversers
                        XSDHandler.java
               java/src/org/apache/xerces/impl/xs XMLSchemaValidator.java
                        XMLSchemaLoader.java
  Log:
  Recognize generate-sytnethic-annotations feature in parser configurations and propogate to schema parser.
  
  Revision  Changes    Path
  1.36      +7 -1      xml-xerces/java/src/org/apache/xerces/parsers/StandardParserConfiguration.java
  
  Index: StandardParserConfiguration.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/StandardParserConfiguration.java,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- StandardParserConfiguration.java	15 Dec 2004 23:48:47 -0000	1.35
  +++ StandardParserConfiguration.java	20 Dec 2004 06:09:35 -0000	1.36
  @@ -91,6 +91,10 @@
       protected static final String XMLSCHEMA_FULL_CHECKING = 
       Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_FULL_CHECKING;
       
  +    /** Feature: generate synthetic annotations */
  +    protected static final String GENERATE_SYNTHETIC_ANNOTATIONS = 
  +        Constants.XERCES_FEATURE_PREFIX + Constants.GENERATE_SYNTHETIC_ANNOTATIONS_FEATURE;
  +    
       /** Feature identifier: validate annotations */
       protected static final String VALIDATE_ANNOTATIONS =
           Constants.XERCES_FEATURE_PREFIX + Constants.VALIDATE_ANNOTATIONS_FEATURE;
  @@ -174,6 +178,7 @@
               NORMALIZE_DATA,
               SCHEMA_ELEMENT_DEFAULT,
               SCHEMA_AUGMENT_PSVI,
  +            GENERATE_SYNTHETIC_ANNOTATIONS,
               VALIDATE_ANNOTATIONS,
               // NOTE: These shouldn't really be here but since the XML Schema
               //       validator is constructed dynamically, its recognized
  @@ -188,6 +193,7 @@
           setFeature(SCHEMA_ELEMENT_DEFAULT, true);
           setFeature(NORMALIZE_DATA, true);
           setFeature(SCHEMA_AUGMENT_PSVI, true);
  +        setFeature(GENERATE_SYNTHETIC_ANNOTATIONS, false);
           setFeature(VALIDATE_ANNOTATIONS, false);
   
           // add default recognized properties
  
  
  
  1.20      +7 -2      xml-xerces/java/src/org/apache/xerces/parsers/XML11Configuration.java
  
  Index: XML11Configuration.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/parsers/XML11Configuration.java,v
  retrieving revision 1.19
  retrieving revision 1.20
  diff -u -r1.19 -r1.20
  --- XML11Configuration.java	15 Dec 2004 23:48:47 -0000	1.19
  +++ XML11Configuration.java	20 Dec 2004 06:09:36 -0000	1.20
  @@ -135,6 +135,10 @@
       protected static final String XMLSCHEMA_FULL_CHECKING =
           Constants.XERCES_FEATURE_PREFIX + Constants.SCHEMA_FULL_CHECKING;
       
  +    /** Feature: generate synthetic annotations */
  +    protected static final String GENERATE_SYNTHETIC_ANNOTATIONS = 
  +        Constants.XERCES_FEATURE_PREFIX + Constants.GENERATE_SYNTHETIC_ANNOTATIONS_FEATURE;
  +    
       /** Feature identifier: validate annotations */
       protected static final String VALIDATE_ANNOTATIONS =
           Constants.XERCES_FEATURE_PREFIX + Constants.VALIDATE_ANNOTATIONS_FEATURE;
  @@ -434,7 +438,7 @@
   				VALIDATION,                 
   				NAMESPACES,
                   NORMALIZE_DATA, SCHEMA_ELEMENT_DEFAULT, SCHEMA_AUGMENT_PSVI,
  -                VALIDATE_ANNOTATIONS,
  +                GENERATE_SYNTHETIC_ANNOTATIONS, VALIDATE_ANNOTATIONS,
               	// NOTE: These shouldn't really be here but since the XML Schema
               	//       validator is constructed dynamically, its recognized
               	//       features might not have been set and it would cause a
  @@ -455,6 +459,7 @@
   		fFeatures.put(SCHEMA_ELEMENT_DEFAULT, Boolean.TRUE);
   		fFeatures.put(NORMALIZE_DATA, Boolean.TRUE);
   		fFeatures.put(SCHEMA_AUGMENT_PSVI, Boolean.TRUE);
  +        fFeatures.put(GENERATE_SYNTHETIC_ANNOTATIONS, Boolean.FALSE);
           fFeatures.put(VALIDATE_ANNOTATIONS, Boolean.FALSE);
   		fFeatures.put(PARSER_SETTINGS, Boolean.TRUE);
   
  
  
  
  1.85      +2 -2      xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java
  
  Index: XSDHandler.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/traversers/XSDHandler.java,v
  retrieving revision 1.84
  retrieving revision 1.85
  diff -u -r1.84 -r1.85
  --- XSDHandler.java	20 Dec 2004 05:43:36 -0000	1.84
  +++ XSDHandler.java	20 Dec 2004 06:09:37 -0000	1.85
  @@ -107,7 +107,7 @@
       protected static final String GENERATE_SYNTHETIC_ANNOTATIONS = 
           Constants.XERCES_FEATURE_PREFIX + Constants.GENERATE_SYNTHETIC_ANNOTATIONS_FEATURE;
       
  -        /** Feature identifier: validate annotations. */
  +    /** Feature identifier: validate annotations. */
       protected static final String VALIDATE_ANNOTATIONS =
           Constants.XERCES_FEATURE_PREFIX + Constants.VALIDATE_ANNOTATIONS_FEATURE;
       
  
  
  
  1.163     +7 -1      xml-xerces/java/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java
  
  Index: XMLSchemaValidator.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XMLSchemaValidator.java,v
  retrieving revision 1.162
  retrieving revision 1.163
  diff -u -r1.162 -r1.163
  --- XMLSchemaValidator.java	15 Dec 2004 23:48:48 -0000	1.162
  +++ XMLSchemaValidator.java	20 Dec 2004 06:09:40 -0000	1.163
  @@ -143,6 +143,10 @@
       protected static final String STANDARD_URI_CONFORMANT_FEATURE =
           Constants.XERCES_FEATURE_PREFIX + Constants.STANDARD_URI_CONFORMANT_FEATURE;
       
  +    /** Feature: generate synthetic annotations */
  +    protected static final String GENERATE_SYNTHETIC_ANNOTATIONS = 
  +        Constants.XERCES_FEATURE_PREFIX + Constants.GENERATE_SYNTHETIC_ANNOTATIONS_FEATURE;
  +    
       /** Feature identifier: validate annotations. */
       protected static final String VALIDATE_ANNOTATIONS =
           Constants.XERCES_FEATURE_PREFIX + Constants.VALIDATE_ANNOTATIONS_FEATURE;
  @@ -206,6 +210,7 @@
               ALLOW_JAVA_ENCODINGS,
               CONTINUE_AFTER_FATAL_ERROR,
               STANDARD_URI_CONFORMANT_FEATURE,
  +            GENERATE_SYNTHETIC_ANNOTATIONS,
               VALIDATE_ANNOTATIONS};
   
       /** Feature defaults. */
  @@ -221,6 +226,7 @@
           null, //Boolean.FALSE,
           null, //Boolean.FALSE,
           null, //Boolean.FALSE,
  +        null,
           null,
           null };
   
  
  
  
  1.35      +8 -2      xml-xerces/java/src/org/apache/xerces/impl/xs/XMLSchemaLoader.java
  
  Index: XMLSchemaLoader.java
  ===================================================================
  RCS file: /home/cvs/xml-xerces/java/src/org/apache/xerces/impl/xs/XMLSchemaLoader.java,v
  retrieving revision 1.34
  retrieving revision 1.35
  diff -u -r1.34 -r1.35
  --- XMLSchemaLoader.java	17 Dec 2004 13:46:43 -0000	1.34
  +++ XMLSchemaLoader.java	20 Dec 2004 06:09:40 -0000	1.35
  @@ -978,7 +978,13 @@
           catch (XMLConfigurationException e){
               fIsCheckedFully = false;
           }
  -        
  +        // get generate-synthetic-annotations feature
  +        try {
  +            fSchemaHandler.setGenerateSyntheticAnnotations(componentManager.getFeature(GENERATE_SYNTHETIC_ANNOTATIONS));
  +        }
  +        catch (XMLConfigurationException e) {
  +            fSchemaHandler.setGenerateSyntheticAnnotations(false);
  +        }
           fSchemaHandler.reset(componentManager);		 
       }
       
  
  
  

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