equal
deleted
inserted
replaced
52 import com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings; |
52 import com.sun.org.apache.xerces.internal.util.ParserConfigurationSettings; |
53 import com.sun.org.apache.xerces.internal.util.Status; |
53 import com.sun.org.apache.xerces.internal.util.Status; |
54 import com.sun.org.apache.xerces.internal.util.SymbolTable; |
54 import com.sun.org.apache.xerces.internal.util.SymbolTable; |
55 import com.sun.org.apache.xerces.internal.util.XMLSymbols; |
55 import com.sun.org.apache.xerces.internal.util.XMLSymbols; |
56 import com.sun.org.apache.xerces.internal.utils.SecuritySupport; |
56 import com.sun.org.apache.xerces.internal.utils.SecuritySupport; |
|
57 import com.sun.org.apache.xerces.internal.utils.XMLSecurityPropertyManager; |
57 import com.sun.org.apache.xerces.internal.xni.XNIException; |
58 import com.sun.org.apache.xerces.internal.xni.XNIException; |
58 import com.sun.org.apache.xerces.internal.xni.grammars.Grammar; |
59 import com.sun.org.apache.xerces.internal.xni.grammars.Grammar; |
59 import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription; |
60 import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarDescription; |
60 import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarLoader; |
61 import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarLoader; |
61 import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; |
62 import com.sun.org.apache.xerces.internal.xni.grammars.XMLGrammarPool; |
216 Constants.XERCES_PROPERTY_PREFIX + Constants.LOCALE_PROPERTY; |
217 Constants.XERCES_PROPERTY_PREFIX + Constants.LOCALE_PROPERTY; |
217 |
218 |
218 protected static final String ENTITY_MANAGER = |
219 protected static final String ENTITY_MANAGER = |
219 Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_MANAGER_PROPERTY; |
220 Constants.XERCES_PROPERTY_PREFIX + Constants.ENTITY_MANAGER_PROPERTY; |
220 |
221 |
|
222 /** Property identifier: Security property manager. */ |
|
223 private static final String XML_SECURITY_PROPERTY_MANAGER = |
|
224 Constants.XML_SECURITY_PROPERTY_MANAGER; |
|
225 |
221 /** Property identifier: access to external dtd */ |
226 /** Property identifier: access to external dtd */ |
222 public static final String ACCESS_EXTERNAL_DTD = XMLConstants.ACCESS_EXTERNAL_DTD; |
227 public static final String ACCESS_EXTERNAL_DTD = XMLConstants.ACCESS_EXTERNAL_DTD; |
223 |
228 |
224 /** Property identifier: access to external schema */ |
229 /** Property identifier: access to external schema */ |
225 public static final String ACCESS_EXTERNAL_SCHEMA = XMLConstants.ACCESS_EXTERNAL_SCHEMA; |
230 public static final String ACCESS_EXTERNAL_SCHEMA = XMLConstants.ACCESS_EXTERNAL_SCHEMA; |
236 SCHEMA_NONS_LOCATION, |
241 SCHEMA_NONS_LOCATION, |
237 JAXP_SCHEMA_SOURCE, |
242 JAXP_SCHEMA_SOURCE, |
238 SECURITY_MANAGER, |
243 SECURITY_MANAGER, |
239 LOCALE, |
244 LOCALE, |
240 SCHEMA_DV_FACTORY, |
245 SCHEMA_DV_FACTORY, |
241 ACCESS_EXTERNAL_DTD, |
246 XML_SECURITY_PROPERTY_MANAGER |
242 ACCESS_EXTERNAL_SCHEMA |
|
243 }; |
247 }; |
244 |
248 |
245 // Data |
249 // Data |
246 |
250 |
247 // features and properties |
251 // features and properties |
268 private XSDeclarationPool fDeclPool = null; |
272 private XSDeclarationPool fDeclPool = null; |
269 private SubstitutionGroupHandler fSubGroupHandler; |
273 private SubstitutionGroupHandler fSubGroupHandler; |
270 private final CMNodeFactory fNodeFactory = new CMNodeFactory(); //component mgr will be set later |
274 private final CMNodeFactory fNodeFactory = new CMNodeFactory(); //component mgr will be set later |
271 private CMBuilder fCMBuilder; |
275 private CMBuilder fCMBuilder; |
272 private XSDDescription fXSDDescription = new XSDDescription(); |
276 private XSDDescription fXSDDescription = new XSDDescription(); |
273 private String faccessExternalDTD = Constants.EXTERNAL_ACCESS_DEFAULT; |
|
274 private String faccessExternalSchema = Constants.EXTERNAL_ACCESS_DEFAULT; |
277 private String faccessExternalSchema = Constants.EXTERNAL_ACCESS_DEFAULT; |
275 |
278 |
276 private Map fJAXPCache; |
279 private Map fJAXPCache; |
277 private Locale fLocale = Locale.getDefault(); |
280 private Locale fLocale = Locale.getDefault(); |
278 |
281 |
464 fErrorReporter = (XMLErrorReporter)state; |
467 fErrorReporter = (XMLErrorReporter)state; |
465 if (fErrorReporter.getMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN) == null) { |
468 if (fErrorReporter.getMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN) == null) { |
466 fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter()); |
469 fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter()); |
467 } |
470 } |
468 } |
471 } |
469 else if (propertyId.equals(ACCESS_EXTERNAL_DTD)) { |
472 else if (propertyId.equals(XML_SECURITY_PROPERTY_MANAGER)) { |
470 faccessExternalDTD = (String) state; |
473 XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager)state; |
471 } |
474 faccessExternalSchema = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_SCHEMA); |
472 else if (propertyId.equals(ACCESS_EXTERNAL_SCHEMA)) { |
|
473 faccessExternalSchema = (String) state; |
|
474 } |
475 } |
475 } // setProperty(String, Object) |
476 } // setProperty(String, Object) |
476 |
477 |
477 /** |
478 /** |
478 * Set the locale to use for messages. |
479 * Set the locale to use for messages. |
1064 |
1065 |
1065 // get generate-synthetic-annotations feature |
1066 // get generate-synthetic-annotations feature |
1066 fSchemaHandler.setGenerateSyntheticAnnotations(componentManager.getFeature(GENERATE_SYNTHETIC_ANNOTATIONS, false)); |
1067 fSchemaHandler.setGenerateSyntheticAnnotations(componentManager.getFeature(GENERATE_SYNTHETIC_ANNOTATIONS, false)); |
1067 fSchemaHandler.reset(componentManager); |
1068 fSchemaHandler.reset(componentManager); |
1068 |
1069 |
1069 faccessExternalDTD = (String) componentManager.getProperty(ACCESS_EXTERNAL_DTD); |
1070 XMLSecurityPropertyManager spm = (XMLSecurityPropertyManager)componentManager.getProperty(XML_SECURITY_PROPERTY_MANAGER); |
1070 faccessExternalSchema = (String) componentManager.getProperty(ACCESS_EXTERNAL_SCHEMA); |
1071 faccessExternalSchema = spm.getValue(XMLSecurityPropertyManager.Property.ACCESS_EXTERNAL_SCHEMA); |
1071 } |
1072 } |
1072 |
1073 |
1073 private void initGrammarBucket(){ |
1074 private void initGrammarBucket(){ |
1074 if(fGrammarPool != null) { |
1075 if(fGrammarPool != null) { |
1075 Grammar [] initialGrammars = fGrammarPool.retrieveInitialGrammarSet(XMLGrammarDescription.XML_SCHEMA); |
1076 Grammar [] initialGrammars = fGrammarPool.retrieveInitialGrammarSet(XMLGrammarDescription.XML_SCHEMA); |