/** * Get the typed value. * * @return the typed value. * @since 8.5 */ public AtomicSequence atomize() throws XPathException { if (getNodeKind() == Type.ELEMENT) { return getSchemaType().atomize(this); } else { return node.atomize(); } }
/** * Get the typed value. * * @return the typed value. * @since 8.5 */ public AtomicSequence atomize() throws XPathException { if (getNodeKind() == Type.ELEMENT) { return getSchemaType().atomize(this); } else { return node.atomize(); } }
/** * Get the typed value. * * @return the typed value. If requireSingleton is set to true, the result will always be an * AtomicValue. In other cases it may be a Value representing a sequence whose items are atomic * values. * @since 8.5 */ public AtomicSequence atomize() throws XPathException { SchemaType stype = getSchemaType(); if (stype == Untyped.getInstance() || stype == BuiltInAtomicType.UNTYPED_ATOMIC) { return new UntypedAtomicValue(getStringValueCS()); } else { return stype.atomize(this); } }
/** * Get the typed value. * * @return the typed value. If requireSingleton is set to true, the result will always be an * AtomicValue. In other cases it may be a Value representing a sequence whose items are atomic * values. * @since 8.5 */ public AtomicSequence atomize() throws XPathException { SchemaType stype = getSchemaType(); if (stype == Untyped.getInstance() || stype == BuiltInAtomicType.UNTYPED_ATOMIC) { return new UntypedAtomicValue(getStringValueCS()); } else { return stype.atomize(this); } }
/** * Get the typed value. * @return the typed value. * @since 8.5 */ public AtomicSequence atomize() throws XPathException { switch (getNodeKind()) { case Type.COMMENT: case Type.PROCESSING_INSTRUCTION: return new StringValue(stringValue); case Type.TEXT: case Type.DOCUMENT: case Type.NAMESPACE: return new UntypedAtomicValue(stringValue); default: if (typeAnnotation == null || typeAnnotation == Untyped.getInstance() || typeAnnotation == BuiltInAtomicType.UNTYPED_ATOMIC) { return new UntypedAtomicValue(stringValue); } else { return typeAnnotation.atomize(this); } } }
/** * Get the typed value. * @return the typed value. * @since 8.5 */ public AtomicSequence atomize() throws XPathException { switch (getNodeKind()) { case Type.COMMENT: case Type.PROCESSING_INSTRUCTION: return new StringValue(stringValue); case Type.TEXT: case Type.DOCUMENT: case Type.NAMESPACE: return new UntypedAtomicValue(stringValue); default: if (typeAnnotation == null || typeAnnotation == Untyped.getInstance() || typeAnnotation == BuiltInAtomicType.UNTYPED_ATOMIC) { return new UntypedAtomicValue(stringValue); } else { return typeAnnotation.atomize(this); } } }
Err.wrap(typeName) + " in standalone node"); } else { return stype.atomize(this);
Err.wrap(typeName) + " in standalone node"); } else { return stype.atomize(this);
Err.wrap(typeName) + " in standalone node"); } else { return stype.atomize(this);
return new AnyURIValue(stringValue); } else { AtomicSequence value = stype.atomize(element); if (allowTypedValueCache) { if (typedValueArray == null) {
/** * Get the typed value. The result of this method will always be consistent with the method * {@link net.sf.saxon.om.Item#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. * * @return the typed value. If requireSingleton is set to true, the result will always be an * AtomicValue. In other cases it may be a Value representing a sequence whose items are atomic * values. * @since 8.5 */ public Value atomize() throws XPathException { int annotation = getTypeAnnotation(); if ((annotation & NodeInfo.IS_DTD_TYPE) != 0) { annotation = StandardNames.XS_UNTYPED_ATOMIC; } if (annotation == -1 || annotation == StandardNames.XS_UNTYPED_ATOMIC || annotation == StandardNames.XS_UNTYPED) { return new UntypedAtomicValue(getStringValueCS()); } else { SchemaType stype = getConfiguration().getSchemaType(annotation); if (stype == null) { String typeName = getNamePool().getDisplayName(annotation); throw new XPathException("Unknown type annotation " + Err.wrap(typeName) + " in document instance"); } else { return stype.atomize(this); } } }
/** * Get the typed value. The result of this method will always be consistent with the method * {@link net.sf.saxon.om.Item#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. * * @return the typed value. If requireSingleton is set to true, the result will always be an * AtomicValue. In other cases it may be a Value representing a sequence whose items are atomic * values. * @since 8.5 */ public Value atomize() throws XPathException { int annotation = getTypeAnnotation(); if ((annotation & NodeInfo.IS_DTD_TYPE) != 0) { annotation = StandardNames.XS_UNTYPED_ATOMIC; } if (annotation == -1 || annotation == StandardNames.XS_UNTYPED_ATOMIC || annotation == StandardNames.XS_UNTYPED) { return new UntypedAtomicValue(getStringValueCS()); } else { SchemaType stype = getConfiguration().getSchemaType(annotation); if (stype == null) { String typeName = getNamePool().getDisplayName(annotation); throw new XPathException("Unknown type annotation " + Err.wrap(typeName) + " in document instance"); } else { return stype.atomize(this); } } }
/** * Get the typed value. The result of this method will always be consistent with the method * {@link net.sf.saxon.om.Item#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. * * @return the typed value. If requireSingleton is set to true, the result will always be an * AtomicValue. In other cases it may be a Value representing a sequence whose items are atomic * values. * @since 8.5 */ public Value atomize() throws XPathException { int annotation = getTypeAnnotation(); if ((annotation & NodeInfo.IS_DTD_TYPE) != 0) { annotation = StandardNames.XS_UNTYPED_ATOMIC; } if (annotation == -1 || annotation == StandardNames.XS_UNTYPED_ATOMIC || annotation == StandardNames.XS_UNTYPED) { return new UntypedAtomicValue(getStringValueCS()); } else { SchemaType stype = getConfiguration().getSchemaType(annotation); if (stype == null) { String typeName = getNamePool().getDisplayName(annotation); throw new XPathException("Unknown type annotation " + Err.wrap(typeName) + " in document instance"); } else { return stype.atomize(this); } } }
return new AnyURIValue(stringValue); } else { AtomicSequence value = stype.atomize(element); if (allowTypedValueCache) { if (typedValueArray == null) {
/** * Get the typed value. The result of this method will always be consistent with the method * {@link net.sf.saxon.om.Item#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. * * @return the typed value. If requireSingleton is set to true, the result will always be an * AtomicValue. In other cases it may be a Value representing a sequence whose items are atomic * values. * @since 8.5 */ public Value atomize() throws XPathException { int annotation = getTypeAnnotation(); if ((annotation & NodeInfo.IS_DTD_TYPE) != 0) { annotation = StandardNames.XS_UNTYPED_ATOMIC; } if (annotation == -1 || annotation == StandardNames.XS_UNTYPED_ATOMIC || annotation == StandardNames.XS_UNTYPED) { return new UntypedAtomicValue(getStringValueCS()); } else { SchemaType stype = getConfiguration().getSchemaType(annotation); if (stype == null) { String typeName = getNamePool().getDisplayName(annotation); throw new XPathException("Unknown type annotation " + Err.wrap(typeName) + " in document instance"); } else { return stype.atomize(this); } } }
} else { TinyNodeImpl element = getNode(nodeNr); AtomicSequence value = stype.atomize(element); if (allowTypedValueCache) { if (typedValueArray == null) {
} else { TinyNodeImpl element = getNode(nodeNr); AtomicSequence value = stype.atomize(element); if (allowTypedValueCache) { if (typedValueArray == null) {