Re: problems parsing xml from a foreign source in c2.0.0

2002-03-07 Thread Donald Ball

On Fri, 8 Mar 2002, Jeff Turner wrote:

> As a quick and dirty fix, you might want to try the SGML Open Catalog
> support that David Crossley added. That way you could map "-//NLM//DTD
> QueryResult, 22 Jan 2002//EN" to either the remote URL, or a local file
> (faster).

thanks for the tip. i'd already stumbled across that and it's a very good
solution. still, the underlying problem though seems like a bug and oughta
be fixed or at least noted. according to the system identifer notes from
the xml spec:

http://www.w3.org/TR/REC-xml#dt-sysid

"Unless otherwise provided by information outside the scope of this
specification (e.g. a special XML element type defined by a particular
DTD, or a processing instruction defined by a particular application
specification), relative URIs are relative to the location of the resource
within which the entity declaration occurs."

the system identifier in this case is site absolute, e.g. "/foo/bar.dtd".
seems like it ought to be evaluated in the context of the url from which
the xml was retrieved.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Postgresql JDBC: NoAvailableConnectionException

2002-03-07 Thread Donald Ball

On Thu, 7 Mar 2002 [EMAIL PROTECTED] wrote:

> 1- I changed the datasource name (or pool name) to 'gesupply' (the name of
> the database) from 'personnel'.  Is this needed normally?

you normally create a datasource with an appropriate name. the sample is
named 'personnel' since it's for a fictitious personnel database.

> 2- (and what, as a newbie, I think really fixed it) I started Tomcat from
> the "startup.bat" shortcut instead of starting it from the NT Services
> window.  I'm thinking that my changes to the classpath wont take affect in
> the Services untill I rebootstupid Windowsgranted,
> I dont know Win nearly as well as I know unix...so maybe I'm missing a
> "Reload My Environment" button somewhere.

if you're looking for something easier to use in development, you might
try resin. it automatically reloads the webapps and/or itself when most
anything interesting changes.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Include XML file

2002-03-07 Thread Donald Ball

On Thu, 7 Mar 2002, Stefano Bonnin wrote:

> I'd like to include an XML document inside another. With C1 I used
> util:include-file tag, but now, it (seems) doesn't work.
>
> How can I do this?

you can use the xinclude or cinclude transformers, you can use the
sitemap's aggregation features, or you can probably do the inclusion
manually in an xsp page or even possibly still with the util logicsheet.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: problems parsing xml from a foreign source in c2.0.0

2002-03-06 Thread Donald Ball

On Thu, 7 Mar 2002, Nicola Ken Barozzi wrote:

> >  tried to figure out how to disable validation to ignore
> > the issue completely. well, it seems that in c2.0.0, you cannot configure
> > the parser's validation behavior in the cocoon.xconf file. i looked in the
> > source for JaxpParser, and was surprised to note the parser factory's are
> > configured to create non-validating parsers:
> >
> > public JaxpParser ()
> > throws SAXException, ParserConfigurationException {
> > this.factory.setNamespaceAware(true);
> > this.factory.setValidating(false);
> > this.docfactory.setNamespaceAware(true);
> > this.docfactory.setValidating(false);
> > }
> >
> > if this is right, why is the parser trying to validate?
>
> Hi Donald! :-)

hey yourself :)

> When a DTD is declared, it is needed by the parser even if it's not
> validating.
> Take for example how it parses whitespaces: if an element is declared in the
> DTD to contain only other elements, the whitespace between itself and the
> children is not sent; otherwise it is, since the parser doesn't know if it
> is needed (has a meaning) or not.

okay, guess i gotta figure out why it can't resolve the DTD then. fwiw,
the problem also occurs in the latest cvs build of c2. the stacktraces i
get are:

org.apache.cocoon.ProcessingException: Exception during processing of
http://www.ncbi.nlm.nih.gov/entrez/utils/pmqty.fcgi?db=PubMed&mode=XML&dispmax=999&term=Smith[au]:
java.net.MalformedURLException: no protocol:
/entrez/query/DTD/pmqty_020122.dtd
at
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStreamSource.java:209)
at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:142)


more to the point:

