You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Ovidiu Predescu <ov...@cup.hp.com> on 2001/08/14 08:47:40 UTC

[C2] [2.1-dev] various fixes and changes

Hi again,

The following patch tries to address a few issues I've encountered.

- in build.xml, the tools.jar is assumed to be in $JAVA_HOME/lib/tools.jar. It
turns out that JAVA_HOME usually points to the jre/ directory inside the jdk/
directory, while the tools.jar is in the lib/ directory of jdk/. Something like
this:

jdk/
  jre/
    lib/
      no tools.jar here <-- this is where ${tools.jar} points to
  lib/
    tools.jar <--- it is really here

This is true at least on Sun's JDK 1.3.1 under Linux. Could somebody else
verify this? If this is the case on all the JDKs, the patch for build.xml fixes
the problem.

- the patch for ProcessingException adds a new constructor which allows
creating such an exception given some other one. This functionality is needed
so that the original stack trace is preserved inside the embedded exception.

- the patch for request.xsl adds xsp-request:get-session-id.

- the patch for xsp.xsl allows for initialization code to be generated at the
entry in the generate() method using the xsp:init-page element. Note that this
is not the same with the xsp:logic element placed before the first element
inside xsp:page. While the xsp:logic generates code which ends up before the
declaration of the generate() method, the xsp:init-page generates code right
inside generate(), before anything else is executed. This feature is useful in
some of the logicsheets I have here.

Please let me know what you think of these changes.

Greetings,
-- 
Ovidiu Predescu <ov...@cup.hp.com>
http://orion.nsr.hp.com/ (inside HP's firewall only)
http://sourceforge.net/users/ovidiu/ (my SourceForge page)
http://www.geocities.com/SiliconValley/Monitor/7464/ (GNU, Emacs, other stuff)


XSP initialization (was Re: [C2] [2.1-dev] various fixes and changes)

Posted by Sylvain Wallez <sy...@anyware-tech.com>.

Ovidiu Predescu wrote:
> 
> Hi again,
> 
> The following patch tries to address a few issues I've encountered.
> 
<snip/>
> 
> - the patch for xsp.xsl allows for initialization code to be generated at the
> entry in the generate() method using the xsp:init-page element. Note that this
> is not the same with the xsp:logic element placed before the first element
> inside xsp:page. While the xsp:logic generates code which ends up before the
> declaration of the generate() method, the xsp:init-page generates code right
> inside generate(), before anything else is executed. This feature is useful in
> some of the logicsheets I have here.

I was thinking of this kind of feature just today !

But I'd like to be able to insert code at additional locations :
- before startDocument(), identical to your <xsp:init-page> and after
endDocument(). This is to set up things before anything gets generated,
and allows also, if an error occurs during this setup, the error-handler
to generate a clean page. After endDocument(), cleanup can be performed,
e.g. releasing components.

- before startElement() and after endElement() of the root element, to
allow global namespace mappings to be defined.

I was thinking to use the existing <xsp:logic> outside of the page
element feature, but with additional attributes on it :
- <xsp:logic before="document">, <xsp:logic after="document">
- <xsp:logic before="root-element">, <xsp:logic after="root-element">

Ovidiu and others, what do you think of this ?

And can we easily alter the XSP syntax that is also used by AxKit (BTW,
the xsp-dev list is _very_ quiet) ?

-- 
Sylvain Wallez
Anyware Technologies - http://www.anyware-tech.com



---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


AW: [C2] [2.1-dev] various fixes and changes

Posted by Carsten Ziegeler <cz...@sundn.de>.
> Michael Hartle wrote:
> 
> Ovidiu Predescu wrote:
> 
> >- in build.xml, the tools.jar is assumed to be in 
> $JAVA_HOME/lib/tools.jar. It
> >turns out that JAVA_HOME usually points to the jre/ directory 
> inside the jdk/
> >directory, while the tools.jar is in the lib/ directory of jdk/. 
> Something like
> >this:
> >
> My JAVA_HOME points and has always pointed to the base directory 
> containing Java, e.g. C:\Programme\JDK1.3.1 or /usr/local/jdk1.3.1, and 
> as I am able to build several projects from different sources via Ant 
> without any problem, I do not think that this assumption is valid. In 
> case I just have been lucky all the time, please feel free to 
> mention it ;)
> 
I think we must distinct here between the environment variable JAVA_HOME
and the jvm system property "java.home". Whereas JAVA_HOME can be set
by the user to any value, the system property "java.home" always points
to the $JAVA_HOME/jre directory. This behaviour is specified by SUN.
I verified this on Windows with JDK 1.2.x and JDK 1.3.x.

Ant or the current build.xml uses the "java.home" property to get the
tools.jar which is simply wrong. So the patch is required.


Carsten 

Open Source Group                        sunShine - b:Integrated
================================================================
Carsten Ziegeler, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
www.sundn.de                          mailto: cziegeler@sundn.de 
================================================================


> Michael
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
> For additional commands, email: cocoon-dev-help@xml.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: [C2] [2.1-dev] various fixes and changes

Posted by Michael Hartle <mh...@hartle-klug.com>.
Ovidiu Predescu wrote:

>- in build.xml, the tools.jar is assumed to be in $JAVA_HOME/lib/tools.jar. It
>turns out that JAVA_HOME usually points to the jre/ directory inside the jdk/
>directory, while the tools.jar is in the lib/ directory of jdk/. Something like
>this:
>
My JAVA_HOME points and has always pointed to the base directory 
containing Java, e.g. C:\Programme\JDK1.3.1 or /usr/local/jdk1.3.1, and 
as I am able to build several projects from different sources via Ant 
without any problem, I do not think that this assumption is valid. In 
case I just have been lucky all the time, please feel free to mention it ;)

Michael




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org