com.primix.tapestry.script
Class ScriptParser
java.lang.Object
|
+--com.primix.tapestry.util.xml.AbstractDocumentParser
|
+--com.primix.tapestry.script.ScriptParser
- All Implemented Interfaces:
- EntityResolver, ErrorHandler
- public class ScriptParser
- extends AbstractDocumentParser
Parses a Tapestry Script, an XML file defined by the public identifier
-//Primix Solutions//Tapestry Script 1.0//EN
or
-//Howard Ship//Tapestry Script 1.1//EN
.
The new DTD, version 1.1, is largely backwards compatible to the
old script, but adds a number of new features (if, if-not, foreach
and the use of property paths with insert).
A Tapestry Script is used, in association with the
Body
and/or Script
components,
to generate JavaScript for use with a Tapestry component. Two seperate pieces
of JavaScript can be generated. The body section (associated with the body
element of the XML document) is typically used to define JavaScript functions
(most often, event handlers). The initialization section
(associated with the initialization
element of the XML document)
is used to add JavaScript that will be evaluated when the page finishes loading
(i.e., from the HTML <body> element's onLoad event handler).
- Version:
- $Id: ScriptParser.java,v 1.11 2001/09/04 01:27:48 hship Exp $
- Author:
- Howard Ship
Method Summary |
IScript |
parse(java.io.InputStream stream,
java.lang.String resourcePath)
Parses the given input stream to produce a parsed script,
ready to execute. |
Methods inherited from class com.primix.tapestry.util.xml.AbstractDocumentParser |
constructBuilder, error, fatalError, getAttribute, getId, getNodePath, getRequireValidatingParser, getResourcePath, getValue, isElement, parse, register, resolveEntity, setResourcePath, warning |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SCRIPT_DTD_1_0_PUBLIC_ID
public static final java.lang.String SCRIPT_DTD_1_0_PUBLIC_ID
SCRIPT_DTD_1_1_PUBLIC_ID
public static final java.lang.String SCRIPT_DTD_1_1_PUBLIC_ID
ScriptParser
public ScriptParser()
parse
public IScript parse(java.io.InputStream stream,
java.lang.String resourcePath)
throws DocumentParseException
- Parses the given input stream to produce a parsed script,
ready to execute.