# Deprecated API

## Contents

- Deprecated Methods
- Deprecated Constructors

- Deprecated Methods
  Method and Description
  net.sf.saxon.query.StaticQueryContext.buildDocument(Source) since 9.2: use `Configuration.buildDocument(javax.xml.transform.Source)`
  net.sf.saxon.xpath.XPathEvaluator.createExpression(String) since Saxon 8.9 - use `XPathEvaluator.compile(String)`
  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.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.
  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()
  net.sf.saxon.Controller.getTreeModel() since 9.2: use `Controller.getModel()`
  net.sf.saxon.lib.AugmentedSource.getTreeModel() since 9.2: use `AugmentedSource.getModel()`
  com.saxonica.config.ProfessionalConfiguration.isSchemaAware(int) since 9.2: use isLicensedFeature() instead
  net.sf.saxon.Configuration.isSchemaAware(int) since 9.2: use isLicensedFeature() instead
  net.sf.saxon.Configuration.makeSchemaAwareConfiguration(ClassLoader, String) since 9.2. Use `Configuration.makeLicensedConfiguration(java.lang.ClassLoader, java.lang.String)` instead.
  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.dom.DocumentBuilderImpl.parse(InputSource) since 9.3. The DOM created by this class is a DOM wrapper around (typically) a Saxon Tiny Tree. There is little point in constructing such an object. If the tree is primarily for use by Saxon XSLT and XQuery, it is better to construct a Tiny Tree directly and omit the DOM wrapper; if it is primarily for other DOM applications, it is better to construct a fully- functional DOM using (for example) Apache Xerces.
  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.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.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.setTreeModel(int) since 9.2: use `Controller.setModel(net.sf.saxon.om.TreeModel)`
  net.sf.saxon.lib.AugmentedSource.setTreeModel(int) since 9.2: use `AugmentedSource.setModel(net.sf.saxon.om.TreeModel)`

- Deprecated Constructors
  Constructor and Description
  net.sf.saxon.query.StaticQueryContext(Configuration) since 9.2. Use config.newStaticQueryContext(). This will create a StaticQueryContext with capabilities appropriate to the configuration (for example, offering XQuery 1.1 support).
  net.sf.saxon.expr.XPathContextMajor(Item, Configuration) since 9.0 - use `XPathContextMajor.XPathContextMajor(Item, Executable)`

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.