net.sf.saxon.om
Interface ValueRepresentation<T extends Item>

All Known Subinterfaces:
DocumentInfo, FunctionItem<T>, GroundedValue<T>, Item<T>, MapItem, MutableNodeInfo, NodeInfo, SiblingCountingNode, VirtualNode
All Known Implementing Classes:
AbsentExtensionElement, AbstractFunctionItem, AbstractVirtualNode, AnnotationParent, AnyURIValue, AtomicValue, Base64BinaryValue, BigIntegerValue, BooleanValue, CalendarValue, Closure, CoercedFunction, CurriedFunction, DataElement, DateTimeValue, DateValue, DayTimeDurationValue, DecimalValue, DocumentImpl, DocumentWrapper, DocumentWrapper, DocumentWrapper, DocumentWrapper, DoubleValue, DurationValue, ElementImpl, EmptySequence, ExtensionInstruction, FirstClassFunction, FleetingDocumentNode, FleetingElementNode, FleetingNode, FloatValue, GDateValue, GDayValue, GMonthDayValue, GMonthValue, GYearMonthValue, GYearValue, HexBinaryValue, ImmutableMap, IndexedValue, Int64Value, IntegerRange, IntegerValue, LiteralResultElement, MemoClosure, NamespaceNode, NodeImpl, NodeWrapper, NodeWrapper, NodeWrapper, NodeWrapper, NotationValue, NumericValue, ObjectValue, Orphan, QNameValue, QualifiedNameValue, SaxonAssign, SaxonCallTemplate, SaxonCollation, SaxonDoctype, SaxonEntityRef, SaxonImportQuery, SaxonParam, SaxonPreprocess, SaxonWhile, SchemaElement, SequenceExtent, ShareableSequence, SingletonClosure, SingletonItem, SingletonMap, SpaceStrippedDocument, SpaceStrippedNode, SQLClose, SQLColumn, SQLConnect, SQLDelete, SQLExecute, SQLInsert, SQLQuery, SQLUpdate, StringValue, StyleElement, TextFragmentValue, TimeValue, TinyDocumentImpl, TinyElementImpl, TinyNodeImpl, TinyParentNodeImpl, TinyTextImpl, Tuple, TypeStrippedDocument, TypeStrippedNode, UnconstructedDocument, UnconstructedElement, UnconstructedParent, UnknownElement, UntypedAtomicValue, UserFunctionItem, Value, VirtualCopy, VirtualDocumentCopy, VirtualUntypedCopy, WhitespaceTextImpl, XSDAlternative, XSDAnnotation, XSDAny, XSDAnyAttribute, XSDAssert, XSDAttribute, XSDAttributeGroup, XSDComplexContent, XSDComplexContentRestriction, XSDComplexType, XSDCompositor, XSDDefaultOpenContent, XSDDocumentation, XSDElement, XSDExtension, XSDFacet, XSDFieldOrSelector, XSDGroup, XSDIdentityConstraint, XSDImport, XSDInclude, XSDList, XSDNotation, XSDOpenContent, XSDOverride, XSDRedefine, XSDSchema, XSDSimpleContent, XSDSimpleContentRestriction, XSDSimpleType, XSDSimpleTypeRestriction, XSDUnion, XSLAnalyzeString, XSLApplyImports, XSLApplyTemplates, XSLAttribute, XSLAttributeSet, XSLBreak, XSLBreakOrContinue, XSLCallTemplate, XSLCatch, XSLCharacterMap, XSLChoose, XSLComment, XSLCopy, XSLCopyOf, XSLDecimalFormat, XSLDocument, XSLElement, XSLEvaluate, XSLFallback, XSLForEach, XSLForEachGroup, XSLFork, XSLFunction, XSLGeneralIncorporate, XSLGeneralVariable, XSLIf, XSLImport, XSLImportSchema, XSLInclude, XSLIterate, XSLKey, XSLLeafNodeConstructor, XSLMatchingSubstring, XSLMerge, XSLMergeAction, XSLMergeInput, XSLMergeKey, XSLMergeSource, XSLMessage, XSLMode, XSLNamespace, XSLNamespaceAlias, XSLNextIteration, XSLNextMatch, XSLNumber, XSLOnCompletion, XSLOtherwise, XSLOutput, XSLOutputCharacter, XSLParam, XSLPerformSort, XSLPreserveSpace, XSLProcessingInstruction, XSLResultDocument, XSLSequence, XSLSort, XSLSortOrMergeKey, XSLStylesheet, XSLTemplate, XSLText, XSLTry, XSLValueOf, XSLVariable, XSLVariableDeclaration, XSLWhen, XSLWithParam, YearMonthDurationValue

public interface ValueRepresentation<T extends Item>

A ValueRepresentation is a representation of a Value. This is a marker interface used to represent the union of two classes: Value, and NodeInfo. Either of these two classes can be used to represent a value. The class is used primarily to represent the value of a variable.

This class is intended primarily for internal use, and should not be considered part of the Saxon public API.


Field Summary
static ValueRepresentation[] EMPTY_VALUE_ARRAY
          An empty array of ValueRepresentation objects
 
Method Summary
 String getStringValue()
          Convert the value to a string, using the serialization rules.
 CharSequence getStringValueCS()
          Convert the value to a string, using the serialization rules, and returning the result as a CharSequence.
 

Field Detail

EMPTY_VALUE_ARRAY

static final ValueRepresentation[] EMPTY_VALUE_ARRAY
An empty array of ValueRepresentation objects

Method Detail

getStringValue

String getStringValue()
                      throws XPathException
Convert the value to a string, using the serialization rules. For atomic values this is the same as a cast; for sequence values it gives a space-separated list. For nodes, it returns the string value of the node as defined in XDM.

Returns:
the result of converting the value to a string
Throws:
XPathException - The method can fail if evaluation of the value has been deferred, and if a failure occurs during the deferred evaluation. It can also occur for values such as function items and maps that have no string value. No failure is possible in the case of an AtomicValue or a Node.

getStringValueCS

CharSequence getStringValueCS()
                              throws XPathException
Convert the value to a string, using the serialization rules, and returning the result as a CharSequence. In some cases this may be more efficient than obtaining the result as a string. For atomic values the result is the same as a cast; for sequence values it gives a space-separated list. For nodes, it returns the string value of the node as defined in XDM.

Returns:
the result of converting the value to a string
Throws:
XPathException - The method can fail if evaluation of the value has been deferred, and if a failure occurs during the deferred evaluation. It can also occur for values such as function items and maps that have no string value. No failure is possible in the case of an AtomicValue or a Node.


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