com.nwalsh.saxon

Class Text


public class Text
extends StyleElement

Saxon extension element for inserting text

$Id: Text.java 5907 2006-04-27 08:26:47Z xmldoc $

Copyright (C) 2000 Norman Walsh.

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

Change Log:

Constructor Summary

Text()
Constructor for Text

Does nothing.

Method Summary

boolean
isInstruction()
Is this element an instruction?

Yes, it is.

boolean
mayContainTemplateBody()
Can this element contain a template-body?

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

void
prepareAttributes()
Validate the arguments

The element must have an href attribute.

void
process(Context context)
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.

void
validate()
Validate that the element occurs in a reasonable place.

Constructor Details

Text

public Text()
Constructor for Text

Does nothing.

Method Details

isInstruction

public boolean isInstruction()
Is this element an instruction?

Yes, it is.

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.

Returns:
true

prepareAttributes

public void prepareAttributes()
            throws TransformerConfigurationException
Validate the arguments

The element must have an href attribute.


process

public void process(Context context)
            throws TransformerException
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.

Optional encoding attribute can specify encoding of resource. If not specified default system encoding is used.


validate

public void validate()
            throws TransformerConfigurationException
Validate that the element occurs in a reasonable place.