com.primix.tapestry.parse
Class SpecificationParser

java.lang.Object
  |
  +--com.primix.tapestry.util.xml.AbstractDocumentParser
        |
        +--com.primix.tapestry.parse.SpecificationParser
All Implemented Interfaces:
EntityResolver, ErrorHandler

public class SpecificationParser
extends AbstractDocumentParser

Used to parse an application or component specification into a ApplicationSpecification or ComponentSpecification. This is all somewhat temporary; parsing will be revised to use Adelard (Java XML Binding) once it is available.

This class supports the 1.1 DTD (introduced in release 1.0.1) as well as the "old" 1.0 DTD.
Version PUBLIC ID SYSTEM ID Description
1.0 -//Primix Solutions//Tapestry Specification 1.0//EN http://tapestry.sourceforge.net/dtd/Tapestry_1_0.dtd Original, overly verbose version.
1.1 -//Howard Ship//Tapestry Specification 1.1//EN http://tapestry.sf.net/dtd/Tapestry_1_1.dtd Streamlined version of 1.0 (makes use of XML attributes instead of nested elements), also:
  • Adds <description> element
  • Adds copy-of attribute to <component>

Version:
$Id: SpecificationParser.java,v 1.18 2001/08/26 15:30:14 hship Exp $
Author:
Howard Ship

Field Summary
static java.lang.String TAPESTRY_DTD_1_0_PUBLIC_ID
           
static java.lang.String TAPESTRY_DTD_1_1_PUBLIC_ID
           
 
Constructor Summary
SpecificationParser()
           
 
Method Summary
 ApplicationSpecification parseApplicationSpecification(java.io.InputStream input, java.lang.String resourcePath)
          Parses an input stream containing an application specification and assembles a ApplicationSpecification from it.
 ComponentSpecification parseComponentSpecification(java.io.InputStream input, java.lang.String resourcePath)
          Parses an input stream containing a component specification and assembles a ComponentSpecification from it.
 
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
 

Field Detail

TAPESTRY_DTD_1_0_PUBLIC_ID

public static final java.lang.String TAPESTRY_DTD_1_0_PUBLIC_ID

TAPESTRY_DTD_1_1_PUBLIC_ID

public static final java.lang.String TAPESTRY_DTD_1_1_PUBLIC_ID
Constructor Detail

SpecificationParser

public SpecificationParser()
Method Detail

parseComponentSpecification

public ComponentSpecification parseComponentSpecification(java.io.InputStream input,
                                                          java.lang.String resourcePath)
                                                   throws DocumentParseException
Parses an input stream containing a component specification and assembles a ComponentSpecification from it.
Throws:
DocumentParseException - if the input stream cannot be fully parsed or contains invalid data.

parseApplicationSpecification

public ApplicationSpecification parseApplicationSpecification(java.io.InputStream input,
                                                              java.lang.String resourcePath)
                                                       throws DocumentParseException
Parses an input stream containing an application specification and assembles a ApplicationSpecification from it.
Throws:
DocumentParseException - if the input stream cannot be fully parsed or contains invalid data.