java.net.MalformedURLException: no protocol:
/entrez/query/DTD/pmqty_020122.dtd
at java.net.URL.(URL.java:473)
at java.net.URL.(URL.java:376)
at java.net.URL.(URL.java:330)
at
org.apache.xerces.impl.XMLEntityManager.startEntity(XMLEntityManager.java:731)
at
org.apache.xerces.impl.XMLEntityManager.startDTDEntity(XMLEntityManager.java:691)
at
org.apache.xerces.impl.XMLDTDScannerImpl.setInputSource(XMLDTDScannerImpl.java:258)
at
org.apache.xerces.impl.XMLDocumentScannerImpl$DTDDispatcher.dispatch(XMLDocumentScannerImpl.java:811)
at
org.apache.xerces.impl.XMLDocumentFragmentScannerImpl.scanDocument(XMLDocumentFragmentScannerImpl.java:333)
at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:525)
at
org.apache.xerces.parsers.StandardParserConfiguration.parse(StandardParserConfiguration.java:581)
at org.apache.xerces.parsers.XMLParser.parse(XMLParser.java:147)
at
org.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1157)
at
org.apache.avalon.excalibur.xml.JaxpParser.parse(JaxpParser.java:241)
at
org.apache.cocoon.components.source.AbstractStreamSource.toSAX(AbstractStreamSource.java:204)
at
org.apache.cocoon.generation.FileGenerator.generate(FileGenerator.java:142)

the document header looks alright to me:




i interpret that to mean the DTD is located at path "/entrez..." from the
root of the space from which the xml document was retrieved - namely,
http://www.ncbi.nlm.nih.gov/. is the document header invalid for some
reason i'm missing, or is one of the resolver components not working as it
ought?

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




problems parsing xml from a foreign source in c2.0.0

2002-03-06 Thread Donald Ball

hey guys. i'm trying to retrieve some xml content over http to begin one
of my pipelines:

/nlm/query?author=Smith


  
http://www.ncbi.nlm.nih.gov/entrez/utils/pmqty.fcgi?db=PubMed&mode=XML&dispmax=999&term={1}[au]"/>

  


the xml returned from the nih server will begin like so:





unfortunately, cocoon tosses an exception when trying to parse this
document. it claims that it cannot access the dtd. however, it does not
appear that it's actually trying to get the DTD from the proper url:

http://www.ncbi.nlm.nih.gov/entrez/query/DTD/pmqty_020122.dtd

since the dtd is actually accessible at that url. it seems like the url
context information for the source xml is lost, which doesn't seem right.
anyone know what's up with that? is there another generator i should be
using?

as a workaround, i tried to figure out how to disable validation to ignore
the issue completely. well, it seems that in c2.0.0, you cannot configure
the parser's validation behavior in the cocoon.xconf file. i looked in the
source for JaxpParser, and was surprised to note the parser factory's are
configured to create non-validating parsers:

public JaxpParser ()
throws SAXException, ParserConfigurationException {
this.factory.setNamespaceAware(true);
this.factory.setValidating(false);
this.docfactory.setNamespaceAware(true);
this.docfactory.setValidating(false);
}

if this is right, why is the parser trying to validate?

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: problems with cocoon-2.0.1 and resin-2.0.3

2002-02-28 Thread Donald Ball

On Thu, 28 Feb 2002, Torsten Curdt wrote:

> That's exactly what I had...
>
> ...a fresh checkout solved it. see
>
>  http://marc.theaimsgroup.com/?l=xml-cocoon-dev&m=101377449417740&w=2

so you're saying that 2.0.1 is known to be broken with resin, but the
latest cvs does work?

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: problems with cocoon-2.0.1 and resin-2.0.3

2002-02-27 Thread Donald Ball

one more bit of potentially useful information - when i start from scratch
with a clean webapp tree, i note that cocoon-files directory created in
the servlet's temporary work area, the only directories that are created
are cache-dir and upload-dir - the org directory which normally serves as
the root of the classpath for the dynamically generated sitemap and xsp
classes is never created.

so something seems to be going wrong when cocoon reaches the end of the
cocoon.xconf file and tries to load sitemap.xmap. i just tried copying in
the vanilla cocoon.xconf file from cocoon-2.0.1 and saw no change in
behavior (my only mods had been adding a client-specific logicsheet,
adding a data source, and changing the sitemap reloading to synchronous).

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




problems with cocoon-2.0.1 and resin-2.0.3

2002-02-27 Thread Donald Ball

hey guys. i thought i'd take the webapp that was causing the xsp engine to
hang in tomcat-4.0.2 with cocoon-2.0.1 and try it with resin-2.0.3
instead. interesting results...

when i copy the webapp into resin's webapps area while the resin server is
still running, it notices the new webapp, initializes and configures it,
and everything works fine. cool. however, when i stop and the start resin
again, the entire servlet engine hangs after it tries to initialize the
c2-based webapp.

the last line in resin's error log is:

[2002/02/28 02:11:11] DEBUG   (2002-02-28) 02:11.11:770   [cocoon  ]
(Unknown-UR
I) Unknown-thread/ThreadSafeComponentHandler: ComponentHandler initialized
for:
org.apache.avalon.excalibur.component.ExcaliburComponentSelector

