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 2005/11/21 06:09:36 UTC
svn commit: r345834 - /xerces/java/trunk/samples/xni/XMLGrammarBuilder.java
Author: mrglavas
Date: Sun Nov 20 21:09:32 2005
New Revision: 345834
URL: http://svn.apache.org/viewcvs?rev=345834&view=rev
Log:
IntegratedParserConfiguration hasn't been the default parser configuration for a long time.
When no parser configuration has been specified use XIncludeAwareParserConfiguration which
is the current default.
Modified:
xerces/java/trunk/samples/xni/XMLGrammarBuilder.java
Modified: xerces/java/trunk/samples/xni/XMLGrammarBuilder.java
URL: http://svn.apache.org/viewcvs/xerces/java/trunk/samples/xni/XMLGrammarBuilder.java?rev=345834&r1=345833&r2=345834&view=diff
==============================================================================
--- xerces/java/trunk/samples/xni/XMLGrammarBuilder.java (original)
+++ xerces/java/trunk/samples/xni/XMLGrammarBuilder.java Sun Nov 20 21:09:32 2005
@@ -1,5 +1,5 @@
/*
- * Copyright 1999-2004 The Apache Software Foundation.
+ * Copyright 1999-2005 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -16,19 +16,18 @@
package xni;
+import java.util.Vector;
+
+import org.apache.xerces.impl.Constants;
+import org.apache.xerces.parsers.XIncludeAwareParserConfiguration;
import org.apache.xerces.parsers.XMLGrammarPreparser;
-import org.apache.xerces.parsers.IntegratedParserConfiguration;
import org.apache.xerces.util.SymbolTable;
import org.apache.xerces.util.XMLGrammarPoolImpl;
-import org.apache.xerces.impl.Constants;
-
-import org.apache.xerces.xni.grammars.XMLGrammarDescription;
import org.apache.xerces.xni.grammars.Grammar;
+import org.apache.xerces.xni.grammars.XMLGrammarDescription;
import org.apache.xerces.xni.parser.XMLInputSource;
import org.apache.xerces.xni.parser.XMLParserConfiguration;
-import java.util.Vector;
-
/**
* This sample program illustrates how to use Xerces2's grammar
* preparsing and caching functionality. It permits either DTD or
@@ -241,9 +240,10 @@
}
// Now we have a grammar pool and a SymbolTable; just
// build a configuration and we're on our way!
- if(parserConfiguration == null) {
- parserConfiguration = new IntegratedParserConfiguration(sym, grammarPool);
- } else {
+ if (parserConfiguration == null) {
+ parserConfiguration = new XIncludeAwareParserConfiguration(sym, grammarPool);
+ }
+ else {
// set GrammarPool and SymbolTable...
parserConfiguration.setProperty(SYMBOL_TABLE, sym);
parserConfiguration.setProperty(GRAMMAR_POOL, grammarPool);
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@xerces.apache.org
For additional commands, e-mail: commits-help@xerces.apache.org