xerces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From muk...@apache.org
Subject svn commit: r903069 - /xerces/java/branches/xml-schema-1.1-dev/samples/jaxp/SourceValidator.java
Date Tue, 26 Jan 2010 03:36:28 GMT
Author: mukulg
Date: Tue Jan 26 03:36:27 2010
New Revision: 903069

URL: http://svn.apache.org/viewvc?rev=903069&view=rev
Log:
providing an option, -xsd11 in the jaxp.SourceValidator sample to turn on XSD 1.1 validation.
Incorporating suggestions, by Michael Glavassevich (not, doing System.setProperty).

Modified:
    xerces/java/branches/xml-schema-1.1-dev/samples/jaxp/SourceValidator.java

Modified: xerces/java/branches/xml-schema-1.1-dev/samples/jaxp/SourceValidator.java
URL: http://svn.apache.org/viewvc/xerces/java/branches/xml-schema-1.1-dev/samples/jaxp/SourceValidator.java?rev=903069&r1=903068&r2=903069&view=diff
==============================================================================
--- xerces/java/branches/xml-schema-1.1-dev/samples/jaxp/SourceValidator.java (original)
+++ xerces/java/branches/xml-schema-1.1-dev/samples/jaxp/SourceValidator.java Tue Jan 26 03:36:27
2010
@@ -34,6 +34,7 @@
 import javax.xml.validation.SchemaFactory;
 import javax.xml.validation.Validator;
 
+import org.apache.xerces.impl.Constants;
 import org.w3c.dom.Document;
 import org.xml.sax.ErrorHandler;
 import org.xml.sax.InputSource;
@@ -98,6 +99,9 @@
     /** Default schema language (http://www.w3.org/2001/XMLSchema). */
     protected static final String DEFAULT_SCHEMA_LANGUAGE = XMLConstants.W3C_XML_SCHEMA_NS_URI;
     
+    /** XSD 1.1 schema language. */
+    protected static final String XSD11_SCHEMA_LANGUAGE = Constants.W3C_XML_SCHEMA11_NS_URI;
+    
     /** Default repetition (1). */
     protected static final int DEFAULT_REPETITION = 1;
     
@@ -324,6 +328,10 @@
                     }
                     continue;
                 }
+                if (option.equals("xsd11")) {
+                   schemaLanguage = XSD11_SCHEMA_LANGUAGE;
+                   continue;
+                }
                 if (option.equals("x")) {
                     if (++i == argv.length) {
                         System.err.println("error: Missing argument to -x option.");
@@ -595,6 +603,7 @@
         System.err.println("  -ga | -GA   Turn on/off generation of synthetic schema annotations.");
         System.err.println("              NOTE: Not supported by all schema factories and
validators.");
         System.err.println("  -m  | -M    Turn on/off memory usage report");
+        System.err.println("  -xsd11      Turn on XSD 1.1 support.");
         System.err.println("  -h          This help screen.");
         
         System.err.println();



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


Mime
View raw message