## net.sf.saxon.om
Interface ValueRepresentation

All Known Subinterfaces:
  DocumentInfo, GroundedValue, Item, MutableNodeInfo, NodeInfo, SiblingCountingNode, VirtualNode

All Known Implementing Classes:
  AbsentExtensionElement, AnnotationParent, AnyURIValue, AtomicValue, Base64BinaryValue, BigIntegerValue, BooleanValue, CalendarValue, Closure, CompiledClosure, CompiledMemoClosure, DataElement, DateTimeValue, DateValue, DayTimeDurationValue, DecimalValue, DocumentImpl, DocumentWrapper, DocumentWrapper, DocumentWrapper, DocumentWrapper, DoubleValue, DurationValue, ElementImpl, EmptySequence, ExtensionInstruction, FirstClassFunction, FloatValue, GDateValue, GDayValue, GMonthDayValue, GMonthValue, GYearMonthValue, GYearValue, HexBinaryValue, IndexedValue, Int64Value, IntegerRange, IntegerValue, ItemClosure, LiteralResultElement, MemoClosure, NamespaceIterator.NamespaceNodeImpl, NodeImpl, NodeWrapper, NodeWrapper, NodeWrapper, NodeWrapper, NotationValue, NumericValue, ObjectValue, Orphan, QNameValue, QualifiedNameValue, SaxonAssign, SaxonBreak, SaxonCallTemplate, SaxonCollation, SaxonContinue, SaxonDoctype, SaxonEntityRef, SaxonFinally, SaxonImportQuery, SaxonIterate, SaxonScript, SaxonWhile, SchemaElement, SequenceExtent, ShareableSequence, SingletonClosure, SingletonNode, SQLClose, SQLColumn, SQLConnect, SQLDelete, SQLInsert, SQLQuery, SQLUpdate, StringValue, StrippedDocument, StrippedNode, StyleElement, Tail, TextFragmentValue, TimeValue, TinyDocumentImpl, TinyNodeImpl, TinyTextImpl, UnconstructedDocument, UnconstructedElement, UnconstructedParent, UnknownElement, UntypedAtomicValue, Value, VirtualCopy, VirtualDocumentCopy, VirtualUntypedCopy, WhitespaceTextImpl, XSDAlternative, XSDAnnotation, XSDAny, XSDAnyAttribute, XSDAssert, XSDAttribute, XSDAttributeGroup, XSDComplexContent, XSDComplexContentRestriction, XSDComplexType, XSDCompositor, XSDDocumentation, XSDElement, XSDExtension, XSDFacet, XSDFieldOrSelector, XSDGroup, XSDIdentityConstraint, XSDImport, XSDInclude, XSDList, XSDNotation, XSDRedefine, XSDSchema, XSDSimpleContent, XSDSimpleContentRestriction, XSDSimpleType, XSDSimpleTypeRestriction, XSDUnion, XSLAnalyzeString, XSLApplyImports, XSLApplyTemplates, XSLAttribute, XSLAttributeSet, XSLCallTemplate, XSLCharacterMap, XSLChoose, XSLComment, XSLCopy, XSLCopyOf, XSLDecimalFormat, XSLDocument, XSLElement, XSLFallback, XSLForEach, XSLForEachGroup, XSLFunction, XSLGeneralIncorporate, XSLGeneralVariable, XSLIf, XSLImport, XSLImportSchema, XSLInclude, XSLKey, XSLMatchingSubstring, XSLMessage, XSLNamespace, XSLNamespaceAlias, XSLNextMatch, XSLNumber, XSLOtherwise, XSLOutput, XSLOutputCharacter, XSLParam, XSLPerformSort, XSLPreserveSpace, XSLProcessingInstruction, XSLResultDocument, XSLSequence, XSLSort, XSLStringConstructor, XSLStylesheet, XSLTemplate, XSLText, XSLValueOf, XSLVariable, XSLVariableDeclaration, XSLWhen, XSLWithParam, YearMonthDurationValue

    public interface ValueRepresentation

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
`java.lang.String` `getStringValue()` Convert the value to a string, using the serialization rules.
`java.lang.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

    java.lang.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.

  Throws:
    `XPathException` - The method can fail if evaluation of the value has been deferred, and if a failure occurs during the deferred evaluation. No failure is possible in the case of an AtomicValue or a Node.

### getStringValueCS

    java.lang.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.

  Throws:
    `XPathException` - The method can fail if evaluation of the value has been deferred, and if a failure occurs during the deferred evaluation. No failure is possible in the case of an AtomicValue or a Node.

Copyright (c) Saxonica Limited. All rights reserved.