Return-Path: Delivered-To: apmail-xerces-commits-archive@www.apache.org Received: (qmail 11190 invoked from network); 14 May 2008 03:47:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 May 2008 03:47:35 -0000 Received: (qmail 14103 invoked by uid 500); 14 May 2008 03:47:37 -0000 Delivered-To: apmail-xerces-commits-archive@xerces.apache.org Received: (qmail 14074 invoked by uid 500); 14 May 2008 03:47:37 -0000 Mailing-List: contact commits-help@xerces.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list commits@xerces.apache.org Received: (qmail 14063 invoked by uid 99); 14 May 2008 03:47:37 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 13 May 2008 20:47:37 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 14 May 2008 03:46:51 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 7DA682388A0D; Tue, 13 May 2008 20:47:12 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r656094 - /xerces/java/trunk/src/org/apache/xerces/jaxp/validation/XMLSchemaFactory.java Date: Wed, 14 May 2008 03:47:12 -0000 To: commits@xerces.apache.org From: mrglavas@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080514034712.7DA682388A0D@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: mrglavas Date: Tue May 13 20:47:11 2008 New Revision: 656094 URL: http://svn.apache.org/viewvc?rev=656094&view=rev Log: Added newSchema() method which allows an application to create a Schema from an XMLGrammarPool. Modified: xerces/java/trunk/src/org/apache/xerces/jaxp/validation/XMLSchemaFactory.java Modified: xerces/java/trunk/src/org/apache/xerces/jaxp/validation/XMLSchemaFactory.java URL: http://svn.apache.org/viewvc/xerces/java/trunk/src/org/apache/xerces/jaxp/validation/XMLSchemaFactory.java?rev=656094&r1=656093&r2=656094&view=diff ============================================================================== --- xerces/java/trunk/src/org/apache/xerces/jaxp/validation/XMLSchemaFactory.java (original) +++ xerces/java/trunk/src/org/apache/xerces/jaxp/validation/XMLSchemaFactory.java Tue May 13 20:47:11 2008 @@ -269,6 +269,17 @@ return schema; } + public Schema newSchema(XMLGrammarPool pool) throws SAXException { + // If the "use-grammar-pool-only" feature is set to true + // prevent the application's grammar pool from being mutated + // by wrapping it in a ReadOnlyGrammarPool. + final AbstractXMLSchema schema = (fUseGrammarPoolOnly) ? + new XMLSchema(new ReadOnlyGrammarPool(pool)) : + new XMLSchema(pool, false); + propagateFeatures(schema); + return schema; + } + public boolean getFeature(String name) throws SAXNotRecognizedException, SAXNotSupportedException { if (name == null) { --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org For additional commands, e-mail: commits-help@xerces.apache.org