Skip to content

Commit

Permalink
Fix bug where attempts to create a PE or HE configuration sometimes s…
Browse files Browse the repository at this point in the history
…ilently failed and produced an HE configuration
  • Loading branch information
ndw committed Jan 1, 2012
1 parent 1e9ecad commit 1a65c16
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions src/com/xmlcalabash/core/XProcConfiguration.java
Expand Up @@ -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.
Expand All @@ -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) {
Expand Down

0 comments on commit 1a65c16

Please sign in to comment.