|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jclark.xsl.tr.SheetImpl
class SheetImpl
Actually does the work of compiling the stylesheet's object model into the template rules, actions, variable definitions, etc. The constructor compiles the stylesheet, the method "process()" runs the transformation
Field Summary | |
---|---|
(package private) XMLProcessor |
_omBuilder
|
(package private) com.jclark.xsl.tr.SheetImpl.OutputMethodImpl |
_outputMethod
|
(package private) com.jclark.xsl.tr.SheetImpl.OutputMethodImpl |
_runtimeOutputMethod
|
(package private) Name |
ATTRIBUTE
|
(package private) Name |
CASE_ORDER
|
(package private) Name |
CDATA_SECTION_ELEMENTS
|
(package private) static NodeSetExpr |
childrenExpr
|
(package private) Name |
COUNT
|
(package private) Importance |
currentImportance
|
(package private) VariableSet |
currentLocalVariables
|
(package private) Name |
DATA_TYPE
|
(package private) Name |
DEFAULT
|
(package private) Name |
DISABLE_OUTPUT_ESCAPING
|
(package private) Name |
DOCTYPE_PUBLIC
|
(package private) Name |
DOCTYPE_SYSTEM
|
(package private) Name |
ELEMENTS
|
(package private) static StringVariant |
emptyStringVariant
|
(package private) Name |
ENCODING
|
(package private) Name |
EXCLUDE_RESULT_PREFIXES
|
(package private) java.util.Vector |
excludedNamespaces
|
(package private) ExtensionHandler |
extensionHandler
|
(package private) Name |
FORMAT
|
(package private) Name |
FROM
|
(package private) Name |
GROUPING_SEPARATOR
|
(package private) Name |
GROUPING_SIZE
|
(package private) Name |
HREF
|
(package private) int |
importCount
|
(package private) Name |
INDENT
|
(package private) Name |
LANG
|
(package private) Name |
LETTER_VALUE
|
(package private) Name |
LEVEL
|
(package private) Name |
MATCH
|
(package private) Name |
MEDIA_TYPE
|
(package private) Name |
METHOD
|
(package private) Name |
MODE
|
(package private) Name |
NAME
|
(package private) Name |
NAMESPACE
|
(package private) NameTable |
nameTable
|
(package private) int |
nCurrentLocalVariables
|
(package private) Name |
OMIT_XML_DECLARATION
|
(package private) Name |
ORDER
|
(package private) Name |
PRIORITY
|
(package private) Name |
RESULT_PREFIX
|
(package private) Name |
SELECT
|
(package private) LoadContext |
sheetLoadContext
|
(package private) Name |
STANDALONE
|
(package private) Name |
STYLESHEET_PREFIX
|
(package private) Name |
TERMINATE
|
(package private) Name |
TEST
|
(package private) Name |
USE
|
(package private) Name |
USE_ATTRIBUTE_SETS
|
(package private) Name |
VALUE
|
(package private) Name |
VERSION
|
(package private) Name |
XSL_ATTRIBUTE
|
(package private) Name |
XSL_FALLBACK
|
(package private) Name |
XSL_FOR_EACH
|
(package private) Name |
XSL_OTHERWISE
|
(package private) Name |
XSL_SORT
|
(package private) Name |
XSL_STYLESHEET
|
(package private) Name |
XSL_TRANSFORM
|
(package private) Name |
XSL_USE_ATTRIBUTE_SETS
|
(package private) Name |
XSL_VENDOR
|
(package private) Name |
XSL_VENDOR_URL
|
(package private) Name |
XSL_VERSION
|
(package private) Name |
XSL_WHEN
|
(package private) Name |
XSL_WITH_PARAM
|
Fields inherited from interface com.jclark.xsl.om.NamespaceConstants |
---|
EXSL_COMMON_NAMESPACE, EXSL_DATE_NAMESPACE, EXSL_DYNAMIC_NAMESPACE, EXSL_FUNCTIONS_NAMESPACE, EXSL_MATH_NAMESPACE, EXSL_REGEXP_NAMESPACE, EXSL_SETS_NAMESPACE, EXSL_STRINGS_NAMESPACE, XFYXT_NAMESPACE, XSL_NAMESPACE, XT_NAMESPACE |
Constructor Summary | |
---|---|
SheetImpl(Node node,
XMLProcessor omBuilder,
ExtensionHandler extensionHandler,
LoadContext sheetLoadContext,
NameTable nameTable)
The constructor builds (compiles) a stylesheet |
Method Summary | |
---|---|
(package private) Action |
addParams(ParamAction action,
Node node)
|
void |
clearOutputMethodProperties()
resets the output method to just those properties which were set in the stylesheet and/or defaults |
ExtensionContext |
createExtensionContext(java.lang.String namespace)
|
(package private) static Name |
expandSourceElementTypeName(java.lang.String nameString,
Node node)
|
Action |
getAttributeSet(Name name)
top level attribute set definition |
(package private) java.lang.String |
getData(Node node)
|
ActionDebugTarget |
getDebugger()
gets the xrap processor for use during processing |
VariableInfo |
getGlobalVariableInfo(Name name)
|
boolean |
getIncludeComments()
include comment nodes? |
boolean |
getIncludeProcessingInstructions()
include processing instructions? |
KeyDefinition |
getKeyDefinition(Name keyName)
obtain the definition of the named key |
TemplateRuleSet |
getModeTemplateRuleSet(Name modeName)
obtain the collection of templates which may be applied in a named Mode |
java.lang.String |
getNamespaceAlias(java.lang.String ns)
|
(package private) NumberListFormatTemplate |
getNumberListFormatTemplate(Node node)
|
(package private) java.lang.String |
getOptionalAttribute(Node node,
Name name,
java.lang.String dflt)
|
OutputMethod |
getOutputMethod()
returns the current values set either by client code, the stylesheet, or defaulted for the output method properties |
java.util.Properties |
getOutputMethodProperties()
returns the current values set either by client code, the stylesheet, or defaulted for the output method properties see java.xml.transform.Transform.getOutputMethodProperties() |
java.lang.String |
getOutputMethodProperty(java.lang.String encodedPropertyNamespace,
java.lang.String encodedPropertyName)
returns the current value of the named property |
(package private) java.lang.String |
getPrefixNamespace(Node node,
java.lang.String prefix)
|
(package private) java.lang.String |
getRequiredAttribute(Node node,
Name name)
|
SaxFilterMaker |
getSaxExtensionFilter()
gets the xrap processor for use during processing |
(package private) NodeSetExpr |
getSortNodeSetExpr(Node node,
NodeSetExpr expr)
|
LoadContext |
getSourceLoadContext()
get the parameters controlling how a source tree object model is build |
boolean |
getStripSource(Name elementTypeName)
white space handling |
Variant |
getSystemProperty(Name name)
return the value of the named system property |
(package private) VariantExpr |
getVariantExpr(Node defNode)
gets the value (an expression to be evaluated later) to be bound for a variable or parameter |
boolean |
haveNamespaceAliases()
|
(package private) Action |
parseActions(Node node,
Action ifEmpty)
|
(package private) Action |
parseActions(Node node,
Action ifEmpty,
AppendAction sequence)
|
(package private) Action |
parseAttributesAndActions(Node node)
Parse the attributes on node as literal attributes and then parse the actions. |
(package private) void |
parseTopLevel(Node sheetNode)
come here if we have a "xsl:stylesheet" root element expect XSLT elements permitted at the top level ... |
(package private) AppendAction |
parseUseAttributeSets(Node node,
boolean literal,
AppendAction sequence)
|
(package private) Action |
parseUseAttributeSetsAndActions(Node node)
|
Result |
process(Node node,
XMLProcessor omBuilder,
ParameterSet params,
Result root)
process an XML input document against this stylesheet |
void |
setDebugger(ActionDebugTarget debugger)
sets the xrap processor for use during processing |
void |
setOutputMethodProperty(java.lang.String encodedPropertyNamespace,
java.lang.String encodedPropertyName,
java.lang.String value)
override the stylesheet's or default value for an output method property |
void |
setSaxExtensionFilter(SaxFilterMaker xrap)
sets the xrap processor for use during processing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
Importance currentImportance
int importCount
static NodeSetExpr childrenExpr
VariableSet currentLocalVariables
int nCurrentLocalVariables
java.util.Vector excludedNamespaces
XMLProcessor _omBuilder
static StringVariant emptyStringVariant
Name XSL_WHEN
Name XSL_OTHERWISE
Name XSL_STYLESHEET
Name XSL_TRANSFORM
Name XSL_WITH_PARAM
Name XSL_SORT
Name XSL_FOR_EACH
Name XSL_FALLBACK
Name XSL_VERSION
Name XSL_VENDOR
Name XSL_VENDOR_URL
Name XSL_USE_ATTRIBUTE_SETS
Name XSL_ATTRIBUTE
Name ATTRIBUTE
Name CASE_ORDER
Name CDATA_SECTION_ELEMENTS
Name COUNT
Name DATA_TYPE
Name DEFAULT
Name DISABLE_OUTPUT_ESCAPING
Name DOCTYPE_PUBLIC
Name DOCTYPE_SYSTEM
Name ELEMENTS
Name ENCODING
Name EXCLUDE_RESULT_PREFIXES
Name FORMAT
Name FROM
Name GROUPING_SEPARATOR
Name GROUPING_SIZE
Name HREF
Name INDENT
Name LANG
Name LETTER_VALUE
Name LEVEL
Name MATCH
Name MEDIA_TYPE
Name METHOD
Name MODE
Name NAME
Name NAMESPACE
Name OMIT_XML_DECLARATION
Name ORDER
Name PRIORITY
Name RESULT_PREFIX
Name SELECT
Name STANDALONE
Name STYLESHEET_PREFIX
Name TERMINATE
Name TEST
Name USE
Name USE_ATTRIBUTE_SETS
Name VALUE
Name VERSION
com.jclark.xsl.tr.SheetImpl.OutputMethodImpl _outputMethod
com.jclark.xsl.tr.SheetImpl.OutputMethodImpl _runtimeOutputMethod
LoadContext sheetLoadContext
NameTable nameTable
ExtensionHandler extensionHandler
Constructor Detail |
---|
SheetImpl(Node node, XMLProcessor omBuilder, ExtensionHandler extensionHandler, LoadContext sheetLoadContext, NameTable nameTable) throws java.io.IOException, XSLException
node
- the (xslt D) OM root Node of the loaded stylesheetomBuilder
- a (xslt D) OM builder we can use for
included/imported sheetsextensionHandler
- for extensions?sheetLoadContext
- ??nameTable
- ??
java.io.IOException
XSLException
Method Detail |
---|
public void setSaxExtensionFilter(SaxFilterMaker xrap)
setSaxExtensionFilter
in interface Sheet
public SaxFilterMaker getSaxExtensionFilter()
getSaxExtensionFilter
in interface Sheet
public void setDebugger(ActionDebugTarget debugger)
setDebugger
in interface Sheet
public ActionDebugTarget getDebugger()
getDebugger
in interface LoadContext
getDebugger
in interface Sheet
public OutputMethod getOutputMethod()
getOutputMethod
in interface Sheet
public java.util.Properties getOutputMethodProperties()
getOutputMethodProperties
in interface Sheet
public void clearOutputMethodProperties()
clearOutputMethodProperties
in interface Sheet
public void setOutputMethodProperty(java.lang.String encodedPropertyNamespace, java.lang.String encodedPropertyName, java.lang.String value) throws XSLException
setOutputMethodProperty
in interface Sheet
XSLException
public java.lang.String getOutputMethodProperty(java.lang.String encodedPropertyNamespace, java.lang.String encodedPropertyName)
getOutputMethodProperty
in interface Sheet
public Result process(Node node, XMLProcessor omBuilder, ParameterSet params, Result root) throws XSLException
process
in interface Sheet
node
- the source documentomBuilder
- an object model builder we can (re-)use for e.g. "document()"params
- the XSLT run-time parametersroot
- the destination for thetransformation results
XSLException
java.lang.String getPrefixNamespace(Node node, java.lang.String prefix) throws XSLException
XSLException
void parseTopLevel(Node sheetNode) throws XSLException, java.io.IOException
XSLException
java.io.IOException
Action parseAttributesAndActions(Node node) throws XSLException
XSLException
Action parseUseAttributeSetsAndActions(Node node) throws XSLException
XSLException
AppendAction parseUseAttributeSets(Node node, boolean literal, AppendAction sequence) throws XSLException
XSLException
Action parseActions(Node node, Action ifEmpty) throws XSLException
XSLException
Action parseActions(Node node, Action ifEmpty, AppendAction sequence) throws XSLException
XSLException
java.lang.String getRequiredAttribute(Node node, Name name) throws XSLException
XSLException
java.lang.String getOptionalAttribute(Node node, Name name, java.lang.String dflt)
java.lang.String getData(Node node) throws XSLException
XSLException
NumberListFormatTemplate getNumberListFormatTemplate(Node node) throws XSLException
XSLException
Action addParams(ParamAction action, Node node) throws XSLException
XSLException
NodeSetExpr getSortNodeSetExpr(Node node, NodeSetExpr expr) throws XSLException
XSLException
VariantExpr getVariantExpr(Node defNode) throws XSLException
XSLException
public TemplateRuleSet getModeTemplateRuleSet(Name modeName)
getModeTemplateRuleSet
in interface SheetDetails
public KeyDefinition getKeyDefinition(Name keyName)
getKeyDefinition
in interface SheetDetails
static Name expandSourceElementTypeName(java.lang.String nameString, Node node) throws XSLException
XSLException
public LoadContext getSourceLoadContext()
Sheet
getSourceLoadContext
in interface Sheet
public boolean getStripSource(Name elementTypeName)
LoadContext
getStripSource
in interface LoadContext
public boolean getIncludeComments()
LoadContext
getIncludeComments
in interface LoadContext
public boolean getIncludeProcessingInstructions()
LoadContext
getIncludeProcessingInstructions
in interface LoadContext
public VariableInfo getGlobalVariableInfo(Name name)
getGlobalVariableInfo
in interface SheetDetails
public Variant getSystemProperty(Name name)
SheetDetails
getSystemProperty
in interface SheetDetails
public ExtensionContext createExtensionContext(java.lang.String namespace) throws XSLException
createExtensionContext
in interface SheetDetails
XSLException
public Action getAttributeSet(Name name)
SheetDetails
getAttributeSet
in interface SheetDetails
public boolean haveNamespaceAliases()
haveNamespaceAliases
in interface SheetDetails
public java.lang.String getNamespaceAlias(java.lang.String ns)
getNamespaceAlias
in interface SheetDetails
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |