You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by cz...@apache.org on 2002/09/25 14:03:08 UTC
cvs commit: xml-cocoon2/src/java/org/apache/cocoon/webapps/session/transformation SessionPreTransformer.java
cziegeler 2002/09/25 05:03:08
Modified: src/java/org/apache/cocoon/webapps/session/transformation
SessionPreTransformer.java
Log:
Deleting obsolete stuff
Revision Changes Path
1.3 +1 -100 xml-cocoon2/src/java/org/apache/cocoon/webapps/session/transformation/SessionPreTransformer.java
Index: SessionPreTransformer.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/webapps/session/transformation/SessionPreTransformer.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SessionPreTransformer.java 19 Apr 2002 11:02:59 -0000 1.2
+++ SessionPreTransformer.java 25 Sep 2002 12:03:08 -0000 1.3
@@ -98,24 +98,6 @@
*/
public static final String CONTEXT_URL_ELEMENT = "contexturl";
- /** The link element */
- public static final String LINK_ELEMENT = "link";
-
- /** The name attribute of the link element. */
- public static final String LINK_NAME_ATTRIBUTE = "name";
-
- /** The name attribute of the link element. */
- public static final String LINK_TARGET_ATTRIBUTE = "target";
-
- /** The name attribute of the link element. */
- public static final String LINK_MEDIUM_ATTRIBUTE = "medium";
-
- /** The default link pipeline */
- protected static String linkResource;
-
- /** The current link pipeline */
- protected Resource currentLinkResource;
-
/** Are we inside a getxml? */
protected int processingGetXML;
@@ -124,18 +106,6 @@
}
/**
- * Configure
- */
- public void configure(Configuration conf)
- throws ConfigurationException {
- super.configure(conf);
- Configuration lnkResConf = conf.getChild("link-resource", false);
- if (lnkResConf != null) {
- linkResource = lnkResConf.getAttribute("uri");
- }
- }
-
- /**
* Setup the next round.
* The instance variables are initialised.
* @param resolver The current SourceResolver
@@ -152,13 +122,6 @@
IOException {
super.setup(resolver, objectModel, src, par);
this.processingGetXML = 0;
- final String uri = par.getParameter("link-resource-uri", this.linkResource);
- if ( uri != null ) {
- this.currentLinkResource = new Resource(resolver,
- par.getParameter("link-resource-uri", this.linkResource));
- } else {
- this.currentLinkResource = null;
- }
}
/**
@@ -248,23 +211,6 @@
} else if (name.equals(SessionPreTransformer.CONTEXT_URL_ELEMENT) == true) {
this.ignoreEventsCount++;
- // Element link
- } else if (name.equals(LINK_ELEMENT) == true) {
- String linkName = attr.getValue(LINK_NAME_ATTRIBUTE);
- String target = attr.getValue(LINK_TARGET_ATTRIBUTE);
- String medium = attr.getValue(LINK_MEDIUM_ATTRIBUTE);
- this.stack.push(linkName);
- this.stack.push("LINK");
- if (target != null) {
- this.stack.push(target);
- this.stack.push("TARGET");
- }
- if (medium != null) {
- this.stack.push(medium);
- this.stack.push("MEDIUM");
- }
- this.startSerializedXMLRecording(XMLUtils.defaultSerializeToXMLFormat(true));
-
// DEFAULT
} else {
super.startTransformingElement(uri, name, raw, attr);
@@ -312,51 +258,6 @@
this.request.getContextPath();
this.sendTextEvent(contextUrl);
- // Element link
- } else if (name.equals(LINK_ELEMENT) == true) {
- String linkName = null;
- String target = null;
- String medium = null;
- String text = this.endSerializedXMLRecording();
- String element;
- do {
- element = (String)this.stack.pop();
- if (element.equals("LINK") == true) {
- linkName = (String)this.stack.pop();
- } else if (element.equals("TARGET") == true) {
- target = (String)this.stack.pop();
- } else if (element.equals("MEDIUM") == true) {
- medium = (String)this.stack.pop();
- }
- } while (element.equals("LINK") == false);
-
- if (this.currentLinkResource != null) {
- SourceParameters pars = new SourceParameters();
- pars.setParameter("name", linkName);
- if (target != null) {
- pars.setParameter("target", target);
- }
- if (medium != null) {
- pars.setParameter("medium", medium);
- }
- pars.setParameter("text", text);
- this.getResourceConnector().streamXML(this.currentLinkResource.getResourceType(),
- null,
- this.currentLinkResource.getResourceIdentifier(),
- pars,
- this.contentHandler,
- this.lexicalHandler);
- } else {
- // medium is ignored here
- AttributesImpl attrImp = new AttributesImpl();
- attrImp.addAttribute("", "href", "href", "CDATA", this.response.encodeURL(name));
- if (target != null) {
- attrImp.addAttribute("", "target", "target", "CDATA", target);
- }
- this.sendStartElementEvent("a", attrImp);
- this.sendTextEvent(text);
- this.sendEndElementEvent("a");
- }
// DEFAULT
} else {
----------------------------------------------------------------------
In case of troubles, e-mail: webmaster@xml.apache.org
To unsubscribe, e-mail: cocoon-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-cvs-help@xml.apache.org