| org.apache.cocoon.transformation.AbstractTransformer org.apache.cocoon.transformation.AbstractSAXTransformer org.apache.cocoon.transformation.SourcePropsWritingTransformer
SourcePropsWritingTransformer | public class SourcePropsWritingTransformer extends AbstractSAXTransformer (Code) | | This transformer allows you to set and remove properties on an InspectableSource.
Input XML document example:
<page>
...
<source:patch xmlns:source="http://apache.org/cocoon/propwrite/1.0">
<source:source>webdav://localhost/webdav/step1/repo/contentA.xml</source:source>
<source:set>
<myns:author xmlns:myns="meta">me</myns:author>
</source:set>
<source:remove>
<myns:title xmlns:myns="meta"/>
</source:remove>
</source:patch>
...
</page>
author: Guido Casper version: $Id: SourcePropsWritingTransformer.java 433543 2006-08-22 06:22:54Z crossley $ |
Method Summary | |
public void | endTransformingElement(String uri, String name, String raw) Receive notification of the end of an element. | public void | recycle() | public void | setup(SourceResolver resolver, Map objectModel, String src, Parameters par) Set the SourceResolver , objectModel Map ,
the source and sitemap Parameters used to process the request. | public void | startTransformingElement(String uri, String name, String raw, Attributes attr) Receive notification of the beginning of an element.
Parameters: uri - The Namespace URI, or the empty string if the element has noNamespace URI or if Namespaceprocessing is not being performed. Parameters: name - The local name (without prefix), or the empty string ifNamespace processing is not being performed. Parameters: raw - The raw XML 1.0 name (with prefix), or the empty string ifraw names are not available. Parameters: attr - The attributes attached to the element. |
PATCH_ELEMENT | final public static String PATCH_ELEMENT(Code) | | incoming elements
|
REMOVE_ELEMENT | final public static String REMOVE_ELEMENT(Code) | | |
SOURCE_ELEMENT | final public static String SOURCE_ELEMENT(Code) | | |
SourcePropsWritingTransformer | public SourcePropsWritingTransformer()(Code) | | Constructor
Set the namespace
|
endTransformingElement | public void endTransformingElement(String uri, String name, String raw) throws SAXException, IOException, ProcessingException(Code) | | Receive notification of the end of an element.
Parameters: uri - The Namespace URI, or the empty string if the element has noNamespace URI or if Namespaceprocessing is not being performed. Parameters: name - The local name (without prefix), or the empty string ifNamespace processing is not being performed. Parameters: raw - The raw XML 1.0 name (with prefix), or the empty string ifraw names are not available. |
recycle | public void recycle()(Code) | | |
setup | public void setup(SourceResolver resolver, Map objectModel, String src, Parameters par) throws ProcessingException, SAXException, IOException(Code) | | Set the SourceResolver , objectModel Map ,
the source and sitemap Parameters used to process the request.
Parameters: resolver - Source Resolver Parameters: objectModel - Object model Parameters: src - URI of the source attribute Parameters: par - Parameters for the transformer |
startTransformingElement | public void startTransformingElement(String uri, String name, String raw, Attributes attr) throws SAXException, IOException, ProcessingException(Code) | | Receive notification of the beginning of an element.
Parameters: uri - The Namespace URI, or the empty string if the element has noNamespace URI or if Namespaceprocessing is not being performed. Parameters: name - The local name (without prefix), or the empty string ifNamespace processing is not being performed. Parameters: raw - The raw XML 1.0 name (with prefix), or the empty string ifraw names are not available. Parameters: attr - The attributes attached to the element. If there are noattributes, it shall be an empty Attributes object. |
Methods inherited from org.apache.cocoon.transformation.AbstractSAXTransformer | protected void addRecorder(XMLConsumer recorder)(Code)(Java Doc) public void characters(char[] p0, int p1, int p2) throws SAXException(Code)(Java Doc) public void comment(char ary, int start, int length) throws SAXException(Code)(Java Doc) public void configure(Configuration configuration) throws ConfigurationException(Code)(Java Doc) public void dispose()(Code)(Java Doc) public void endCDATA() throws SAXException(Code)(Java Doc) public void endDTD() throws SAXException(Code)(Java Doc) public void endDocument() throws SAXException(Code)(Java Doc) public void endElement(String uri, String name, String raw) throws SAXException(Code)(Java Doc) public void endEntity(String name) throws SAXException(Code)(Java Doc) public SourceParameters endParametersRecording(Parameters source) throws SAXException(Code)(Java Doc) public SourceParameters endParametersRecording(SourceParameters source) throws SAXException(Code)(Java Doc) public void endPrefixMapping(String prefix) throws SAXException(Code)(Java Doc) public DocumentFragment endRecording() throws SAXException(Code)(Java Doc) public XMLizable endSAXRecording() throws SAXException(Code)(Java Doc) public String endSerializedXMLRecording() throws SAXException, ProcessingException(Code)(Java Doc) public String endTextRecording() throws SAXException(Code)(Java Doc) public void endTransformingElement(String uri, String name, String raw) throws ProcessingException, IOException, SAXException(Code)(Java Doc) protected String findPrefixMapping(String uri)(Code)(Java Doc) protected AttributesImpl getMutableAttributes(Attributes a)(Code)(Java Doc) public void ignorableWhitespace(char[] p0, int p1, int p2) throws SAXException(Code)(Java Doc) public void processingInstruction(String target, String data) throws SAXException(Code)(Java Doc) public void recycle()(Code)(Java Doc) protected Object removeRecorder()(Code)(Java Doc) public void sendEndElementEvent(String localname) throws SAXException(Code)(Java Doc) public void sendEndElementEventNS(String localname) throws SAXException(Code)(Java Doc) protected void sendEndPrefixMapping() throws SAXException(Code)(Java Doc) public void sendEvents(Node node) throws SAXException(Code)(Java Doc) public void sendParametersEvents(SourceParameters pars) throws SAXException(Code)(Java Doc) public void sendStartElementEvent(String localname) throws SAXException(Code)(Java Doc) public void sendStartElementEvent(String localname, Attributes attr) throws SAXException(Code)(Java Doc) public void sendStartElementEventNS(String localname) throws SAXException(Code)(Java Doc) public void sendStartElementEventNS(String localname, Attributes attr) throws SAXException(Code)(Java Doc) protected void sendStartPrefixMapping() throws SAXException(Code)(Java Doc) public void sendTextEvent(String text) throws SAXException(Code)(Java Doc) public void service(ServiceManager manager) throws ServiceException(Code)(Java Doc) public void setDocumentLocator(Locator locator)(Code)(Java Doc) public void setup(SourceResolver resolver, Map objectModel, String src, Parameters params) throws ProcessingException, SAXException, IOException(Code)(Java Doc) public void setupTransforming() throws IOException, ProcessingException, SAXException(Code)(Java Doc) public void skippedEntity(String name) throws SAXException(Code)(Java Doc) public void startCDATA() throws SAXException(Code)(Java Doc) public void startDTD(String name, String public_id, String system_id) throws SAXException(Code)(Java Doc) public void startDocument() throws SAXException(Code)(Java Doc) public void startElement(String uri, String name, String raw, Attributes attr) throws SAXException(Code)(Java Doc) public void startEntity(String name) throws SAXException(Code)(Java Doc) public void startParametersRecording() throws SAXException(Code)(Java Doc) public void startPrefixMapping(String prefix, String uri) throws SAXException(Code)(Java Doc) public void startRecording() throws SAXException(Code)(Java Doc) public void startSAXRecording() throws SAXException(Code)(Java Doc) public void startSerializedXMLRecording(Properties format) throws SAXException(Code)(Java Doc) public void startTextRecording() throws SAXException(Code)(Java Doc) public void startTransformingElement(String uri, String name, String raw, Attributes attr) throws ProcessingException, IOException, SAXException(Code)(Java Doc)
|
|
|