Permalink
Browse files

Replace deprecated calls to set whitespace stripping.

  • Loading branch information...
ndw committed Jan 25, 2018
1 parent 501aaf8 commit 1e7285cd8bff485a4f2e90782b9e96c23d8cecc0
Showing with 28 additions and 29 deletions.
  1. +28 −29 src/main/java/com/xmlcalabash/core/XProcConfiguration.java
@@ -1,9 +1,20 @@
package com.xmlcalabash.core;
import com.nwalsh.annotations.SaxonExtensionFunction;
import com.xmlcalabash.io.DocumentSequence;
import com.xmlcalabash.io.ReadablePipe;
import com.xmlcalabash.model.Step;
import com.xmlcalabash.piperack.PipelineSource;
import com.xmlcalabash.util.*;
import net.sf.saxon.Configuration;
import com.xmlcalabash.runtime.XAtomicStep;
import com.xmlcalabash.util.AxisNodes;
import com.xmlcalabash.util.Input;
import com.xmlcalabash.util.JSONtoXML;
import com.xmlcalabash.util.LogOptions;
import com.xmlcalabash.util.Output;
import com.xmlcalabash.util.S9apiUtils;
import com.xmlcalabash.util.URIUtils;
import net.sf.saxon.Version;
import net.sf.saxon.om.NoElementsSpaceStrippingRule;
import net.sf.saxon.s9api.Axis;
import net.sf.saxon.s9api.DocumentBuilder;
import net.sf.saxon.s9api.Processor;
@@ -13,45 +24,34 @@
import net.sf.saxon.s9api.XdmNode;
import net.sf.saxon.s9api.XdmNodeKind;
import net.sf.saxon.s9api.XdmValue;
import net.sf.saxon.value.Whitespace;
import org.atteo.classindex.ClassFilter;
import org.atteo.classindex.ClassIndex;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xml.sax.InputSource;
import javax.xml.transform.Source;
import javax.xml.transform.sax.SAXSource;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.lang.reflect.Method;
import java.net.URL;
import java.util.Collections;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Vector;
import java.util.HashSet;
import java.io.InputStream;
import java.lang.reflect.Constructor;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.net.URI;
import java.net.URISyntaxException;
import java.io.InputStream;
import java.io.File;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Hashtable;
import java.util.Vector;
import java.util.jar.JarFile;
import java.util.zip.ZipEntry;
import com.xmlcalabash.io.ReadablePipe;
import com.xmlcalabash.io.DocumentSequence;
import com.xmlcalabash.runtime.XAtomicStep;
import com.xmlcalabash.model.Step;
import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.Source;
import org.atteo.classindex.ClassFilter;
import org.atteo.classindex.ClassIndex;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.xml.sax.InputSource;
import static com.xmlcalabash.util.URIUtils.encode;
import static java.lang.String.format;
import static java.lang.System.getProperty;
import net.sf.saxon.Version;
/**
* Created by IntelliJ IDEA.
@@ -262,8 +262,7 @@ private void createSaxonProcessor(String proctype, boolean schemaAware, Input sa
cfgProcessor = new Processor(licensed);
}
cfgProcessor.getUnderlyingConfiguration().setStripsAllWhiteSpace(false);
cfgProcessor.getUnderlyingConfiguration().setStripsWhiteSpace(Whitespace.NONE);
cfgProcessor.getUnderlyingConfiguration().getParseOptions().setSpaceStrippingRule(NoElementsSpaceStrippingRule.getInstance());
String actualtype = Version.softwareEdition;
if ((proctype != null) && !"he".equals(proctype) && (!actualtype.toLowerCase().equals(proctype))) {

0 comments on commit 1e7285c

Please sign in to comment.