/** * Get the typed value of a node that is annotated with this schema type. The result of this method will always be consistent with the method * {@link #getTypedValue}. However, this method is often more convenient and may be * more efficient, especially in the common case where the value is expected to be a singleton. * * @param node the node whose typed value is required * @return the typed value. * @since 8.5 */ public Value atomize(NodeInfo node) throws XPathException { return new SequenceExtent(getTypedValue(node)).simplify(); }
/** * Get the typed value of a node that is annotated with this schema type. The result of this method will always be consistent with the method * {@link #getTypedValue}. However, this method is often more convenient and may be * more efficient, especially in the common case where the value is expected to be a singleton. * * @param node the node whose typed value is required * @return the typed value. * @since 8.5 */ public Value atomize(NodeInfo node) throws XPathException { return new SequenceExtent(getTypedValue(node)).simplify(); }
/** * Get the typed value of a node that is annotated with this schema type. The result of this method will always be consistent with the method * * @param node the node whose typed value is required * @return the typed value. * @since 8.5 */ public AtomicSequence atomize(/*@NotNull*/ NodeInfo node) throws XPathException { try { return getTypedValue(node.getStringValue(), new InscopeNamespaceResolver(node), node.getConfiguration().getConversionRules()); } catch (ValidationException err) { throw new XPathException("Internal error: value doesn't match its type annotation. " + err.getMessage()); } }
/** * Get the typed value of a node that is annotated with this schema type. This method must be called * only for a valid type. * * @param node the node whose typed value is required * @return a SequenceIterator over the atomic values making up the typed value of the specified * node. The objects returned by this iterator are of type {@link net.sf.saxon.value.AtomicValue} */ public SequenceIterator getTypedValue(NodeInfo node) throws XPathException { try { return getTypedValue(node.getStringValue(), new InscopeNamespaceResolver(node), node.getConfiguration().getNameChecker()); } catch (ValidationException err) { throw new XPathException("Internal error: value doesn't match its type annotation. " + err.getMessage()); } }
/** * Get the typed value of a node that is annotated with this schema type. The result of this method will always be consistent with the method * * @param node the node whose typed value is required * @return the typed value. * @since 8.5 */ public AtomicSequence atomize(/*@NotNull*/ NodeInfo node) throws XPathException { try { return getTypedValue(node.getStringValue(), new InscopeNamespaceResolver(node), node.getConfiguration().getConversionRules()); } catch (ValidationException err) { throw new XPathException("Internal error: value doesn't match its type annotation. " + err.getMessage()); } }
/** * Get the typed value of a node that is annotated with this schema type. This method must be called * only for a valid type. * * @param node the node whose typed value is required * @return a SequenceIterator over the atomic values making up the typed value of the specified * node. The objects returned by this iterator are of type {@link net.sf.saxon.value.AtomicValue} */ public SequenceIterator getTypedValue(NodeInfo node) throws XPathException { try { return getTypedValue(node.getStringValue(), new InscopeNamespaceResolver(node), node.getConfiguration().getNameChecker()); } catch (ValidationException err) { throw new XPathException("Internal error: value doesn't match its type annotation. " + err.getMessage()); } }