nothing very interesting or out of the ordinary appears anywhere in that
log. nothing shows up in any of the cocoon logs except for the store
janitor stuff in the core log:

DEBUG   (2002-02-28) 02:12.20:621   [core.store-janitor] (Unknown-URI)
Unknown-thread/StoreJanitorImpl: JVM total Memory: 4120576
DEBUG   (2002-02-28) 02:12.20:621   [core.store-janitor] (Unknown-URI)
Unknown-thread/StoreJanitorImpl: JVM free Memory: 1575328
DEBUG   (2002-02-28) 02:12.20:621   [core.store-janitor] (Unknown-URI)
Unknown-thread/StoreJanitorImpl: Memory is low = false

and it does repeat itself periodically, losing 5-10k of free memory each
time. access, error, and sitemap logs are all blank. resin won't stop
normally, the java processes must be killed. looks like deadlock to me,
although why it only happens when the server is being started from scratch
is completely beyond me...

and of course, frustratingly enough, the c2.0.1 sample webapp works fine,
even its xsp pages. does anyone have any suggestions for where i might
begin debugging this?

- donald




-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: OT: delay in message publishing

2002-02-26 Thread Donald Ball

On Mon, 25 Feb 2002, Luca Morandini wrote:

> is it just me, or there is someone else experiencing a four-hours-delay
> between sending a message and seeing it published on the list ?

it's not just you, it's anyone who happens to send mail to this list from
an account which is not subscribed to the list. those posts require
moderation, which requires a slack human like me to approve or reject
them. you should subscribe to the list if you want to participate. (i get
tired of having to repeatedly approve posts from the same people.)

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: How can I access clob using esql. Gives error java.lang.AbstractMethodError

2002-02-11 Thread Donald Ball

On Tue, 12 Feb 2002, Mumbai wrote:

> import java.lang.*;
> import java.sql.*;
> import java.sql.CallableStatement;
> import oracle.jdbc.driver.*;
> public class FirstThinDr {
>   public static void main (String args []) throws SQLException
>   {
> String s = null;
> DriverManager.registerDriver (new
> oracle.jdbc.driver.OracleDriver());
> Connection conn = DriverManager.getConnection
> ("jdbc:oracle:thin:@bbb:", "dododo", "sososo");
>  // @machineName:port:SID,   userid,
> password
>
> Statement stmt = conn.createStatement();
> ResultSet rset = stmt.executeQuery("select received_from,text
> from carmen_email_alert where id = 5483");
> //if (rset.next()) {
>  System.out.println("I am in");
>  while (rset.next()){
> ->   t = rset.getClob(2);
>int y = (int) t.length();
>System.out.Println (rset.getString("received_from"));
>System.out.println ("The length is" + y);
>  }// Print col 1
>  stmt.close();
>
> //}
>   }
> }
>
> This prog. Gives error  java.lang.AbstractMethodError at -> (pl. go
> to the prog.) What could be the problem ?

this program doesn't have anything to do with c2 or esql. i would ask on
an oracle jdbc list if you want help debugging this program.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Help building

2002-02-11 Thread Donald Ball

On Mon, 11 Feb 2002, Tim Brown wrote:

> Just downloaded cocoon1.8.2.  I have also tried 2.0.  I get the
> following with *both* versions when I attempt to run build.sh:
> 
> [tbrown@ctg0483 cocoon-1.8.2]$ ./build.sh
>
> Cocoon Build System
> ---
>
> Building with classpath
> 
>lib/ant_1_1.jar:lib/bsfengines.jar:lib/bsf.jar:lib/fesi.jar:lib/fop_0_15_0.jar:lib/sax-bugfix.jar:lib/servlet_2_2.jar:lib/stylebook-1.0-b2.jar:lib/turbine-pool.jar:lib/w3c.jar:lib/xalan_1_2_D02.jar:lib/xerces_1_2.jar:lib/xml.jar:lib/xt.jar:/usr/local/jdk/lib/tools.jar:
>
> Starting Ant...
> Buildfile: build.xml
> ./build.sh: line 40: 25185 Segmentation fault  $JAVA_HOME/bin/java
> -Dant.home=$ANT_HOME -mx64m -classpath $LOCALCLASSPATH
> org.apache.tools.ant.Main $*
> =
> I am running Tomcat 3.2.3 and Java 1.3.  I get the same error with
> cocoon 2.0 on another linux system with 3.2 Tomcat.

problem isn't with c2 specifically, java is segfaulting when it tries to
run ant. i suppose you try a different jvm.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Cocoon-2.0/Tomcat with Postgres

2002-02-08 Thread Donald Ball

On Fri, 8 Feb 2002, heli wrote:

> Alex Kachanov wrote:
> > what seems to be a problem?
>
> I use jakarta 4.0.1 and cocoon 2.0.1
> and want to use PostgreSQL.
>
> I have the following problem:
>
> my test page says the following:
>
> Hello
>
> This is my first Cocoon2 page filled with sql data!
> This method is not yet implemented.

is it possible you're using an old version of the postgresql driver?

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: cocoon sitemap to match all xml files?

2002-02-08 Thread Donald Ball

On Thu, 7 Feb 2002, Vishal Khatnani wrote:

> I would like to add a configuration on my sitemap that will match all
> xml files on my server and render using the appropriate stylesheet. I
> want it to look at the stylesheet specified in the xml file, and use
> that.

i'm not aware of any way to do that in c2, unfortunately. i suppose it's
possible that one could write a TraxTransformer variant that would queue
its incoming sax events, scan for the xml-stylesheet PI and only get a
Transformer instance after it found out what stylesheet to use... but it
would be a chore, and the general feeling in the c2 crowd is that the job
of associating xml resources with stylesheets is best handled in the
central sitemap.

> Before rendering, cocoon should look at the xml file, and see which one
> to use by figuring out what type of request it is. As far as I know, you
> specify in the xml file which xsl stylesheet to use according to the
> request. In this way, I can use different stylesheet names, (e.g.
> style-wap, style-web,etc.) and use the one which is appropriate.

see the browser selector example in the sample sitemap.

> Also, do you need  in your xml file? I
> have migrated to cocoon 2 and you had to have this line in your xml
> files but do we need them in the latest version of cocoon?

you don't need them, they're ignored. doesn't hurt anything, but it may be
misleading for future developers on your team.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




a question on xsp and a question on parameterizing xslt

2002-02-07 Thread Donald Ball

hi guys, long time no see. if anyone's curious where i've been, see the
apologetic post to cocoon-dev i just sent in. now, on to my questions. :)

