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/11/11 15:21:04 UTC
cvs commit: xml-cocoon2/src/java/org/apache/cocoon/transformation TraxTransformer.java
cziegeler 2002/11/11 06:21:04
Modified: src/java/org/apache/cocoon/transformation Tag:
cocoon_2_0_3_branch TraxTransformer.java
Log:
Readding use-deli configuration to trax transformer - discussed this with Mark.
Revision Changes Path
No revision
No revision
1.21.2.5 +15 -4 xml-cocoon2/src/java/org/apache/cocoon/transformation/TraxTransformer.java
Index: TraxTransformer.java
===================================================================
RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/transformation/TraxTransformer.java,v
retrieving revision 1.21.2.4
retrieving revision 1.21.2.5
diff -u -r1.21.2.4 -r1.21.2.5
--- TraxTransformer.java 31 Oct 2002 03:21:13 -0000 1.21.2.4
+++ TraxTransformer.java 11 Nov 2002 14:21:04 -0000 1.21.2.5
@@ -123,9 +123,9 @@
* session-id-from-cookie, session-id-from-url, session-valid, session-id.<br>
* This property is false by default.
*
- * <p> The <use-deli> configuration is not supported anymore.
+ * <p> The <use-deli> makes the DELI information available.
* If DELI component is configured in the cocoon.xconf, transformer will
- * always make all the properties from the CC/PP profile resolved from
+ * make all the properties from the CC/PP profile resolved from
* the request available in the XSLT stylesheets. CC/PP support is
* provided via the DELI library. If the request does not provide
* CC/PP information, then CC/PP information can added via the DELI
@@ -169,6 +169,10 @@
/** The DELI service instance */
private Deli deli = null;
+ /** Should we make the DELI CC/PP profile available to the stylesheet (default is off) */
+ private boolean useDeli = false;
+ private boolean _useDeli = false;
+
/** Should we make the request parameters available in the stylesheet? (default is off) */
private boolean useParameters = false;
private boolean _useParameters = false;
@@ -226,6 +230,10 @@
this.useSessionInfo = child.getValueAsBoolean(false);
this._useSessionInfo = this.useSessionInfo;
+ child = conf.getChild("use-deli");
+ this.useDeli = child.getValueAsBoolean(false);
+ this._useDeli = this.useDeli;
+
child = conf.getChild("xslt-processor-role");
String xsltRole = child.getValue(XSLTProcessor.ROLE);
@@ -234,6 +242,7 @@
this.getLogger().debug("Use cookies is " + this.useCookies + " for " + this);
this.getLogger().debug("Use browser capabilities is " + this.useBrowserCap + " for " + this);
this.getLogger().debug("Use session info is " + this.useSessionInfo + " for " + this);
+ this.getLogger().debug("Use DELI is " + this.useDeli + " for " + this);
this.getLogger().debug("Use XSLTProcessor of role " + xsltRole);
}
@@ -291,6 +300,8 @@
_useBrowserCap = par.getParameterAsBoolean("use-browser-capabilities-db", this.useBrowserCap);
_useCookies = par.getParameterAsBoolean("use-cookies", this.useCookies);
_useSessionInfo = par.getParameterAsBoolean("use-session-info", this.useSessionInfo);
+ _useDeli = par.getParameterAsBoolean("use-deli", this.useDeli);
+
if (this.getLogger().isDebugEnabled()) {
this.getLogger().debug("Using stylesheet: '"+this.inputSource.getSystemId()+"' in " + this + ", last modified: " + this.inputSource.getLastModified());
}
@@ -477,7 +488,7 @@
getLogger().error("Error setting Browser info", e);
}
- if (this.deli != null) {
+ if (this.deli != null && this._useDeli) {
try {
Request request = ObjectModelHelper.getRequest(objectModel);
if (map == null) {
----------------------------------------------------------------------
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