## Deprecated API

Contents

- Deprecated Exceptions
- Deprecated Methods
- Deprecated Constructors

Deprecated Exceptions
net.sf.saxon.trans.DynamicError since 9.0 - use the superclass XPathException instead
net.sf.saxon.trans.StaticError since 9.0: use the superclass, `XPathException`

Deprecated Methods
net.sf.saxon.sxpath.XPathEvaluator.build(Source) since 8.9. The preferred way to build a source document is to use `Configuration.buildDocument(javax.xml.transform.Source)`
net.sf.saxon.query.StaticQueryContext.clearPassiveNamespaces() since 9.0 - use `StaticQueryContext.clearNamespaces()`
net.sf.saxon.ant.AntTransform.configureLiaison(File) since Ant 1.7
net.sf.saxon.xpath.XPathEvaluator.createExpression(String) since Saxon 8.9 - use `XPathEvaluator.compile(String)`
net.sf.saxon.query.StaticQueryContext.declarePassiveNamespace(String, String, boolean) since 9.0. Use `StaticQueryContext.declareNamespace(java.lang.String, java.lang.String)`
net.sf.saxon.expr.Expression.display(int, PrintStream, Configuration) since 9.0 - use the explain method
net.sf.saxon.xpath.XPathExpressionImpl.evaluate() since 9.0. This method is not present in the JAXP interface. Either use the JAXP methods such as `XPathExpressionImpl.evaluate(Object, QName)`, or use the Saxon XPath API instead of JAXP.
net.sf.saxon.xpath.XPathEvaluator.evaluate(String) since Saxon 8.9 - use the various method defined in the JAXP interface definition
net.sf.saxon.xpath.XPathExpressionImpl.evaluateSingle() since 9.0. This method is not present in the JAXP interface. Either use the JAXP methods such as `XPathExpressionImpl.evaluate(Object, QName)`, or use the Saxon XPath API instead of JAXP.
net.sf.saxon.xpath.XPathEvaluator.evaluateSingle(String) since Saxon 8.9 - use the methods defined in the JAXP interface
net.sf.saxon.query.XQueryExpression.getController() since 8.5.1 - use newController()
net.sf.saxon.AugmentedSource.getEntityResolver() since 9.1 (setting an EntityResolver has never had any effect)
com.saxonica.schema.UserDefinedType.getLocalName() since 9.0: use the equivalent method `UserDefinedType.getName()`
com.saxonica.schema.AttributeDecl.getNamespace() since 9.0: use the renamed method getTargetNamespace()
com.saxonica.schema.ElementDecl.getNamespaceURI() since 9.0: use the renamed method getTargetNamespace()
net.sf.saxon.om.Navigator.isWhite(CharSequence) since Saxon 8.5: use `Whitespace.isWhite(java.lang.CharSequence)`
net.sf.saxon.s9api.XdmItem.newAtomicValue(String, ItemType) since 9.1. This factory method duplicates the constructor `XdmAtomicValue.XdmAtomicValue(String, ItemType)` which should be used in preference
net.sf.saxon.value.DurationValue.normalizeDuration() since 9.0 - the method does nothing
net.sf.saxon.sxpath.XPathExpression.rawIterator(Source) since 8.9 - use `XPathExpression.iterate(net.sf.saxon.sxpath.XPathDynamicContext)`
net.sf.saxon.query.QueryResult.serialize(NodeInfo, Result, Properties, Configuration) since 8.9; use `QueryResult.serialize(NodeInfo, Result, Properties)` instead.
net.sf.saxon.query.DynamicQueryContext.setContextNode(NodeInfo) From Saxon 8.7, the method `DynamicQueryContext.setContextItem(Item)` is preferred
net.sf.saxon.xpath.XPathExpressionImpl.setContextNode(NodeInfo) since 9.0. Using this method is not thread-safe. Use a method instead such as `XPathExpressionImpl.evaluate(Object, QName)` that allows the context node to be specified as a parameter to the call.
net.sf.saxon.xpath.XPathEvaluator.setContextNode(NodeInfo) since Saxon 8.9 - use the various method defined in the JAXP interface definition, which allow a NodeInfo object to be supplied as the value of the Source argument
net.sf.saxon.AugmentedSource.setEntityResolver(EntityResolver) since 9.1 (this method has never had any effect, other than allowing the EntityResolver to be retrieved using the `getEntityResolver()` method)
net.sf.saxon.Controller.setPrincipalSourceDocument(DocumentInfo) From Saxon 8.7, replaced by `Controller.setInitialContextItem(Item)`
net.sf.saxon.xpath.XPathExpressionImpl.setSortKey(XPathExpressionImpl) since 9.0. This method is not present in the JAXP interface. The recommended way to get a sorted result is to use XQuery instead of XPath.
net.sf.saxon.sxpath.XPathEvaluator.setStripSpace(boolean) since 8.9. The preferred way to build a source document is to use `Configuration.buildDocument(javax.xml.transform.Source)`
net.sf.saxon.xpath.XPathEvaluator.setStripSpace(boolean) since 8.9. The preferred way to define options for the way in which source documents are built is to use the class `AugmentedSource` for any of the methods expecting a `Source` object.
net.sf.saxon.Controller.unravel(Source, Configuration) since 9.0: use `Configuration.unravel(javax.xml.transform.Source)`

Deprecated Constructors
net.sf.saxon.StandardURIResolver() since 8.7
net.sf.saxon.expr.XPathContextMajor(Item, Configuration) since 9.0 - use `XPathContextMajor.XPathContextMajor(Item, Executable)`

Copyright (c) Saxonica Limited. All rights reserved.