com.nwalsh.saxon6
Class Text

java.lang.Object
  |
  +--com.icl.saxon.tree.NodeImpl
        |
        +--com.icl.saxon.tree.ParentNodeImpl
              |
              +--com.icl.saxon.tree.ElementImpl
                    |
                    +--com.icl.saxon.tree.ElementWithAttributes
                          |
                          +--com.icl.saxon.style.StyleElement
                                |
                                +--com.nwalsh.saxon6.Text

public class Text
extends com.icl.saxon.style.StyleElement

Saxon extension element for inserting text

$Id: Text.java,v 1.2 2000/11/28 14:59:48 ndw Exp $

Copyright (C) 2000 Norman Walsh.

This class provides a Saxon extension element for inserting text into a result tree.

Change Log:

1.0

Initial release.


Constructor Summary
Text()
          Constructor for Text
 
Method Summary
 boolean isInstruction()
          Is this element an instruction?
 boolean mayContainTemplateBody()
          Can this element contain a template-body?
 void prepareAttributes()
          Validate the arguments
 void process(com.icl.saxon.Context context)
          Insert the text of the file into the result tree
 void validate()
          Validate that the element occurs in a reasonable place.
 
Methods inherited from class com.icl.saxon.style.StyleElement
bindVariable, checkEmpty, checkNotTopLevel, checkTopLevel, checkWithinTemplate, expandChildren, forwardsCompatibleModeIsEnabled, getColumnNumber, getContainingStyleSheet, getPrecedence, getPreparedStyleSheet, getStandardNames, getStyleSheetFunction, getVariableBinding, getVariableNames, getVersion, isExcludedNamespace, isExtensionNamespace, isTopLevel, makeAttributeValueTemplate, makeExpression, makePattern, preprocess, processAllAttributes, processAttributes, processChildren, reportAbsence, substituteFor, validateSubtree
 
Methods inherited from class com.icl.saxon.tree.ElementWithAttributes
addNamespaceNodes, copy, getAttribute, getAttributeList, getAttributeNode, getAttributeNodeNS, getAttributeNS, getAttributes, getAttributeValue, getAttributeValue, getAttributeValue, getLength, getNamedItem, getNamedItemNS, getPrefixForURI, getURICodeForPrefix, hasAttribute, hasAttributeNS, hasAttributes, initialise, item, makeAttributeNode, makeAttributeNodeFS, outputNamespaceNodes, removeAttribute, removeAttributeNode, removeAttributeNS, removeNamedItem, removeNamedItemNS, setAttribute, setAttributeNode, setAttributeNodeNS, setAttributeNS, setNamedItem, setNamedItemNS, setNamespaceDeclarations
 
Methods inherited from class com.icl.saxon.tree.ElementImpl
copy, getAttributeValue, getDocumentRoot, getElementsByTagName, getElementsByTagNameNS, getLineNumber, getNameCode, getNodeType, getNodeValue, getPath, getSystemId, getTagName, makeNameCode, setLineNumber, setNameCode
 
Methods inherited from class com.icl.saxon.tree.ParentNodeImpl
addChild, compact, copyStringValue, defaultAction, dropChildren, enumerateChildren, getAllChildNodes, getFirstChild, getLastChild, getNumberOfChildren, getSequenceNumber, getValue, removeChild, renumberChildren, useChildrenArray
 
Methods inherited from class com.icl.saxon.tree.NodeImpl
appendChild, cloneNode, getChildNodes, getDisplayName, getDocumentElement, getFingerprint, getIndex, getLocalName, getNamePool, getNamespaceURI, getNextInDocument, getNextSibling, getNodeName, getOwnerDocument, getParentNode, getPrefix, getPreviousInDocument, getPreviousSibling, getPublicId, getSequentialKey, getURI, getURICode, hasChildNodes, insertBefore, isa, isDocumentElement, isSameNode, isSupported, normalize, removeChild, removeNode, replaceChild, setNodeValue, setPrefix, toString
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Text

public Text()

Constructor for Text

Does nothing.

Method Detail

isInstruction

public boolean isInstruction()

Is this element an instruction?

Yes, it is.

Overrides:
isInstruction in class com.icl.saxon.style.StyleElement
Returns:
true

mayContainTemplateBody

public boolean mayContainTemplateBody()

Can this element contain a template-body?

Yes, it can, but only so that it can contain xsl:fallback.

Overrides:
mayContainTemplateBody in class com.icl.saxon.style.StyleElement
Returns:
true

prepareAttributes

public void prepareAttributes()
                       throws org.xml.sax.SAXException

Validate the arguments

The element must have an href attribute.

Overrides:
prepareAttributes in class com.icl.saxon.style.StyleElement

validate

public void validate()
              throws org.xml.sax.SAXException
Validate that the element occurs in a reasonable place.
Overrides:
validate in class com.icl.saxon.style.StyleElement

process

public void process(com.icl.saxon.Context context)
             throws org.xml.sax.SAXException

Insert the text of the file into the result tree

Processing this element inserts the contents of the URL named by the href attribute into the result tree as plain text.

Overrides:
process in class com.icl.saxon.style.StyleElement