/** * Get the configuration */ public Configuration getConfiguration() { return savedXPathContext.getConfiguration(); }
/** * Get the configuration */ public Configuration getConfiguration() { return savedXPathContext.getConfiguration(); }
/** * Create a new thread manager. This is called when starting an XSLT Transformation, and also * when entering a try/catch block. In Saxon-HE it does nothing. */ public void createThreadManager() { threadManager = getConfiguration().makeThreadManager(); }
/** * Create a new thread manager. This is called when starting an XSLT Transformation, and also * when entering a try/catch block. In Saxon-HE it does nothing. */ public void createThreadManager() { threadManager = getConfiguration().makeThreadManager(); }
/** * Set an object that will be used to resolve URIs used in * document(), etc. This method allows a URIResolver to be set that is local * to this particular XPathContext, which is useful when local behaviour is * needed, e.g. during schema validation. The URIResolver set in the Controller * and in the Configuration are not affected by this call. * * @param resolver An object that implements the URIResolver interface, or * null. * @since 9.6 */ public void setURIResolver(URIResolver resolver) { uriResolver = resolver; if (resolver instanceof StandardURIResolver) { ((StandardURIResolver) resolver).setConfiguration(getConfiguration()); } }
/** * Set an object that will be used to resolve URIs used in * document(), etc. This method allows a URIResolver to be set that is local * to this particular XPathContext, which is useful when local behaviour is * needed, e.g. during schema validation. The URIResolver set in the Controller * and in the Configuration are not affected by this call. * * @param resolver An object that implements the URIResolver interface, or * null. * @since 9.6 */ public void setURIResolver(URIResolver resolver) { uriResolver = resolver; if (resolver instanceof StandardURIResolver) { ((StandardURIResolver) resolver).setConfiguration(getConfiguration()); } }
/** * Set the context item to a node derived from a supplied Source object. This may be * any implementation of the Source interface recognized by Saxon. Note that the * Saxon {@link NodeInfo} interface, representing a node in a tree, is one such * implementation; others include {@link javax.xml.transform.stream.StreamSource}, * {@link javax.xml.transform.sax.SAXSource}, and {@link javax.xml.transform.dom.DOMSource} * * @param source The source object representing the node that will be used as the context item * @throws XPathException if a failure occurs reading or parsing a Source object to build an input tree, * or if the source is a document that was built under the wrong configuration */ public void setContextNode(Source source) throws XPathException { NodeInfo origin; if (source instanceof NodeInfo) { origin = (NodeInfo)source; if (!origin.getConfiguration().isCompatible(contextObject.getConfiguration())) { throw new XPathException( "Supplied node must be built using the same or a compatible Configuration", SaxonErrorCode.SXXP0004); } } else { origin = contextObject.getConfiguration().buildDocument(source); } setContextItem(origin); }
/** * Set the context item to a node derived from a supplied Source object. This may be * any implementation of the Source interface recognized by Saxon. Note that the * Saxon {@link NodeInfo} interface, representing a node in a tree, is one such * implementation; others include {@link javax.xml.transform.stream.StreamSource}, * {@link javax.xml.transform.sax.SAXSource}, and {@link javax.xml.transform.dom.DOMSource} * * @param source The source object representing the node that will be used as the context item * @throws XPathException if a failure occurs reading or parsing a Source object to build an input tree, * or if the source is a document that was built under the wrong configuration */ public void setContextNode(Source source) throws XPathException { NodeInfo origin; if (source instanceof NodeInfo) { origin = (NodeInfo)source; if (!origin.getConfiguration().isCompatible(contextObject.getConfiguration())) { throw new XPathException( "Supplied node must be built using the same or a compatible Configuration", SaxonErrorCode.SXXP0004); } } else { origin = contextObject.getConfiguration().buildDocument(source); } setContextItem(origin); }
/** * Set the context item for evaluation of the XPath Expression * * @param item the context item * @throws XPathException if the node is in a document that was built under the wrong configuration */ public void setContextItem(Item<?> item) throws XPathException { if (item instanceof NodeInfo) { if (!((NodeInfo) item).getConfiguration().isCompatible(contextObject.getConfiguration())) { throw new XPathException( "Supplied node must be built using the same or a compatible Configuration", SaxonErrorCode.SXXP0004); } } TypeHierarchy th = contextObject.getConfiguration().getTypeHierarchy(); if (!contextItemType.matches(item, th)) { throw new XPathException("Supplied context item does not match required context item type " + contextItemType); } ManualIterator<Item<?>> iter = new ManualIterator<>(item); contextObject.setCurrentIterator(iter); }
/** * Set the context item for evaluation of the XPath Expression * * @param item the context item * @throws XPathException if the node is in a document that was built under the wrong configuration */ public void setContextItem(Item<?> item) throws XPathException { if (item instanceof NodeInfo) { if (!((NodeInfo) item).getConfiguration().isCompatible(contextObject.getConfiguration())) { throw new XPathException( "Supplied node must be built using the same or a compatible Configuration", SaxonErrorCode.SXXP0004); } } TypeHierarchy th = contextObject.getConfiguration().getTypeHierarchy(); if (!contextItemType.matches(item, th)) { throw new XPathException("Supplied context item does not match required context item type " + contextItemType); } ManualIterator<Item<?>> iter = new ManualIterator<>(item); contextObject.setCurrentIterator(iter); }
/** * Set the context item for evaluation of the XPath Expression * @param item the context item * @throws XPathException if the node is in a document that was built under the wrong configuration */ public void setContextItem(Item item) throws XPathException { if (item instanceof NodeInfo) { if (!((NodeInfo)item).getConfiguration().isCompatible(contextObject.getConfiguration())) { throw new XPathException( "Supplied node must be built using the same or a compatible Configuration", SaxonErrorCode.SXXP0004); } } UnfailingIterator iter = SingletonIterator.makeIterator(item); iter.next(); contextObject.setCurrentIterator(iter); }
/** * Set the context item for evaluation of the XPath Expression * @param item the context item * @throws XPathException if the node is in a document that was built under the wrong configuration */ public void setContextItem(Item item) throws XPathException { if (item instanceof NodeInfo) { if (!((NodeInfo)item).getConfiguration().isCompatible(contextObject.getConfiguration())) { throw new XPathException( "Supplied node must be built using the same or a compatible Configuration", SaxonErrorCode.SXXP0004); } } UnfailingIterator iter = SingletonIterator.makeIterator(item); iter.next(); contextObject.setCurrentIterator(iter); }
if (!((NodeInfo)item).getConfiguration().isCompatible(contextObject.getConfiguration())) { throw new XPathException( "Supplied node must be built using the same or a compatible Configuration",
Item<?> item; while ((item = iter.next()) != null) { if (item instanceof NodeInfo && !((NodeInfo) item).getConfiguration().isCompatible(contextObject.getConfiguration())) { throw new XPathException( "Supplied node must be built using the same or a compatible Configuration",
Item<?> item; while ((item = iter.next()) != null) { if (item instanceof NodeInfo && !((NodeInfo) item).getConfiguration().isCompatible(contextObject.getConfiguration())) { throw new XPathException( "Supplied node must be built using the same or a compatible Configuration",
if (!((NodeInfo)item).getConfiguration().isCompatible(contextObject.getConfiguration())) { throw new XPathException( "Supplied node must be built using the same or a compatible Configuration",
GroundedValue<?> result; if (indexed) { result = c2.getConfiguration().makeSequenceExtent(select, FilterExpression.FILTERED, c2); } else { result = select.iterate(c2).materialize();
GroundedValue<?> result; if (indexed) { result = c2.getConfiguration().makeSequenceExtent(select, FilterExpression.FILTERED, c2); } else { result = select.iterate(c2).materialize();
out = (Receiver)result; } else { SerializerFactory sf = context.getConfiguration().getSerializerFactory(); PipelineConfiguration pipe = controller.makePipelineConfiguration(); pipe.setHostLanguage(Configuration.XQUERY);
out = (Receiver)result; } else { SerializerFactory sf = context.getConfiguration().getSerializerFactory(); PipelineConfiguration pipe = controller.makePipelineConfiguration(); pipe.setHostLanguage(Configuration.XQUERY);