Class Actor

  • All Implemented Interfaces:
    javax.xml.transform.SourceLocator, ExpressionOwner, Location, org.xml.sax.Locator
    Direct Known Subclasses:
    Accumulator, AttributeSet, GlobalVariable, KeyDefinition, Mode, NamedTemplate, UserFunction

    public abstract class Actor
    extends java.lang.Object
    implements ExpressionOwner, Location
    This object represents the compiled form of a user-written function, template, attribute-set, etc (the source can be either an XSLT stylesheet function or an XQuery function).

    It is assumed that type-checking, of both the arguments and the results, has been handled at compile time. That is, the expression supplied as the body of the function must be wrapped in code to check or convert the result to the required type, and calls on the function must be wrapped at compile time to check or convert the supplied arguments.

    • Constructor Detail

      • Actor

        public Actor()
    • Method Detail

      • getSymbolicName

        public abstract SymbolicName getSymbolicName()
        Get the symbolic name of the component
        the symbolic name
      • getComponentName

        public StructuredQName getComponentName()
        Get the name of the component as a QName
        the component's name
      • getTracingTag

        public java.lang.String getTracingTag()
        Get a string used to identify this kind of component when used in tracing output
        a diagnostic string used to identify the component when tracing
      • setPackageData

        public void setPackageData​(PackageData packageData)
        Set basic data about the unit of compilation (XQuery module, XSLT package) to which this procedure belongs
        packageData - information about the containing package
      • getPackageData

        public PackageData getPackageData()
        Get basic data about the unit of compilation (XQuery module, XSLT package) to which this container belongs
        the package information
      • obtainDeclaringComponent

        public Component obtainDeclaringComponent​(StyleElement declaration)
        Return the declaring component, creating it if it does not already exist.
        declaration - The source element in the stylesheet corresponding to the component
        the component corresponding to this declaration.
      • getDeclaringComponent

        public Component getDeclaringComponent()
      • setDeclaringComponent

        public void setDeclaringComponent​(Component comp)
      • allocateAllBindingSlots

        public void allocateAllBindingSlots​(StylesheetPackage pack)
        Allocate slot numbers to all the external component references in this component
        pack - the containing package
      • setBody

        public void setBody​(Expression body)
      • setStackFrameMap

        public void setStackFrameMap​(SlotManager map)
      • getStackFrameMap

        public SlotManager getStackFrameMap()
      • setLineNumber

        public void setLineNumber​(int lineNumber)
      • setColumnNumber

        public void setColumnNumber​(int col)
      • setSystemId

        public void setSystemId​(java.lang.String systemId)
      • getLocation

        public Location getLocation()
      • getLineNumber

        public int getLineNumber()
        Description copied from interface: Location
        Get the line number. This line number is relative to the external entity identified by the system identifier. Line numbers start at 1. The value may be an approximation; SAX parsers only provide line number information at the level of element nodes.
        Specified by:
        getLineNumber in interface Location
        Specified by:
        getLineNumber in interface org.xml.sax.Locator
        Specified by:
        getLineNumber in interface javax.xml.transform.SourceLocator
        the line number, or -1 if the information is not available.
      • getSystemId

        public java.lang.String getSystemId()
        Description copied from interface: Location
        Get the system ID. This should be the system identifier of an XML external entity; if a stylesheet module comprises multiple external entities, the distinction should be retained. This means, for example, that an instruction in a stylesheet can have a different system identifier from its parent instruction. However, SAX parsers only provide location information at the element level, so when part of an XPath expression is in a different external entity from other parts of the same expression, this distinction is lost.

        The system identifier of a node is in general not the same as its base URI. The base URI is affected by xml:base attributes; the system identifier is not.

        Specified by:
        getSystemId in interface Location
        Specified by:
        getSystemId in interface org.xml.sax.Locator
        Specified by:
        getSystemId in interface javax.xml.transform.SourceLocator
        the system ID, or null if the information is not available.
      • getColumnNumber

        public int getColumnNumber()
        Description copied from interface: Location
        Get the column number. This column number is relative to the line identified by the line number. Column numbers start at 1.
        Specified by:
        getColumnNumber in interface Location
        Specified by:
        getColumnNumber in interface org.xml.sax.Locator
        Specified by:
        getColumnNumber in interface javax.xml.transform.SourceLocator
        the column number, or -1 if the information is not available.
      • getPublicId

        public java.lang.String getPublicId()
        Description copied from interface: Location
        Get the Public ID
        Specified by:
        getPublicId in interface Location
        Specified by:
        getPublicId in interface org.xml.sax.Locator
        Specified by:
        getPublicId in interface javax.xml.transform.SourceLocator
        usually null
      • saveLocation

        public Location saveLocation()
        Description copied from interface: Location
        Get an immutable copy of this Location object. By default Location objects may be mutable, so they should not be saved for later use. The result of this operation holds the same location information, but in an immutable form.
        Specified by:
        saveLocation in interface Location
        an immutable copy (which may be the original object, if it is already immutable)
      • getProperty

        public java.lang.Object getProperty​(java.lang.String name)
      • setDeclaredVisibility

        public void setDeclaredVisibility​(Visibility visibility)
        Set the visibility of the component as defined using its actual @visibility attribute
        visibility - the actual declared visibility; null if the visibility attribute is absent
      • getDeclaredVisibility

        public Visibility getDeclaredVisibility()
        Get the visibility of the component as defined using its actual @visibility attribute
        the actual declared visibility; null if the visibility attribute is absent
      • export

        public abstract void export​(ExpressionPresenter presenter)
                             throws XPathException
        Export expression structure. The abstract expression tree is written to the supplied outputstream.
        presenter - the expression presenter used to generate the XML representation of the structure
        XPathException - if things go wrong, for example an I/O failure
      • isExportable

        public boolean isExportable()