Permalink
Browse files

Fix bug where attempts to create a PE or HE configuration sometimes s…

…ilently failed and produced an HE configuration
  • Loading branch information...
1 parent 1e9ecad commit 1a65c16f700df22502d0073a1afa0c8d8e744780 @ndw committed Jan 1, 2012
Showing with 10 additions and 5 deletions.
  1. +10 −5 src/com/xmlcalabash/core/XProcConfiguration.java
View
15 src/com/xmlcalabash/core/XProcConfiguration.java
@@ -161,6 +161,11 @@ private void init(String proctype, boolean schemaAware, String saxoncfg) {
createSaxonProcessor(proctype, schemaAware, saxoncfg);
loadConfiguration();
+ // If we got a schema aware processor, make sure it's reflected in our config
+ // FIXME: are there other things that should be reflected this way?
+ this.schemaAware = cfgProcessor.isSchemaAware();
+ this.saxonProcessor = cfgProcessor.getUnderlyingConfiguration().softwareEdition.toLowerCase();
+
if (!(proctype == null || saxonProcessor.equals(proctype)) || schemaAware != this.schemaAware ||
(saxoncfg == null && saxonConfigFile != null)) {
// Drat. We have to restart to get the right configuration.
@@ -174,12 +179,12 @@ private void init(String proctype, boolean schemaAware, String saxoncfg) {
createSaxonProcessor(saxonProcessor, this.schemaAware, saxonConfigFile);
loadConfiguration();
- }
- // If we got a schema aware processor, make sure it's reflected in our config
- // FIXME: are there other things that should be reflected this way?
- this.schemaAware = cfgProcessor.isSchemaAware();
- this.saxonProcessor = cfgProcessor.getUnderlyingConfiguration().softwareEdition.toLowerCase();
+ // If we got a schema aware processor, make sure it's reflected in our config
+ // FIXME: are there other things that should be reflected this way?
+ this.schemaAware = cfgProcessor.isSchemaAware();
+ this.saxonProcessor = cfgProcessor.getUnderlyingConfiguration().softwareEdition.toLowerCase();
+ }
}
private void createSaxonProcessor(String proctype, boolean schemaAware, String saxoncfg) {

0 comments on commit 1a65c16

Please sign in to comment.