1. a long while back, we had some discussion on whether or not one should
be able to send a redirect from an xsp page. i'd thought the eventual
consensus was that we should, but i guess i was wrong, since the response
logicsheet doesn't seem to provide any way to send a redirect, nor does
the Response interface provide a redirect method. however, one of the c2
docs _does_ reference such a method:

http://xml.apache.org/cocoon/userdocs/concepts/actions.html

compares and contrasts xsp pages and actions. the xsp page it contains has
the following snippet:


mypool

SELECT userid FROM users
WHERE name=name
AND password=password


userid = 








the alleged messiness of the code notwithstanding (;)), it seems to be a
common development idiom to want to redirect the user to a different url
or pipeline if something goes awry in an xsp page (the user can't login to
the database, the user doesn't have permission to do something, etc.) if
one cannot send a redirect from an xsp page in c2, can one switch
pipelines based on a flow control statement in an xsp page?

naturally, i can see that one could refactor and use actions to do the
pipeline switching and/or redirecting instead, but i still can't see any
good reason to prohibit early exit from a pipeline, via sendRedirect or
sendError from any component, including xsp pages. it's not always
desirable to factor to split the flow control stuff out of xsp pages into
actions. or is it?

2. in developing my own standalone j2ee webapps using trax, i quickly
realized that if you don't know at what url your webapp is going to be
mounted, you can't use absolute links to resources in your webapp, e.g.
images, javascript libraries, etc. but strictly using relative paths in
your xslt stylesheets when referencing those resources is not only a real
pita, it's impossible if that stylesheet if used in the construction of
urls that appear at different depths in the urlspace. the easy solution is
to parameterize the stylesheet with the context path information:




i presume c2 does not already parameterize stylesheets with this datum by
default. does anyone know how you would easily add that parameter to all,
or a certain class, of xslt transformations? also, i presume that others
have encountered this problem. is there an alternate solution anyone has
used that's better?

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Problems initializing cocoon2

2001-06-18 Thread Donald Ball

On Mon, 18 Jun 2001, Carlos wrote:

> Good afternoon:
>
> I am getting the following errors when tryinf to access cocoon2. I am
> accessing it over HTTP, and using JDK 1.3.0 on Linux Redhat 7

(thread moved to cocoon-users where it's relevant)

looks like there's a jaxp parser that doesn't support namespaces in your
classpath ahead of one that does (xerces).

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: C2: recommended method for accessing Database, esp. for nestedqueries?

2001-06-15 Thread Donald Ball

On Wed, 13 Jun 2001, [iso-8859-1] Götz Botterweck wrote:

> I'm already using the ESQL. Now I'd like to do nested queries. Somewhat
> like that
>
> QUERY
>   retrieve departments
>   FOR EACH department d
>   retrieve all members of d
>   /FOR EACH
> /QUERY
>
> I've seen the file ../docs/samples/sql/sql-page.xml with the
>  tag. Is something similar possible with ESQL?

yes:





http://www.apache.org/1999/XSP/Core";
  xmlns:esql="http://apache.org/cocoon/SQL/v2";
>




  org.postgresql.Driver
  jdbc:postgresql://localhost/test
  test
  test
  
select id,name from department_table

  header info
  

  
  
  
select name from user_table where department_id = 


  

  


  No employees

  

  
  footer info

  







-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




RE: (urgent)ESQL question

2001-06-15 Thread Donald Ball

On Wed, 13 Jun 2001, Ramesh Vejendla wrote:

> HI ALL,
> here i tried to keep esql results into varible and comparing with
> other variable , but its not working ...plz help me out.
>
> 
>   String uname="";
> 
>
> 
>   
>   uname=;
>   if( username.equals(uname)){
>   }
>   else
>   { do something}
>   
> 

er, you aren't even doing a query here...

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




[c2.1] xsp question and a sitemap question

2001-06-12 Thread Donald Ball

1. it's quite simple. i want to pass parameters to my xsp page from my
sitemap. the typical modus operandi is to do this:


  


but how do i access the parameter from my xsp page? actions are given a
Parameters object, but xsp pages are not, and i don't know how to access
the Parameters from the objectModel.

2. i want to add a couple of http response headers to a sitemap resource
pipeline:

   



   

i want to give it a Pragma: No-cache HTTP header so that the client will
refetch the resource every time. are there parameters i can pass to the
serializer so that it will add HTTP headers (assuming it subclasses
AbstractSerializer or whatever)? If not, would anyone oppose that
addition?

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Off-Topic: XSLT Question

2001-06-12 Thread Donald Ball

On Tue, 12 Jun 2001, Rajkumar, Joseph wrote:

> I know this is an off-topic question, but I am facing a problem
> with XSLT and I would appreciate some help since this is some
> what urgent.

so ask on an xslt users list. mulberrytech runs a nice one.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: XInclude-Transformer

2001-06-12 Thread Donald Ball

On Mon, 11 Jun 2001, [iso-8859-1] Jörn Heid wrote:

>
> Are there any intensions to extend the funcionality of the xinclude
> transformer to support parameter processing like this:
>   
>   xml
>   ../menu.xml
>   
> It isn't possible now, is it?

no, currently the xinclude parameters must exist in the xinclude element
as per the xinclude specification. i strongly oppose extending the
functionality of the xinclude transformer in that fashion - the xinclude
transformer attempts to implement the xinclude specification - no more, no
less. i heartily welcome implementations of other include mechanisms.
xincludes are not all that.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Cocoon 1.8.3

2001-06-05 Thread Donald Ball

On Tue, 5 Jun 2001, Drasko Kokic wrote:

> --- Uli Mayring <[EMAIL PROTECTED]> wrote:
> > On Thu, 31 May 2001, Drasko Kokic wrote:
> >
> > > As of now (Thu. 31.05.01 19:16:00 CET) the latest
> > > release on the Cocoon site is 1.8.2 dated 26th of
> > > January !!!
> > >
> > > Uli, where have you seen release of 1.8.3?
> >
> > Just download the latest snapshot, C1 doesn't change
> > very much anymore :)
> >
> > Ulrich
> >
> > --
> > Ulrich Mayring
> > DENIC eG, Softwareentwicklung
> >
> >
> So ... what is stoping it from going into the official
> release?!

lack of free time to roll up a distro. a couple of outstanding patches to
evaluate. commitment to getting c2 beta out the door.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Cocoon2 and Enterprise Enhydra 4.0 (beta)

2001-06-05 Thread Donald Ball

On Tue, 5 Jun 2001, Harald Lucke wrote:

> after long time, i have cocoon2 under ee running.
> The Problem is, the ee use the xerces v1.2 and cocoon2 the v1.4.
> I have changed the xerces in the source tree of ee. The samples from
> cocoon and the wireless part from the xmlc i have comment out.

ee should not force any classes on its servlets other than the servlet
api. that being said, if you would like to contribute a patch to the
install docs with instructions for ee, that'd be sweet.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Web Publishing System...

2001-06-05 Thread Donald Ball

On Mon, 4 Jun 2001 [EMAIL PROTECTED] wrote:

> I am now planing a web publishing system using cocoon 1.8.2. I will
> need more then one xml file input to be transformed with one xsl file.
> But i am not sure is it posible ? And please tell me if you know the
> solution.

yes, easily, just use the standard xml-stylesheet pi - but you might want
to consider using c2. it allows for a more flexible mapping of urlspace to
xml-space and xsl-space. so to speak.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: XSP NoClassDefFound (but not sun/tools/javac/Main)

2001-06-05 Thread Donald Ball

On Tue, 5 Jun 2001 [EMAIL PROTECTED] wrote:

> There is something funny going on with my cocoon interpreter or
> classloader...  I am using an xsp page to format data, part of which is
> creating a simple bean (so simple that all it has an empty constructor and a
> single method that returns some xml... no explicit imports).
>
> The page compiles correctly (so the class is found correctly during
> compilation) but then when the page is executed, I get a
> java.lang.NoClassDefFound error, referring to my test class.
>
>   java.lang.NoClassDefFoundError: framework/test/PretendEJB
>   at
> _opt._www._websites._laetitia._html._test._unitprice._unit_price.populateDoc
> ument(_unit_price.java:149)
>   at
> org.apache.cocoon.processor.xsp.XSPPage.getDocument(XSPPage.java:97)
>   ...
>
> The snippet of xml that is causing the problem is:
>
>   
> 
>   framework.test.PretendEJB ejb = new framework.test.PretendEJB();
>   
>   
> 
> ejb.getXML()
> 
>   
>   
>
> I am not sure that this will end up working as I expect, anyway, but not
> finding the class is a bit of a showstopper.  A JSP page in the same
> directory works as expected.  I would have thought that the servlet shared
> the same class loader as the JSP engine.
>
> Specs:
>
>   Cocoon 1.8.2
>   Tomcat 3.2.2
>   Apache 1.3.19
>   JDK 1.3.1
>   Linux 2.4.2-2 (Redhat 7.1)

the xsp class loader is perhaps a bit broken. try putting your lib in the
tomcat shared lib directory.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Cocoon and threads

2001-06-01 Thread Donald Ball

On Fri, 1 Jun 2001, Antonio Parolini wrote:

>
> Hi there,
>
> Let's think about the following XSP page accessed by two users in the same
> time:
>
> 
>   
>   String sName = session.getAttribute("name") ;
>   [...]
>   
>
>   Welcome sName
> 
>
> In concurency tests I made, sometimes, users don't see their own name on the
> browser!
>
> One could put all the xsp page logic into a synchronize(this){ [..] }
> block...
>
> But I was wondering if someone already ran into this problem and what is the
> reason why XSP pages aren't already declared as synchronized...

they don't need to be, as long as you restrict yourself to method
variables and not class variables. i can't tell why your example wouldn't
work perfectly - maybe if you'd post your entire xsp page...?

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: esql dynamic sql

2001-06-01 Thread Donald Ball

On Fri, 1 Jun 2001, Oskar Werewka wrote:

>
> I need to include in my sql statement
> some parameters from request object
> and also from my java code.
>
> Example:
>
> "select * from users where userid = "
>
> How about PreparedStatement?
>
> "select * from users where userid = ?"
>
> Can I use it somehow?

yes.

select * from users where userid =
  


it's seamlessly turned into a preparedstatement.

- donald



-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: RE : ESQL and 'lock'ing tables for exclusive access

2001-06-01 Thread Donald Ball

On Fri, 1 Jun 2001, Luis Gois wrote:

> Donald :
>
> One of my coleagues tried something similar to what you've
> sugested, but the connection was getting closed after the lock
> statement, therefore loosing the lock! But looking more carefully at
> your code, I think he was doing something like this :
>
> 
>  
>   lock table...
>  
> 
> 
>  
>   process table...
>   
> 
> 
>  
>   unlock table...
>  
> 

that's invalid esql. the esql:results element must appear underneath an
esql:execute-query element.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: hand a DOM to cocoon

2001-05-31 Thread Donald Ball

On Thu, 31 May 2001, cocoon gebruiker wrote:

> > > Hello,
> > > When creating an app, i run into the following problem:
> > >
> > > When i create a dynamic DOM (or JDOM) object
> > > (let's say in my servlet or another class), how can i pass this object
> >to
> > > cocoon?
> >
> >you cannot pass a DOM from a servlet to cocoon unless you serialize it.
> >you can pass a DOM from another class to cocoon using a standard method
> >call.
> Ok, let me rephrase a little:
> I build a httpServlet which in return generates(depending on parameters), a
> DOM object or a servletResponse.

that's weird, you're subverting the servlet api.

> Normal xml requests are handled by cocoon using the getDocument() method
> in my producer.
>
> But in this case, the producer is not invoked, because i address the
> servlet. the response of the servlet however, can be a normal
> servletResponse, or a DOM document, which i want to process using cocoon.
> Does this sound stupid, or did i go left where i had to go right in my
> approach?

how about this:


  
myServlet.getDOM()
  


- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: [c2] SVG X11 display problem

2001-05-31 Thread Donald Ball

On Thu, 31 May 2001, Fred Tsang wrote:

> Thanks for your help! (and yes, it is MUCH better than placing all the jars
> into /lib)  I have noticed one thing though.  I'm using cocoon on a Netra
> T1, and they don't have any graphics cards.  I had to remove all references
> to svg in the sitemap and cocoon.xconf.  Otherwise, cocoon will give an
> error of:
>
> ERROR   17927   [cocoon  ] (Thread-13): Error compiling sitemap
> java.lang.InternalError: Can't connect to X11 window server using ':0.0' as
> the value of the DISPLAY variable.
>
> This appears to be directly related to the use of SVG.

see http://www.geocities.com/marcoschmidt.geo/java-image-coding.html

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: a real example

2001-05-30 Thread Donald Ball

On Wed, 30 May 2001, Sky Torch wrote:

> Hello,
>
> can someone show me with a real example how to generate dynamic content in
> cocoon and cocoon2 ?
>
> the one i'm thinking is: "welcome, ".
>
> for cocoon, i'm thinking to write a processor to insert
> request.getRemoteHost() into content, is it right approach? for c2, can
> producer be used to get this dynamic info ?
>
> thanks in advance.

see the xsp samples.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: hand a DOM to cocoon

2001-05-30 Thread Donald Ball

On Wed, 30 May 2001, cocoon gebruiker wrote:

> Hello,
> When creating an app, i run into the following problem:
>
> When i create a dynamic DOM (or JDOM) object
> (let's say in my servlet or another class), how can i pass this object to
> cocoon?

you cannot pass a DOM from a servlet to cocoon unless you serialize it.
you can pass a DOM from another class to cocoon using a standard method
call.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: [c2] cocoon.log outside of servlet context

2001-05-30 Thread Donald Ball

On Wed, 30 May 2001, giacomo wrote:

> > > > how do I get the main Cocoon log into a  directory outside of the
> > > > servlet context?
> >
> > > Have you removed the comment around the mentioned block in web.xml ;)
> >
> > Yes I have ;-) I just double checked it, and furthermore, the
> > /WEB-INF/log/cocoon.log is not updated any longer. So _something_ did work.
> > However, I cannot figure out, _where_ the new cocoon.log is stored. It's not
> > in /tmp, but maybe my file://tmp/ is false? BTW: I'm using a linux system,
> > if that's of interest.
>
> I've placed a "/tmp/" into the log-dir element and my cocoon.log apears
> there. I'm using linux, too.

i think it should be file:///tmp/cocoon.log?

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: Cocoon 1.8.3-dev !!

2001-05-30 Thread Donald Ball

On Wed, 30 May 2001, Samuel ARNOD-PRIN wrote:

> Can anyone tell me what changed in that new version ???
> I was told to look in the faq but there is no answer to my question :
>
> I want to print a '>' or a space =' ' in my HTML !!
>
> With cocoon 1.8.2 there was no problem !! I put   into my XSL
> file, but now If I do this, I get   into my HTML !!
> The same for my > that became >... now it stays >..
> my xsl-whitespace that I added to make my code clearer... they are all
> again in the html file...
>
> can anyone help me ?? There is no problem if a > is in the 

Re: ESQL / attributes instead of elements

2001-05-29 Thread Donald Ball

On Tue, 29 May 2001, Andres Voldman wrote:

> How can I get attributes instead of elements in a esql row-result?
>
> I'd like to have something like this:
>
>   

xsp:attribute.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: xinclude and cinclude in C2

2001-05-29 Thread Donald Ball

On Tue, 29 May 2001, Maring, Steve wrote:

> I keep seeing reference to the aggregate.xsp sample as being a good example
> for doing XML inclusion in C2, but it has never worked for me.
>
> I'm running C2a7 now.  Does ANYBODY have a working example of an include?
> I'm desperate here.  I'm going to get Brio shoved down my throwt if I can't
> prove some of this stuff pretty quick.
>
> What the heck is a "transparent include" with cinclude?  And assuming that I
> could get it to work, what advantage does it have over xinclude?

cincludes can include sitemap uris. xincludes cannot. cincludes used to be
performed using the CIncludeSAXConnector, but i think it's disappeared at
the moment. XIncludes can be done using the xinclude transformer just like
you'd use any other transformer.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: [C_1.8.3-dev] Why are all whitespaces preserved ???

2001-05-29 Thread Donald Ball

On Tue, 29 May 2001, Samuel ARNOD-PRIN wrote:

> Why does the 1.8.3-dev version preserve all whitespaces ???
> and I don't see how it is possible to generate the < (and not <) in
> html...

read the faq.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: [C1] xinclude tags not processed if called inside a taglib (3ste ps approach)

2001-05-29 Thread Donald Ball

On Tue, 29 May 2001, JEULIN Olivier wrote:

> Hello,
> I'm trying to use a custom taglib to include (parts of) xml files.
> My goal is to achieve a complete separation between xml sources, xsp which
> merge them, and further XSLT/XSL processing. I would also like to have all
> "cocoon-process" instructions grouped in the xsp file.
>
> If I uncomment my tag "toto:title" and the call to xsp and its stylesheet,
> xinclude instructions work fine.
> But, if I put them back, xinclude instuctions are left as is (but Xinclude
> seems to be call, as it inserts a comment: "processed by XInclude" !?). (see
> attached html files)
>
> I have tried to insert  dynamicaly in the
> xsp:page template: it doesn't work either.
>
> What's the correct way to do it ?

change the element name from 'foo' to 'include'. there's a bug in the way
xsp creates attributes with namespaces, and the clever workaround looks
for an element named 'include' with attributes named 'xinclude:href', etc.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: svg cocoon

2001-05-29 Thread Donald Ball

On Tue, 29 May 2001, Ulrich Mayring wrote:

> > What is not in beta?
>
> Cocoon2. (Cocoon1 can't serve SVG, but it can render it to PDF via fop)

though it would seem to be easy as pie to write an SVGFormatter for c1, if
anyone wants to take a gander at it.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: posting html allowed?

2001-05-29 Thread Donald Ball

On Tue, 29 May 2001, Ulrich Mayring wrote:

> > I've got a list of resource links for SVG that might be useful to some
> > of the other users of Cocoon...
> >
> > Is this the place to post them? Is html allowed? Attachments?
>
> No, no, no. SVG is just as off-topic here as XSLT, PDF, Word, IBM and
> Sex (except as related to Cocoon).

begs the question, though, is there a good svg-users list out there?

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: what am I doing wrong???

2001-05-28 Thread Donald Ball

On Mon, 28 May 2001, declan kelly wrote:

> Hi,
>
> I'm trying to write a page where users can edit their
> details, so I'm pulling their details from the DB and
> trying to put them into a form as the value, simple or
> so I thought. What's happening in practice is that the
> strings I'm putting into the value have a load of
> whitespace around them and are way off the end of the
> input box. I tried using .trim() but it doesn't do
> anything. This is what I'm trying
>
> 
>  
>column="firstname"/>
>  
> 

try:



  



(xsp:attribute assumes all whitespace is important - probably erroneously,
but you never know).

or if you just can't get that to work:


  

  

  


maybe see esxlt.org or xsltsl.sourceforge.net for a strip-whitespace
xslt function if you can't figure out how to make one.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: XSP-Processor and Websphere Test Environment (Visaual Age)

2001-05-28 Thread Donald Ball

On Mon, 28 May 2001 [EMAIL PROTECTED] wrote:

>
> I want to use cocoon with the Websphere Test Environment from Visual Age.
> The normal samples from cocoon work nice. But the samples with the
> XSP-Processor don't work. I get the following Exception:
>
> java.lang.RuntimeException: Exception when creating
> "org.apache.cocoon.processor.xsp.XSPProcessor" :
> java.lang.NoSuchMethodError: See
> http://xml.apache.org/cocoon/faqs.html#faq-normalize
>
> I have look at the faqs. I have set the xerces-classpath on the beginning.
> But I have the same exception.
>
> Have anyone install the XSP-Processor on the Websphere Test Environment?
>
> Please help !!

i think you have to forcibly remove any jars containing DOM1 classes from
anywhere in the websphere installation. websphere, afaik, has never been
particularly good about giving its servlet zones a clean classpath to work
with.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>




Re: XSP and inheritance

2001-05-27 Thread Donald Ball

On Fri, 25 May 2001, Oskar Werewka wrote:

>   Can I somehow make a XSP page base class
>   for my pages - I need to contain in one place
>   my common behavior?

no. xsp pages already inherit from a base cocoon class. you could give
your xsp pages references to helper objects which are derived from a base
class though.

- donald


-
Please check that your question has not already been answered in the
FAQ before posting. 

To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>