org.apache.cocoon.processor.xinclude
Class XIncludeProcessor
java.lang.Object
|
+--org.apache.cocoon.framework.AbstractActor
|
+--org.apache.cocoon.processor.xinclude.XIncludeProcessor
- All Implemented Interfaces:
- Actor, Cacheable, Changeable, Processor, Status
- public class XIncludeProcessor
- extends AbstractActor
- implements Processor, Status, Cacheable
Second version of a DOM2 XInclude parser for cocoon. This revision
should support the bulk of the 2000-07-17 version of the XInclude working
draft. Notably excluded is inclusion loop checking
(section 3.2.1). Note
also that included namespaces may not be handled properly
(section 3.2.2) -
I'd love feedback on this. Namespaces are simple - but the DOM2 (and SAX2)
methods for interacting with them aren't. Finally, note that the order of
include element processing as noted in
section 3.1 is not
correct - internal xpointer links are not necessarily resolved against
the original source document. I haven't figured out a good way to resolve
that without cloning the entire source document first, which would be
a terrible wasteful of memory.
- Version:
- CVS $Revision: 1.20 $ $Date: 2001/01/23 01:23:50 $ $Author: balld $
- Author:
- Donald Ball
Method Summary |
java.lang.String |
getStatus()
Returns information about the status of the implementing class. |
boolean |
hasChanged(java.lang.Object object)
Returns false if the requested resource hasn't changed, true
otherwise. |
void |
init(Director director)
Initialize the actor by indicating their director. |
boolean |
isCacheable(javax.servlet.http.HttpServletRequest request)
Returns whether this request is suitable for cacheing. |
org.w3c.dom.Document |
process(org.w3c.dom.Document document,
java.util.Dictionary parameters)
Process the DOM tree. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
debug
protected boolean debug
XMLBASE_NAMESPACE_URI
public static final java.lang.String XMLBASE_NAMESPACE_URI
XMLBASE_ATTRIBUTE
public static final java.lang.String XMLBASE_ATTRIBUTE
XINCLUDE_NAMESPACE_TAG
public static final java.lang.String XINCLUDE_NAMESPACE_TAG
XINCLUDE_TAG
public static final java.lang.String XINCLUDE_TAG
XINCLUDE_NAMESPACE_URI
public static final java.lang.String XINCLUDE_NAMESPACE_URI
XINCLUDE_HREF_ATTRIBUTE
public static final java.lang.String XINCLUDE_HREF_ATTRIBUTE
XINCLUDE_PARSE_ATTRIBUTE
public static final java.lang.String XINCLUDE_PARSE_ATTRIBUTE
BUFFER_SIZE
public static final int BUFFER_SIZE
parser
protected Parser parser
logger
protected Logger logger
context
protected java.lang.Object context
monitor
protected Monitor monitor
monitored_table
protected java.util.Hashtable monitored_table
XIncludeProcessor
public XIncludeProcessor()
init
public void init(Director director)
- Description copied from interface:
Actor
- Initialize the actor by indicating their director.
- Specified by:
init
in interface Actor
- Overrides:
init
in class AbstractActor
process
public org.w3c.dom.Document process(org.w3c.dom.Document document,
java.util.Dictionary parameters)
throws java.lang.Exception
- Description copied from interface:
Processor
- Process the DOM tree. The returned tree is allowed to be either a copy
or the modified input tree.
- Specified by:
process
in interface Processor
getStatus
public java.lang.String getStatus()
- Description copied from interface:
Status
- Returns information about the status of the implementing class.
Note: this is use instead of the usual
toString()
method because some of these methods are declared final in some
classes in JDK 1.1.
- Specified by:
getStatus
in interface Status
hasChanged
public boolean hasChanged(java.lang.Object object)
- Description copied from interface:
Changeable
- Returns false if the requested resource hasn't changed, true
otherwise. This method is called by the cache system to
ensure the validity of the cached response. It is the
producer responsibility to provide the fastest possible
implementation of this method or, whether this is not
possible and the costs of the change evaluation is
comparable to the production costs, to return
true directly with no further delay, thus reducing
the evaluation overhead to a minimum.
This method is guaranteed to be called after at least
a single call to any production methods getStream or getDocument.
The context is the trigger of the changeable point and may
differ between implementations.
- Specified by:
hasChanged
in interface Changeable
isCacheable
public boolean isCacheable(javax.servlet.http.HttpServletRequest request)
- Description copied from interface:
Cacheable
- Returns whether this request is suitable for cacheing.
- Specified by:
isCacheable
in interface Cacheable
Copyright © 1999-2001 Apache Software Foundation. All Rights Reserved.