You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Tsoloane Moahloli <ts...@zen.co.za> on 2000/04/26 10:02:47 UTC

Re: Live sites with Cocoon? again

We have three sites running on cocoon.

Www.zen.co.za
www.randshow.co.za
www.mtnartinst.com


Two more should be up in the next month or so....

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 4/25/00, 4:06:11 PM, Steven Maring <St...@trcinc.com> wrote 
regarding Live sites with Cocoon? again:


> Well, I know how great Cocoon is, but the customer does not.

> The sales people told me that they want to be able to say to the 
customer,
> "See!  Look!  They use Cocoon.  You should too."

> So I thought I would put out the call again, since it has been a 
while, for
> anybody using Cocoon on a high profile site.

> Do I recall something about www.sports.com being one?


> -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
> |  Steve Maring
> |  Web Application Engineer
> |  Technical Resource Connection, Inc.
> |  smaring@trcinc.com
> |  813-891-6084 x4323
> -+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-


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




RE: Live sites with Cocoon? again

Posted by Tsoloane Moahloli <ts...@zen.co.za>.
That's because the page does not exist.  It's index.html.  I am using 
frames for this page.  I think Ulrich was just wondering if we could 
change the generated error page.

>>>>>>>>>>>>>>>>>> Original Message <<<<<<<<<<<<<<<<<<

On 4/28/00, 2:22:59 AM, "JJD" <jj...@home.com> wrote regarding RE: 
Live sites with Cocoon? again:


> Hi Ulrich: FYI I tried to get your page 
http://www.mtnartinst.com/index.xml
> and got the message below instead. I am running IE 5.00 on NT 4.0. 
Hope it
> helps? JJD

> Cocoon 1.5




> Error found handling the request.
> java.io.FileNotFoundException: /usr/local/Web/mtnart/index.xml
>       at java.io.FileInputStream.(FileInputStream.java)
>       at java.io.FileInputStream.(FileInputStream.java)
>       at 
org.apache.cocoon.producer.FileProducer.getStream(FileProducer.java)
>       at
> 
org.apache.cocoon.producer.AbstractProducer.getDocument(AbstractProducer.jav
> a)
>       at org.apache.cocoon.Engine.handle(Engine.java)
>       at org.apache.cocoon.Cocoon.service(Cocoon.java)
>       at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
>       at
> 
org.apache.jserv.JServConnection.processRequest(JServConnection.java:33
5)
>       at 
org.apache.jserv.JServConnection.run(JServConnection.java:197)
>       at java.lang.Thread.run(Thread.java)


> Warning: this page has been dynamically generated.


> Copyright (c) 1999 The Java Apache Project.
> All rights reserved





> -----Original Message-----
> From: ulim@mx5-e.mail.home.com [mailto:ulim@mx5-e.mail.home.com]On
> Behalf Of Ulrich Mayring
> Sent: Wednesday, April 26, 2000 10:13 AM
> To: cocoon-users@xml.apache.org
> Subject: Re: Live sites with Cocoon? again


> Tsoloane Moahloli wrote:
> >
> > We have three sites running on cocoon.
> >
> > Www.zen.co.za
> > www.randshow.co.za
> > www.mtnartinst.com

> Hello,

> try to access this page:

> http://www.mtnartinst.com/index.xml

> And tell me how to avoid giving out this information to the user :)

> kind regards,

> Ulrich

> --
> Ulrich Mayring
> DENIC eG, Systementwicklung

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


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




Re: Additions to XSP util:* taglib

Posted by Stefano Mazzocchi <st...@apache.org>.
Ulrich Mayring wrote:

> Plus, you have a whole slew of additional options by doing clever things
> with PIs. This point will hopefully be fixed by the Sitemap, but right
> now cocoon is too confusing for me. We should have more structure for
> document authors.

You're totally right and we are not hiding this.

I hope the sitemap will bring more structured vision of your site. This
is why I believe Cocoon2 will be far superior by design...

... but still not perfect.

We know that XSP overlaps with both JSP and XSLT. Some believe that XSP
is actually completely rewritable using XSLT with extentions.... but we
have to wait for XSLT 1.1 for that.

The future will tell how to integrate more.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Re: Additions to XSP util:* taglib

Posted by Ulrich Mayring <ul...@denic.de>.
Zvi wrote:
> 
> 2. Much less verbose, than writing many times <xsp:logic> tags with

You are dead right. Of course the cleanest thing would be if we
integrated XSP and XSLT in a better way (I don't know how). But right
now we have three different documents, the XML, the XSP and the XSLT
document - and this leads to confusion at times, especially since an XSP
file can also be an XSLT stylesheet at the same time.

I'm not sure if you guys understand what I mean. The thing is that
syntactically everything the document authors write is XML. But
semantically there is:

- "plain XML", i.e. a document describing data and nothing else

- "XSPish XML", i.e. a document describing data and doing some
computation - perhaps altering/adding data or even doing things totally
unrelated to the data

- "XSLTish XML", i.e. a document transforming XML into whatever.

- "XSPish XSLT XML", i.e. a document containing data, doing some
computation and doing some XML transformation

Plus, you have a whole slew of additional options by doing clever things
with PIs. This point will hopefully be fixed by the Sitemap, but right
now cocoon is too confusing for me. We should have more structure for
document authors.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: Additions to XSP util:* taglib

Posted by Zvi <th...@ifrance.com>.
and my last argument:

I think we need to make XSP much more similar to XSLT, this will allow easy
migration from XSP to EXSLT in the future.
In fact some people think, that XSP is just compiled variant of XSLT Literal
Result Element ...

For example, I would like to have implemented {xxx} inside attributes in XSP,
instead of using <xsp:attribute> tag.
This will be much less verbose.
Ricardo, any hints how to implement this?

Zvi

Zvi wrote:

> Kevin,
>
> I like it for 2 reasons:
> 1. Target langauge independent (doesn't mutter Java/JS/C/C++/Perl/TCL
> etc...)
> For example: I can write:
>
> <util:case>
>     <util:when test="a!=b">
>         A!=B
>     </util:when>
>     <util:otherwise>
>         A==B
>     </util:otherwise>
> </util:case>
>
> and then XSP will compile it to Java
> then if I'll want to switch to JavaScript or C++ :), then I need only to
> write new logicsheet ...
>
> 2. Much less verbose, than writing many times <xsp:logic> tags with
> <[CDATA[ ... ]]> inside :)
> compare between:
>
> <util:if test="a &gt; b">
>    <h1>A greater than B!</h1>
> </util:if>
>
> and
>
> <xsp:logic>
> <[CDATA[
> if(a>b){
> ]]>
> </xsp:logic>
>    <h1>A greater than B!</h1>
> <xsp:logic>
> }
> </xsp:logic>
>
> Zvi
>
> "Kevin A. Burton" wrote:
>
> > Zvi wrote:
> > >
> > > Hi,
> > >
> > > I wrote XSP taglib like <xsl:for-each>, <xsl:if>, <xsl:case>,
> > > <xsl:when>, <xsl:oherwise>.
> > > And I proposing to add them to Cocoon standard util:* taglib.
> >
> > I would say -0.
> >
> > Although I am sure it is awesome code.  The XSL <xsl:for-each> etc code
> > is really only added because there is no XSL native language.  With XSP
> > we can use Java/JavaScript/etc.  So it seems like this might just be
> > redundant.
> >
> > KEvin
> >
> > --
> > Kevin A Burton (burton@apache.org)
> > http://relativity.yi.org
> > Message to SUN:  "Please Open Source Java!"
> > "For evil to win is for good men to do nothing."
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> > For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Additions to XSP util:* taglib

Posted by Zvi <th...@ifrance.com>.
Kevin,

I like it for 2 reasons:
1. Target langauge independent (doesn't mutter Java/JS/C/C++/Perl/TCL
etc...)
For example: I can write:

<util:case>
    <util:when test="a!=b">
        A!=B
    </util:when>
    <util:otherwise>
        A==B
    </util:otherwise>
</util:case>

and then XSP will compile it to Java
then if I'll want to switch to JavaScript or C++ :), then I need only to
write new logicsheet ...


2. Much less verbose, than writing many times <xsp:logic> tags with
<[CDATA[ ... ]]> inside :)
compare between:

<util:if test="a &gt; b">
   <h1>A greater than B!</h1>
</util:if>

and

<xsp:logic>
<[CDATA[
if(a>b){
]]>
</xsp:logic>
   <h1>A greater than B!</h1>
<xsp:logic>
}
</xsp:logic>


Zvi

"Kevin A. Burton" wrote:

> Zvi wrote:
> >
> > Hi,
> >
> > I wrote XSP taglib like <xsl:for-each>, <xsl:if>, <xsl:case>,
> > <xsl:when>, <xsl:oherwise>.
> > And I proposing to add them to Cocoon standard util:* taglib.
>
> I would say -0.
>
> Although I am sure it is awesome code.  The XSL <xsl:for-each> etc code
> is really only added because there is no XSL native language.  With XSP
> we can use Java/JavaScript/etc.  So it seems like this might just be
> redundant.
>
> KEvin
>
> --
> Kevin A Burton (burton@apache.org)
> http://relativity.yi.org
> Message to SUN:  "Please Open Source Java!"
> "For evil to win is for good men to do nothing."
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: Additions to XSP util:* taglib

Posted by "Kevin A. Burton" <bu...@relativity.yi.org>.
Zvi wrote:
> 
> Hi,
> 
> I wrote XSP taglib like <xsl:for-each>, <xsl:if>, <xsl:case>,
> <xsl:when>, <xsl:oherwise>.
> And I proposing to add them to Cocoon standard util:* taglib.

I would say -0.  

Although I am sure it is awesome code.  The XSL <xsl:for-each> etc code
is really only added because there is no XSL native language.  With XSP
we can use Java/JavaScript/etc.  So it seems like this might just be
redundant.

KEvin

-- 
Kevin A Burton (burton@apache.org)
http://relativity.yi.org
Message to SUN:  "Please Open Source Java!"
"For evil to win is for good men to do nothing."

Re: Integration with BEA WebLogic application server

Posted by Niclas Hedhman <ni...@localbar.com>.
Joshua Van Buren wrote:

> I am currently integrating Cocoon 1.7.2 with Weblogic 5.1 on Windows 2k.  I
> am running into a couple of problems with ClassCircularityError exceptions.
> It seems to be breaking at the cl.ClassLoader call in
> cocoon.framework.manager.java
>
> Has anyone seen this before?

public class A extends B
{}

public class B extends A
{}

will give you this result. That however, should be captured by the compiler,
and not in runtime unless the class hierarchy has changed between compiles of
different classes. I would believe you have naming interference between
classes, and/or versioning problems.

Niclas


Integration with BEA WebLogic application server

Posted by Joshua Van Buren <jv...@vanteon.com>.

I am currently integrating Cocoon 1.7.2 with Weblogic 5.1 on Windows 2k.  I
am running into a couple of problems with ClassCircularityError exceptions.
It seems to be breaking at the cl.ClassLoader call in
cocoon.framework.manager.java

Has anyone seen this before?

Thanks,

Josh


Integration with BEA WebLogic application server

Posted by Joshua Van Buren <jv...@vanteon.com>.

I am currently integrating Cocoon 1.7.2 with Weblogic 5.1 on Windows 2k.  I
am running into a couple of problems with ClassCircularityError exceptions.
It seems to be breaking at the cl.ClassLoader call in
cocoon.framework.manager.java

Has anyone seen this before?

Thanks,

Josh


Additions to XSP util:* taglib

Posted by Zvi <th...@ifrance.com>.
Hi,

I wrote XSP taglib like <xsl:for-each>, <xsl:if>, <xsl:case>,
<xsl:when>, <xsl:oherwise>.
And I proposing to add them to Cocoon standard util:* taglib.

What do you think, guys?

Zvi



Additions to XSP util:* taglib

Posted by Zvi <th...@ifrance.com>.
Hi,

I wrote XSP taglib like <xsl:for-each>, <xsl:if>, <xsl:case>,
<xsl:when>, <xsl:oherwise>.
And I proposing to add them to Cocoon standard util:* taglib.

What do you think, guys?

Zvi



Re: Live sites with Cocoon? again

Posted by Uli Mayring <ul...@denic.de>.
On Sun, 30 Apr 2000, Stefano Mazzocchi wrote:

> > > C'mon, guys, it's already there :)
> >
> > Care to document it? ;-)
> 
> Care to take a look at cocoon.properties? :-)

Oops sorry.. please hit me hard and repeatedly over the head with the
cocoon documentation. Hmm.. strange.. doesn't seem to hurt much, maybe
it's too small *evilgrin*

Well, I really hope we see 1.7.3 soon because of the many new samples that
have been reported ;-)

Ulrich

-- 
Ulrich Mayring
DENIC eG, Softwareentwicklung


Re: Live sites with Cocoon? again

Posted by Stefano Mazzocchi <st...@apache.org>.
Uli Mayring wrote:
> 
> "X-Ncc-RegID: de.denic"
> MIME-Version: 1.0
> Content-Type: TEXT/PLAIN; charset=US-ASCII
> X-Spam-Rating: locus.apache.org 1.6.2 0/1000/N
> 
> On Fri, 28 Apr 2000, Stefano Mazzocchi wrote:
> 
> > > unavailable document. Someone proposed this a while back, I'm not sure if
> > > code ever made it in or not. It would be worthwhile if it hasn't been
> > > written yet.
> >
> > Patch?
> >
> > C'mon, guys, it's already there :)
> 
> Care to document it? ;-)

Care to take a look at cocoon.properties? :-)

No, you're right, but I don't have time to write docs, that's the
problem.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Re: XSP problem

Posted by Ulrich Mayring <ul...@denic.de>.
sudhi wrote:
> 
> If I change the name to resultp.xsl, then I see them in the code. Thats
> why it was complaining no style sheet found. This is a strange behaviour
> (Is it b'cos it has xsp in it ?)

Yeah, I think I had something like that, once.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: XSP problem

Posted by sudhi <su...@planet.net>.
I tried these things,
For the dynamically generated xml page, i applied a simple stylesheet(no
xsp in it). It works perfectly fine and very fast.
When I change the stylesheet to another stylesheet which has xsp in it,
there starts the problem.

I also did another thing, I displayed the dynamically generated xml, and
stored it in a file, Then applied the stylesheet which has xsp in it. It
worked fine.

The only problem I am seeing now is whenever both xml and xsl has xsp in
them, the problem starts.

~S

Re: XSP problem

Posted by Ulrich Mayring <ul...@denic.de>.
sudhi wrote:
> 
> Its a simple page, i am executing one query, and the result set has max
> 30 elements. But its taking lot of time and I was not able to display
> the page, my browser times out :-(

You should do two things:

1.) comment out the reference to the stylesheet in your XML/XSP file
(that will send the XML unchanged to your browser, which will display an
empty page, but you can view the page source and see everything)

2.) increase the timeout of JServ in jserv.conf

Once you see the unadulterated XML you'll find the error quickly.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: XSP problem

Posted by Ulrich Mayring <ul...@denic.de>.
sudhi wrote:
> 
> The style sheet used "result-xsp.xsl" also has XSP in it. Basically
> which transforms this xml into another xml.
> 
> which looks like this
> 
> ----------------------------------------------------------------------------------
> 
> <?xml version='1.0'?>
> <xsl:stylesheet version="1.0"
>        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> >
> <xsl:template match="PAGE">
>   <xsl:processing-instruction
> name="cocoon-process">type="xslt"</xsl:processing-instruction><xsl:processing-instruction name="xml-stylesheet">href="result.xsl"
> type="text/xsl"</xsl:processing-instruction>        <xsl:copy>
>           <xsl:apply-templates/>
>         </xsl:copy>
> 
> </xsl:template>
> 
> <xsl:template match="*|@*|text()">
>  <xsl:copy-of select="."/>
> </xsl:template>
> </xsl:stylesheet>

This is definetely not an XSP, there is no XSP namespace declaration, no
<xsp:page> etc.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: XSP problem

Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 19 May 2000, Ulrich Mayring wrote:

> Stefano Mazzocchi wrote:
> > 
> > Why don't you use XInclude?
> 
> Because it was nowhere announced that cocoon supports it? :)

Hrm, stefano beat me to all the suggestions today. I guess that's what I
get for waiting until 11:30pm to go through my mailing list mail. Yeah, I
threw together a minimal XInclude processor a week or two ago and
submitted it. I probably only made the announcement to the dev list (and
forgot to put it in changes.xml, shame on me). Please give it a whirl, I'd
like to know how useful people find both it and XInclude in general.

- donald


Re: XSP problem

Posted by Ulrich Mayring <ul...@denic.de>.
Stefano Mazzocchi wrote:
> 
> Why don't you use XInclude?

Because it was nowhere announced that cocoon supports it? :)

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: XSP problem

Posted by Ulrich Mayring <ul...@denic.de>.
Jeremy Quinn wrote:
> 

[lots, and that just before I wanted to go home ;-]

> A Form TagLib would want to make use of a wide range of I/O TagLibs to read
> and write data; SQL, File, EMail, LDAP, FTP?, XML/RPC?, RMI?; the author
> would just use the one that makes the connection they want to make.

Wow, great vision.

> The difference between using an XInclude TagLib and the util:include...
> TagLib is that XInclude supports including document fragments using
> XPointer, it that correct? Are there other differences?

That's as far as I got as well. One difference is that XInclude uses
only URLs to locate a file (sensible), while <util:include-file> can
theoretically leave the document root.

> Would it make more sense to add write functionality to to the XInclude
> TagLib, muddying the waters?

It's hairy due to the XInclude processor being an implementation of the
XInclude W3C spec. I don't think W3C-compliance should be sacrificed.

> Or would it be better to start again with a full read/write XPointer savvy
> FileTagLib in parallel to the read/write functionality in the SQLTagLib?

What read/write functionality in the SQLTagLib are you referring to? I
think we should have a generic I/O taglib, that could receive an XPath
expression and move that data to wherever. For reading that data the
XInclude processor could be employed, for writing it we need something
else.

> Or write a FileWriteWithXPointer/util:save TagLib to complement
> XInclude/util:include?

Ummm... what? :)

> How important is the ability to read and write document fragments using
> XPointer in a Form Handling TagLib?

Can't say. I guess you don't absolutely need doc fragments, you can
always write to a temporary file and rename later. But that's not very
clean.

> I think the Form TagLib would need it's own way of defining how to modify a
> fragment in an existing document/query. I don't see that getting the whole
> document to work with instead of a fragment using XPointer makes much
> difference, all the data still has to be parsed. No?

ermm... I'm in high waters here... :)

Basically, for serialization we can use the Xerces serializers as shown
in Donald's XMLForm. Perhaps it would be enough to have a serialization
taglib, instead of a generic I/O taglib.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: XSP problem

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
On 23/5/00 at 9:55 am, ulim@denic.de (Ulrich Mayring) wrote:

>Donald Ball wrote:
>> 
>> Hmm. Logically speaking, your idea makes perfect sense, though I wonder
>> how efficient an XML file editor that worked like this would be... don't
>
>I think for applications, where you read the document 9 times and write
>it only one time, it would be sufficient. The Xerces serializers, that
>XMLForm uses, are also very sluggish when saving data.
>
>> care too much, myself, i'm more interested in working code than efficient
>> code. I wonder how this would tie into Jeremy's form taglib stuff...
>
>I didn't know Jeremy was onto that. But I always suspected he rules :)

I suspect not :) I am largly in the dark about how to actually implement this stuff, it's all I can manage at the moment to try and work out what it should be.

>But strictly speaking Forms and Include/Outclude are two different
>things. Forms provide a GUI for dealing with XML data - and there are
>many important things that a Form taglib could do. However, I think it
>should not read and write XML data, just as I/O should not model a user
>interface.
>
>Very frequently you need I/O without forms - any place where you've been
>using <util:include-uri> or <util:include-file>.
>
>And also very frequently you need forms without I/O (e.g. database query
>forms).

+1

A Form TagLib would need to serialise modified Document objects to XML files on disk, the same as other applications and TagLibs. It makes sense to seperate out this functionality rater than incorporate it into the Form TagLib as would have been the case.

A Form TagLib would want to make use of a wide range of I/O TagLibs to read and write data; SQL, File, EMail, LDAP, FTP?, XML/RPC?, RMI?; the author would just use the one that makes the connection they want to make.

The difference between using an XInclude TagLib and the util:include... TagLib is that XInclude supports including document fragments using XPointer, it that correct? Are there other differences?

Would it make more sense to add write functionality to to the XInclude TagLib, muddying the waters?

Or would it be better to start again with a full read/write XPointer savvy FileTagLib in parallel to the read/write functionality in the SQLTagLib?

Or write a FileWriteWithXPointer/util:save TagLib to complement XInclude/util:include?

How important is the ability to read and write document fragments using XPointer in a Form Handling TagLib? 

This ability won't be available from a Form TagLib for users of SQL (etc.) I/O will it?

I think the Form TagLib would need it's own way of defining how to modify a fragment in an existing document/query. I don't see that getting the whole document to work with instead of a fragment using XPointer makes much difference, all the data still has to be parsed. No?



reagrds Jeremy

      ____________________________________________________________________

      Jeremy Quinn                                             media.demon
                                                           webSpace Design
     <ma...@media.demon.co.uk>       <http://www.media.demon.co.uk>
      <phone:+44.[0].20.7737.6831>          <pa...@sms.genie.co.uk>



Re: XSP problem

Posted by Ulrich Mayring <ul...@denic.de>.
Donald Ball wrote:
> 
> Hmm. Logically speaking, your idea makes perfect sense, though I wonder
> how efficient an XML file editor that worked like this would be... don't

I think for applications, where you read the document 9 times and write
it only one time, it would be sufficient. The Xerces serializers, that
XMLForm uses, are also very sluggish when saving data.

> care too much, myself, i'm more interested in working code than efficient
> code. I wonder how this would tie into Jeremy's form taglib stuff...

I didn't know Jeremy was onto that. But I always suspected he rules :)

But strictly speaking Forms and Include/Outclude are two different
things. Forms provide a GUI for dealing with XML data - and there are
many important things that a Form taglib could do. However, I think it
should not read and write XML data, just as I/O should not model a user
interface.

Very frequently you need I/O without forms - any place where you've been
using <util:include-uri> or <util:include-file>.

And also very frequently you need forms without I/O (e.g. database query
forms).

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: XSP problem

Posted by Ulrich Mayring <ul...@denic.de>.
Jeremy Quinn wrote:
> 
> But please, just don't call it "outclude" :-p  <yeck! phht! bleh!>

Sorry, I'm just following the model the W3C set with XInclude ;-)

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: XSP problem

Posted by Donald Ball <ba...@webslingerZ.com>.
On Tue, 23 May 2000, Jeremy Quinn wrote:

> On 22/5/00 at 1:43 pm, balld@webslingerZ.com (Donald Ball) wrote:
> 
> >Hmm. Logically speaking, your idea makes perfect sense, though I wonder
> >how efficient an XML file editor that worked like this would be... don't
> >care too much, myself, i'm more interested in working code than efficient
> >code. I wonder how this would tie into Jeremy's form taglib stuff...
> 
> It could tie in very nicely.
> 
> It would make sense in this context to have a writing counterpart to
> XInclude.
> 
> I hope to abstract the form taglib, so that any I/O TagLib (SQL, LDAP,
> file, etc.) can be dropped in to handle whichever data source you need
> to read or write.

If you're getting this complex, you would do well to examine castor
(http://castor.exolab.org/) for inspiration. I think you'll find that it
makes some things very easy. I am using it for my new database editor
package.

- donald


Re: XSP problem

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
On 22/5/00 at 1:43 pm, balld@webslingerZ.com (Donald Ball) wrote:

>Hmm. Logically speaking, your idea makes perfect sense, though I wonder
>how efficient an XML file editor that worked like this would be... don't
>care too much, myself, i'm more interested in working code than efficient
>code. I wonder how this would tie into Jeremy's form taglib stuff...

It could tie in very nicely.

It would make sense in this context to have a writing counterpart to XInclude.

I hope to abstract the form taglib, so that any I/O TagLib (SQL, LDAP, file, etc.) can be dropped in to handle whichever data source you need to read or write.


But please, just don't call it "outclude" :-p  <yeck! phht! bleh!>


regards Jeremy

      ____________________________________________________________________

      Jeremy Quinn                                             media.demon
                                                           webSpace Design
     <ma...@media.demon.co.uk>       <http://www.media.demon.co.uk>
      <phone:+44.[0].20.7737.6831>          <pa...@sms.genie.co.uk>



Re: XSP problem

Posted by Donald Ball <ba...@webslingerZ.com>.
On Mon, 22 May 2000, Ulrich Mayring wrote:

> Donald Ball wrote:
> > 
> > Sorry, yeah, look in the /samples/xinclude directory in CVS. I'd meant to
> > check 'em in a while back. A zip is attached for those without CVS. Oh,
> > yeah, you'll need to edit your cocoon.properties file and add this line:
> 
> Ok, I got it. It looks like I can specify what to include with an XPath
> expression - this is of course pretty powerful and I see no reason why
> it shouldn't solve the SQL taglib connection data inclusion problem.
> 
> This has set me off on another track, however: As it stands the XInclude
> processor does half of what XMLForm does, i.e. I can specify an XPath
> expression and whatever it selects is sent to another XML document for
> further manipulation. For taking that data and putting it into edit
> fields on an HTML form I don't strictly need XMLForm, I can write a
> taglib for that. So there's just one piece of the puzzle missing and
> that's writing out the changed XML. Perhaps we'd need an XOutclude
> processor (yeah, stupid name, but there it is ;-)  This processor takes
> an XPath expression and writes what it selects to a new file. We don't
> need to replace data in an existing file, like XMLForm does, because
> with XOutclude and XInclude we could do everything we want:
> 
> <xoutclude:outclude parse="xml" href="newfoo.xml#xpointer(//message)">
> 	<xinclude:include parse="xml"
> href="tmpfoo.xml#xpointer(//message[id='3'])"/>
> 	<xinclude:include parse="xml"
> href="oldfoo.xml#xpointer(//message[not(id='3')])"/>
> </xoutclude:outclude>
> 
> This example means that the user changed the message with ID 3 and in
> the first step these changes are written to a tmpfoo.xml. In the example
> above you can see that from tmpfoo.xml it is selected and written to
> newfoo.xml, whereas all unchanged messages (those with ID != 3) are
> taken from oldfoo.xml and added to newfoo.xml. We could add another
> option to rename newfoo.xml to oldfoo.xml at the end.
> 
> Perhaps the whole thing could also be encapsulated in a taglib and use
> xinclude/xoutclude only internally.

Hmm. Logically speaking, your idea makes perfect sense, though I wonder
how efficient an XML file editor that worked like this would be... don't
care too much, myself, i'm more interested in working code than efficient
code. I wonder how this would tie into Jeremy's form taglib stuff...

- donald


Re: XSP problem

Posted by Ulrich Mayring <ul...@denic.de>.
Donald Ball wrote:
> 
> Sorry, yeah, look in the /samples/xinclude directory in CVS. I'd meant to
> check 'em in a while back. A zip is attached for those without CVS. Oh,
> yeah, you'll need to edit your cocoon.properties file and add this line:

Ok, I got it. It looks like I can specify what to include with an XPath
expression - this is of course pretty powerful and I see no reason why
it shouldn't solve the SQL taglib connection data inclusion problem.

This has set me off on another track, however: As it stands the XInclude
processor does half of what XMLForm does, i.e. I can specify an XPath
expression and whatever it selects is sent to another XML document for
further manipulation. For taking that data and putting it into edit
fields on an HTML form I don't strictly need XMLForm, I can write a
taglib for that. So there's just one piece of the puzzle missing and
that's writing out the changed XML. Perhaps we'd need an XOutclude
processor (yeah, stupid name, but there it is ;-)  This processor takes
an XPath expression and writes what it selects to a new file. We don't
need to replace data in an existing file, like XMLForm does, because
with XOutclude and XInclude we could do everything we want:

<xoutclude:outclude parse="xml" href="newfoo.xml#xpointer(//message)">
	<xinclude:include parse="xml"
href="tmpfoo.xml#xpointer(//message[id='3'])"/>
	<xinclude:include parse="xml"
href="oldfoo.xml#xpointer(//message[not(id='3')])"/>
</xoutclude:outclude>

This example means that the user changed the message with ID 3 and in
the first step these changes are written to a tmpfoo.xml. In the example
above you can see that from tmpfoo.xml it is selected and written to
newfoo.xml, whereas all unchanged messages (those with ID != 3) are
taken from oldfoo.xml and added to newfoo.xml. We could add another
option to rename newfoo.xml to oldfoo.xml at the end.

Perhaps the whole thing could also be encapsulated in a taglib and use
xinclude/xoutclude only internally.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: XSP problem

Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 19 May 2000, Jeremy Quinn wrote:

> On 19/5/00 at 2:54 pm, stefano@apache.org (Stefano Mazzocchi) wrote:
> 
> >Why don't you use XInclude?
> 
> Has anyone got any examples?
> 
> cheers
> 
> Jeremy

Sorry, yeah, look in the /samples/xinclude directory in CVS. I'd meant to
check 'em in a while back. A zip is attached for those without CVS. Oh,
yeah, you'll need to edit your cocoon.properties file and add this line:

processor.type.xinclude = org.apache.cocoon.processor.xinclude.XIncludeProcessor

- donald

Re: XSP problem

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
On 19/5/00 at 2:54 pm, stefano@apache.org (Stefano Mazzocchi) wrote:

>Why don't you use XInclude?

Has anyone got any examples?

cheers

Jeremy

      ____________________________________________________________________

      Jeremy Quinn                                             media.demon
                                                           webSpace Design
     <ma...@media.demon.co.uk>       <http://www.media.demon.co.uk>
      <phone:+44.[0].207.737.6831>          <pa...@sms.genie.co.uk>




Re: XSP problem

Posted by Stefano Mazzocchi <st...@apache.org>.
Ulrich Mayring wrote:
> 
> Kevin Sonney wrote:
> >
> > Ah-ha. This uses XSP then calls the SQL Processor. Why not use the SQL
> > TagLib instead :
> 
> [deleted convoluted query syntax]
> 
> Perhaps I'm dumb and don't see the light, but the sql taglib is too
> verbose to be useful for me. I have many, many queries in many, many XML
> files. With the SQL Processor I just define my connection parameters
> once and re-use them for every query. With the SQL taglib the code
> becomes unmaintainable - what if the database user changes or the
> password or ... ? I have to edit every query in every XML file I have.
> Folks: this was yesterday, today is cocoon :)

Why don't you use XInclude?
 
> With the SQLProcessor I can have one connection.xml file and that gets
> included in every XML page that has queries. That also means I can give
> my files to other users to edit, because they contain no
> username/password for the database.

See above.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Re: XSP problem

Posted by Ulrich Mayring <ul...@denic.de>.
Rob Parker wrote:
> 
> Agree - so does this mean you need to define your own cutom tag where
> you specify just the dynamic parts of your SQL, ie the query and a
> stylesheet
> to fill in the static parts, ie, user/password etc etc.

Basically I want just placeholders in my XML and store their values
centrally in one place. The SQLProcessor does this nicely.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: XSP problem

Posted by Donald Ball <ba...@webslingerZ.com>.
On Mon, 22 May 2000, Ulrich Mayring wrote:

> Donald Ball wrote:
> > 
> > Again - can you give me a good reason why you couldn't use the XInclude
> > processor to give you this? Note I may well be overruled here, but I'd
> > like you to at least give it a shot...
> 
> Yes, the good reason is: I don't know how to use this thing and I don't
> know where to find docs.

docs, docs - the XInclude working draft is here

http://www.w3.org/TR/xinclude

I have some samples in cocoon CVS (maybe in 1.7.4, can't remember) -
samples/xinclude/*

- donald


Re: XSP problem

Posted by Ulrich Mayring <ul...@denic.de>.
Donald Ball wrote:
> 
> Again - can you give me a good reason why you couldn't use the XInclude
> processor to give you this? Note I may well be overruled here, but I'd
> like you to at least give it a shot...

Yes, the good reason is: I don't know how to use this thing and I don't
know where to find docs.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: XSP problem

Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 19 May 2000, Rob Parker wrote:

> ----- Original Message -----
> From: Ulrich Mayring <ul...@denic.de>
> >
> > Perhaps I'm dumb and don't see the light, but the sql taglib is too
> > verbose to be useful for me. I have many, many queries in many, many XML
> > files. With the SQL Processor I just define my connection parameters
> > once and re-use them for every query. With the SQL taglib the code
> > becomes unmaintainable - what if the database user changes or the
> > password or ... ? I have to edit every query in every XML file I have.
> > Folks: this was yesterday, today is cocoon :)
> >
> Agree - so does this mean you need to define your own cutom tag where
> you specify just the dynamic parts of your SQL, ie the query and a
> stylesheet
> to fill in the static parts, ie, user/password etc etc.

Again - can you give me a good reason why you couldn't use the XInclude
processor to give you this? Note I may well be overruled here, but I'd
like you to at least give it a shot...

- donald


Re: XSP problem

Posted by Rob Parker <ro...@webcybernetics.com>.
----- Original Message -----
From: Ulrich Mayring <ul...@denic.de>
>
> Perhaps I'm dumb and don't see the light, but the sql taglib is too
> verbose to be useful for me. I have many, many queries in many, many XML
> files. With the SQL Processor I just define my connection parameters
> once and re-use them for every query. With the SQL taglib the code
> becomes unmaintainable - what if the database user changes or the
> password or ... ? I have to edit every query in every XML file I have.
> Folks: this was yesterday, today is cocoon :)
>
Agree - so does this mean you need to define your own cutom tag where
you specify just the dynamic parts of your SQL, ie the query and a
stylesheet
to fill in the static parts, ie, user/password etc etc.



Re: XSP problem

Posted by Donald Ball <ba...@webslingerZ.com>.
On Mon, 22 May 2000, Ulrich Mayring wrote:

> Donald Ball wrote:
> > 
> > Can you try out the XInclude processor and see if the functionality it
> > gives you is good enough for your purposes?
> 
> I'd love to, what is it? Where can I find it?

org.apache.cocoon.processor.xinclude.XIncludeProcessor. Just add this line
to your cocoon.properties file:

processor.type.xinclude = org.apache.cocoon.processor.xinclude.XIncludeProcessor

and give it a whirl.

- donald


Re: XSP problem

Posted by Ulrich Mayring <ul...@denic.de>.
Donald Ball wrote:
> 
> Can you try out the XInclude processor and see if the functionality it
> gives you is good enough for your purposes?

I'd love to, what is it? Where can I find it?

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: XSP problem

Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 19 May 2000, Ulrich Mayring wrote:

> Kevin Sonney wrote:
> > 
> > Ah-ha. This uses XSP then calls the SQL Processor. Why not use the SQL
> > TagLib instead :
> 
> [deleted convoluted query syntax]
> 
> Perhaps I'm dumb and don't see the light, but the sql taglib is too
> verbose to be useful for me. I have many, many queries in many, many XML
> files. With the SQL Processor I just define my connection parameters
> once and re-use them for every query. With the SQL taglib the code
> becomes unmaintainable - what if the database user changes or the
> password or ... ? I have to edit every query in every XML file I have.
> Folks: this was yesterday, today is cocoon :)
> 
> With the SQLProcessor I can have one connection.xml file and that gets
> included in every XML page that has queries. That also means I can give
> my files to other users to edit, because they contain no
> username/password for the database.

Can you try out the XInclude processor and see if the functionality it
gives you is good enough for your purposes?

- donald


Re: XSP problem

Posted by Ulrich Mayring <ul...@denic.de>.
Kevin Sonney wrote:
> 
> Ah-ha. This uses XSP then calls the SQL Processor. Why not use the SQL
> TagLib instead :

[deleted convoluted query syntax]

Perhaps I'm dumb and don't see the light, but the sql taglib is too
verbose to be useful for me. I have many, many queries in many, many XML
files. With the SQL Processor I just define my connection parameters
once and re-use them for every query. With the SQL taglib the code
becomes unmaintainable - what if the database user changes or the
password or ... ? I have to edit every query in every XML file I have.
Folks: this was yesterday, today is cocoon :)

With the SQLProcessor I can have one connection.xml file and that gets
included in every XML page that has queries. That also means I can give
my files to other users to edit, because they contain no
username/password for the database.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: XSP problem

Posted by sudhi <su...@planet.net>.
> *SNIP*
> 
> Ah-ha. This uses XSP then calls the SQL Processor. Why not use the SQL
> TagLib instead :
> 

I changed all cocoon PI orders.

> 
> The last stylesheet didn't have anything xsp in it, just regular XSLT. You
> cannot run a second XSP pass on a single document. I wish you could,
> some days, but...
> 

Yeah, the style sheet dont have any xsp in it. That was just a test xsl.

When I first posted this question , that was what I was asking. Can I
run a sesconf XSP pass on a single document.

Thanks for the help 
:-(
~S

Re: XSP problem

Posted by Kevin Sonney <ke...@webslingerz.com>.
On Thu, 18 May 2000, sudhi wrote:
> Here is the snippet
> 
> I have an xml page (result.xml), part of it is generated by xsp.
> here is the snippet..
> ----------------------------------------------------------------------------------
> 
> <?xml version="1.0" standalone="no"?>
> <?cocoon-process type="xsp"?>
> <?cocoon-process type="sql"?>
> <?cocoon-process type="xslt"?>
*SNIP*

Ah-ha. This uses XSP then calls the SQL Processor. Why not use the SQL
TagLib instead :

------- begin Doc ---------
<?xml version="1.0" standalone="no"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="result-xsp.xsl" type="text/xsl"?>

<xsp:page 
language="java"
xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns:sql="http://www.apache.org/1999/SQL"
>

<PAGE>
   <TITLE>Search result</TITLE>
   <CONTENT>
   <xsp:logic>
     ... build the sql query dynamically based on some criteria ....
   </xsp:logic>
   <sql:execute-query>
	<sql:max-rows>10</sql:max-rows>
	<sql:update-rows-attribute>updated</sql:update-rows-attribute>
	<sql:driver>org.jgt.mm.mysql.Driver</sql:driver>
	<sql:dburl>jdbc:mysql://servername/database</sql:dburl>
	<sql:username>username</sql:username>
	<sql:password>password</sql:password>
	<sql:skip-rows>0</sql:skip-rows>
	<sql:tag-case>lower</sql:tag-case>
	<sql:doc-element>rowset</sql:doc-element>
	<sql:row-element>row</sql:row-element>
	<sql:query><xsp:logic>...stuff...</xsp:logic></sql:query>
   </sql:execute-query>
   </CONTENT>
 </PAGE>
</xsp:page>

-------End Doc---------

The last stylesheet didn't have anything xsp in it, just regular XSLT. You
cannot run a second XSP pass on a single document. I wish you could,
some days, but...

-- 
- Kevin Sonney
  kevin@webslingerZ.com


Re: XSP problem

Posted by sudhi <su...@planet.net>.
Here is the snippet

I have an xml page (result.xml), part of it is generated by xsp.
here is the snippet..
----------------------------------------------------------------------------------

<?xml version="1.0" standalone="no"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="sql"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="result-xsp.xsl" type="text/xsl"?>

<xsp:page language="java"
xmlns:xsp="http://www.apache.org/1999/XSP/Core">

<PAGE>
 <connectiondefs>
  <connection name="foo_connection">
   <driver>org.gjt.mm.mysql.Driver</driver>
   <dburl>jdbc:mysql://my.domain.com/my_database</dburl>
   <username>user</username>
   <password>password</password>
  </connection>
 </connectiondefs> 

  <TITLE>Search result</TITLE>
  <CONTENT>
  <xsp:logic>
    ... build the sql query dynamically based on some criteria ....
  </xsp:logic>
  <query connection="foo_connection">
      <xsp:expr>query</xsp:expr> 
  </query>
  </CONTENT>
</PAGE>
</xsp:page>
----------------------------------------------------------------------------------

The style sheet used "result-xsp.xsl" also has XSP in it. Basically
which transforms this xml into another xml.

which looks like this

----------------------------------------------------------------------------------
<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:template match="PAGE">
  <xsl:processing-instruction
name="cocoon-process">type="xslt"</xsl:processing-instruction>  
  <xsl:processing-instruction name="xml-stylesheet">href="result.xsl"
type="text/xsl"</xsl:processing-instruction>  
  
        <xsl:copy>
          <xsl:apply-templates/>
        </xsl:copy> 

</xsl:template>

<xsl:template match="*|@*|text()">
 <xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>
----------------------------------------------------------------------------------

~S

Re: XSP problem

Posted by Kevin Sonney <ke...@webslingerz.com>.
On Thu, 18 May 2000, sudhi wrote:
> > I usually see this when I'm executing a *LOT* of queries in a single page,
> > or I'm gettin a lot of results back from the server. Especially if I'm
> > apssing dynamic data to the xsp sheet.
> 
> Its a simple page, i am executing one query, and the result set has max
> 30 elements. But its taking lot of time and I was not able to display
> the page, my browser times out :-(

Hmm. Can you show us a sample of the code? usernames and passwords changed
to protect the innocent, of course *grin*.

-- 
- Kevin Sonney
  kevin@webslingerZ.com


Re: XSP problem

Posted by sudhi <su...@planet.net>.
> 
> I usually see this when I'm executing a *LOT* of queries in a single page,
> or I'm gettin a lot of results back from the server. Especially if I'm
> apssing dynamic data to the xsp sheet.
> 

Its a simple page, i am executing one query, and the result set has max
30 elements. But its taking lot of time and I was not able to display
the page, my browser times out :-(


~S

Re: XSP problem

Posted by Kevin Sonney <ke...@webslingerz.com>.
On Thu, 18 May 2000, sudhi wrote:
> Yeah...
> I have the same root element in both of them. 
> One more thing was, the first xsl stylesheet name was result-xsp.xsl. If
> I have this style sheet inserted into the document, i dont see these
> lines in the converted java file.
> -----------------------------
> document.appendChild(
>             document.createProcessingInstruction(
>               "xml-stylesheet",
>               "href=\"resultp.xsl\" type=\"text/xsl\""
>             )
>           );
>         
> -------------------------------------------------
> 
> If I change the name to resultp.xsl, then I see them in the code. Thats
> why it was complaining no style sheet found. This is a strange behaviour
> (Is it b'cos it has xsp in it ?)

That's weird. I ahve no idea.

> When i change this, it wont complain but it takes too long to get the
> result back. Most of the time the browser times out.

I usually see this when I'm executing a *LOT* of queries in a single page,
or I'm gettin a lot of results back from the server. Especially if I'm
apssing dynamic data to the xsp sheet.  

-- 
- Kevin Sonney
  kevin@webslingerZ.com


Re: XSP problem

Posted by sudhi <su...@planet.net>.
Yeah...
I have the same root element in both of them. 
One more thing was, the first xsl stylesheet name was result-xsp.xsl. If
I have this style sheet inserted into the document, i dont see these
lines in the converted java file.
-----------------------------
document.appendChild(
            document.createProcessingInstruction(
              "xml-stylesheet",
              "href=\"resultp.xsl\" type=\"text/xsl\""
            )
          );
        
-------------------------------------------------

If I change the name to resultp.xsl, then I see them in the code. Thats
why it was complaining no style sheet found. This is a strange behaviour
(Is it b'cos it has xsp in it ?)

When i change this, it wont complain but it takes too long to get the
result back. Most of the time the browser times out.

So strange :-(

~S

Re: XSP problem

Posted by Ulrich Mayring <ul...@denic.de>.
sudhi wrote:
> 
> If my PI's are wrong how does it works fine for a static xml file.
> Can I use xsp in both xml and xsl at the same time ?

Yes, you can use XSP in an XSL stylesheet as well.

One other thing that comes to my mind is: do you have a single root
element in the XSP page and in the page you create from your XSP page?

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: XSP problem

Posted by sudhi <su...@planet.net>.
If my PI's are wrong how does it works fine for a static xml file.
Can I use xsp in both xml and xsl at the same time ?

Ulrich Mayring wrote:
> 
> sudhi wrote:
> >
> > But when i try to view this, I get an error message saying that
> > " Could not associate stylesheet to document:  no matching stylesheet
> > for: netscape "
> >
> > What am I doing wrong here ?
> 
> This means there is a problem with your PIs, it has nothing to do with
> XSLT templates or XSP code.
> 
> Ulrich
> 
> --
> Ulrich Mayring
> DENIC eG, Systementwicklung
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

Re: XSP problem

Posted by Ulrich Mayring <ul...@denic.de>.
sudhi wrote:
> 
> But when i try to view this, I get an error message saying that
> " Could not associate stylesheet to document:  no matching stylesheet
> for: netscape "
> 
> What am I doing wrong here ?

This means there is a problem with your PIs, it has nothing to do with
XSLT templates or XSP code.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

XSP problem

Posted by sudhi <su...@planet.net>.
Hi,
I don't know what I am doing is right or wrong.
Here is what I am doing.
I have an xml page (result.xml), part of it is generated by xsp.
here is the snippet..
----------------------------------------------------------------------------------

<?xml version="1.0" standalone="no"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="sql"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="result-xsp.xsl" type="text/xsl"?>

<xsp:page language="java"
xmlns:xsp="http://www.apache.org/1999/XSP/Core">

<PAGE>
 <connectiondefs>
  <connection name="foo_connection">
   <driver>org.gjt.mm.mysql.Driver</driver>
   <dburl>jdbc:mysql://my.domain.com/my_database</dburl>
   <username>user</username>
   <password>password</password>
  </connection>
 </connectiondefs> 

  <TITLE>Search result</TITLE>
  <CONTENT>
  <xsp:logic>
    ... build the sql query dynamically based on some criteria ....
  </xsp:logic>
  <query connection="foo_connection">
      <xsp:expr>query</xsp:expr> 
  </query>
  </CONTENT>
</PAGE>
</xsp:page>
----------------------------------------------------------------------------------

The style sheet used "result-xsp.xsl" also has XSP in it. Basically
which transforms this xml into another xml.

which looks like this

----------------------------------------------------------------------------------
<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:template match="PAGE">
  <xsl:processing-instruction
name="cocoon-process">type="xslt"</xsl:processing-instruction>  
  <xsl:processing-instruction name="xml-stylesheet">href="result.xsl"
type="text/xsl"</xsl:processing-instruction>  
  
  	<xsl:copy>
  	  <xsl:apply-templates/>
  	</xsl:copy> 

</xsl:template>

<xsl:template match="*|@*|text()">
 <xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>
----------------------------------------------------------------------------------

The stylesheet specified in the above xsl transforms xml into html.

But when i try to view this, I get an error message saying that
" Could not associate stylesheet to document:  no matching stylesheet
for: netscape "

What am I doing wrong here ?

The same thing works if I have the first document as static.

Thanks in advance for any help
~Sudhi

Re: Questions about ant (a little off topic but..)

Posted by Darryl Stoflet <ds...@calweb.com>.
Brian,

There is an Ant user manual here:
http://jakarta.apache.org/cvsweb/index.cgi/~checkout~/jakarta-ant/docs/index.html?rev=1.17&content-type=text/html
Also, when you download Ant this file is under the docs directory.
If you download the Ant sources you can even persue the build.xml file
that is used to build Ant to see a fairly complicated build file to 
learn from.
It does not take long at all to get up to speed on creating build.xml
files and it is totally extensible, if there is not a task within
Ant that does what you need you can write one yourself. For instance
we have an ejbc and ejbdeploy task to automate creating ejb jars
and deploying them to our ejb server.

/Darryl Stoflet

Brian wrote:
> 
> Hello all,
> 
>         I am a java developer and research scientist for the Human Genome
> Project at MIT. I am using JRun+Servlets+Cocoon+other apache tools to set
> up a web based tool to "view" some of the data that we generate. I have
> a need for a build tool+CVS space, where the build tool is currently up
> for grabs. Everyone is used to make, however I don't think I have to
> mention the headaches that make can cause for the java developer. I would
> like to propose ANT as our build tool of choice however, looking at the
> source it is not completely obvious how to use it! Can someone point me to
> a good overview of ANT or, lead me through making a project, project space
> and build space? Thanks in advance!
> 
>                                                 Sincerely,
> 
>                                                         Brian Gilman
> 
> ---------------------------------
> Brian Gilman
> Scientific Programmer
> WhiteHead Institute
> MIT
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org

-- 
Darryl Stoflet
http://dstoflet.calweb.com

Questions about ant (a little off topic but..)

Posted by Brian <gi...@dipswitch.penguinpowered.com>.
Hello all,

	I am a java developer and research scientist for the Human Genome
Project at MIT. I am using JRun+Servlets+Cocoon+other apache tools to set
up a web based tool to "view" some of the data that we generate. I have
a need for a build tool+CVS space, where the build tool is currently up
for grabs. Everyone is used to make, however I don't think I have to
mention the headaches that make can cause for the java developer. I would
like to propose ANT as our build tool of choice however, looking at the
source it is not completely obvious how to use it! Can someone point me to
a good overview of ANT or, lead me through making a project, project space
and build space? Thanks in advance!

						Sincerely, 

							Brian Gilman

---------------------------------
Brian Gilman		
Scientific Programmer
WhiteHead Institute 
MIT




Re: Live sites with Cocoon? again

Posted by Uli Mayring <ul...@denic.de>.
On Fri, 28 Apr 2000, Stefano Mazzocchi wrote:

> > unavailable document. Someone proposed this a while back, I'm not sure if
> > code ever made it in or not. It would be worthwhile if it hasn't been
> > written yet.
> 
> Patch?
> 
> C'mon, guys, it's already there :)

Care to document it? ;-)

Ulrich


Re: Live sites with Cocoon? again

Posted by Stefano Mazzocchi <st...@apache.org>.
Donald Ball wrote:
> 
> On Fri, 28 Apr 2000, Ulrich Mayring wrote:
> 
> > Donald Ball wrote:
> > >
> > > Maybe the default home page isn't index.xml. http://www.mtnartinst.com/
> > > works great for me.
> >
> > Of course, /index.xml doesn't exist, that's the whole point of the
> > exercise! It's a security leak and I was asking how to fix it.
> 
> Patch cocoon to have the option to issue a 404 error in response to an
> unavailable document. Someone proposed this a while back, I'm not sure if
> code ever made it in or not. It would be worthwhile if it hasn't been
> written yet.

Patch?

C'mon, guys, it's already there :)

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



Re: Live sites with Cocoon? again

Posted by Donald Ball <ba...@webslingerZ.com>.
On Fri, 28 Apr 2000, Ulrich Mayring wrote:

> Donald Ball wrote:
> > 
> > Maybe the default home page isn't index.xml. http://www.mtnartinst.com/
> > works great for me.
> 
> Of course, /index.xml doesn't exist, that's the whole point of the
> exercise! It's a security leak and I was asking how to fix it.

Patch cocoon to have the option to issue a 404 error in response to an
unavailable document. Someone proposed this a while back, I'm not sure if
code ever made it in or not. It would be worthwhile if it hasn't been
written yet.

- donald


Re: Live sites with Cocoon? again

Posted by Ulrich Mayring <ul...@denic.de>.
Donald Ball wrote:
> 
> Maybe the default home page isn't index.xml. http://www.mtnartinst.com/
> works great for me.

Of course, /index.xml doesn't exist, that's the whole point of the
exercise! It's a security leak and I was asking how to fix it.

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung

Re: Live sites with Cocoon? again

Posted by Stefano Mazzocchi <st...@apache.org>.
JJD wrote:
> 
> Hi S. Mazzocchi: FMY (for my information) Can a file not be a resource? JJD

Totally.

URI link to resources (hence the name). Some resources are mapped by the
web serving enviornment to files on file systems, some don't. Also, some
files become resources if not modified (static web pages), others
partecipate in the creation of a resource thru dynamic alteration
(server side include and general template systems), others partecipate
in the creation of a resource as parameters for runtime interpretation
(scripted pages such as ASP or PHP), others partecipate in the creation
of a resource as instructions to a compiler that generates binary code
that is executed at runtime to generate a resource (compiled server
pages).

In Cocoon we mix all of these and apply even more: the idea of multiple
transformations and pipelines of resource-creating components.

Every file that is somewhat altered by the serving enviornment is not a
resource by itself, but it becomes one when served and mapped to a
particular URI request. Note, also, that a file (think about a
stylesheet) can participate in the creation of many different resources.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------


RE: Live sites with Cocoon? again

Posted by JJD <jj...@home.com>.
Hi S. Mazzocchi: FMY (for my information) Can a file not be a resource? JJD

-----Original Message-----
From: Stefano Mazzocchi [mailto:stefano@apache.org]
Sent: Friday, April 28, 2000 5:54 AM
To: cocoon-users@xml.apache.org
Subject: Re: Live sites with Cocoon? again


JJD wrote:
> 
> You got it Donald: I didn't think about it. It does work for me also.
> 'index.xml' is out. JJD

See what happens when you think at the web as a collection of files,
instead of a collection of resources?

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



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


Re: Live sites with Cocoon? again

Posted by Stefano Mazzocchi <st...@apache.org>.
JJD wrote:
> 
> You got it Donald: I didn't think about it. It does work for me also.
> 'index.xml' is out. JJD

See what happens when you think at the web as a collection of files,
instead of a collection of resources?

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Missed us in Orlando? Make it up with ApacheCON Europe in London!
------------------------- http://ApacheCon.Com ---------------------



RE: Live sites with Cocoon? again

Posted by JJD <jj...@home.com>.
You got it Donald: I didn't think about it. It does work for me also.
'index.xml' is out. JJD

-----Original Message-----
From: Donald Ball [mailto:balld@webslingerZ.com]
Sent: Thursday, April 27, 2000 10:30 PM
To: cocoon-users@xml.apache.org
Subject: RE: Live sites with Cocoon? again


Maybe the default home page isn't index.xml. http://www.mtnartinst.com/
works great for me.

- donald

On Thu, 27 Apr 2000, JJD wrote:

> Hi Ulrich: FYI I tried to get your page
http://www.mtnartinst.com/index.xml
> and got the message below instead. I am running IE 5.00 on NT 4.0. Hope it
> helps? JJD
>
> Cocoon 1.5
>
>
>
>
> Error found handling the request.
> java.io.FileNotFoundException: /usr/local/Web/mtnart/index.xml
> 	at java.io.FileInputStream.(FileInputStream.java)
> 	at java.io.FileInputStream.(FileInputStream.java)
> 	at org.apache.cocoon.producer.FileProducer.getStream(FileProducer.java)
> 	at
>
org.apache.cocoon.producer.AbstractProducer.getDocument(AbstractProducer.jav
> a)
> 	at org.apache.cocoon.Engine.handle(Engine.java)
> 	at org.apache.cocoon.Cocoon.service(Cocoon.java)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
> 	at
> org.apache.jserv.JServConnection.processRequest(JServConnection.java:335)
> 	at org.apache.jserv.JServConnection.run(JServConnection.java:197)
> 	at java.lang.Thread.run(Thread.java)
>
>
> Warning: this page has been dynamically generated.
>
>
> Copyright (c) 1999 The Java Apache Project.
> All rights reserved
>
>
>
>
>
> -----Original Message-----
> From: ulim@mx5-e.mail.home.com [mailto:ulim@mx5-e.mail.home.com]On
> Behalf Of Ulrich Mayring
> Sent: Wednesday, April 26, 2000 10:13 AM
> To: cocoon-users@xml.apache.org
> Subject: Re: Live sites with Cocoon? again
>
>
> Tsoloane Moahloli wrote:
> >
> > We have three sites running on cocoon.
> >
> > Www.zen.co.za
> > www.randshow.co.za
> > www.mtnartinst.com
>
> Hello,
>
> try to access this page:
>
> http://www.mtnartinst.com/index.xml
>
> And tell me how to avoid giving out this information to the user :)
>
> kind regards,
>
> Ulrich
>
> --
> Ulrich Mayring
> DENIC eG, Systementwicklung
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>
>


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


RE: Live sites with Cocoon? again

Posted by Donald Ball <ba...@webslingerZ.com>.
Maybe the default home page isn't index.xml. http://www.mtnartinst.com/
works great for me.

- donald

On Thu, 27 Apr 2000, JJD wrote:

> Hi Ulrich: FYI I tried to get your page http://www.mtnartinst.com/index.xml
> and got the message below instead. I am running IE 5.00 on NT 4.0. Hope it
> helps? JJD
> 
> Cocoon 1.5
> 
> 
> 
> 
> Error found handling the request.
> java.io.FileNotFoundException: /usr/local/Web/mtnart/index.xml
> 	at java.io.FileInputStream.(FileInputStream.java)
> 	at java.io.FileInputStream.(FileInputStream.java)
> 	at org.apache.cocoon.producer.FileProducer.getStream(FileProducer.java)
> 	at
> org.apache.cocoon.producer.AbstractProducer.getDocument(AbstractProducer.jav
> a)
> 	at org.apache.cocoon.Engine.handle(Engine.java)
> 	at org.apache.cocoon.Cocoon.service(Cocoon.java)
> 	at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
> 	at
> org.apache.jserv.JServConnection.processRequest(JServConnection.java:335)
> 	at org.apache.jserv.JServConnection.run(JServConnection.java:197)
> 	at java.lang.Thread.run(Thread.java)
> 
> 
> Warning: this page has been dynamically generated.
> 
> 
> Copyright (c) 1999 The Java Apache Project.
> All rights reserved
> 
> 
> 
> 
> 
> -----Original Message-----
> From: ulim@mx5-e.mail.home.com [mailto:ulim@mx5-e.mail.home.com]On
> Behalf Of Ulrich Mayring
> Sent: Wednesday, April 26, 2000 10:13 AM
> To: cocoon-users@xml.apache.org
> Subject: Re: Live sites with Cocoon? again
> 
> 
> Tsoloane Moahloli wrote:
> >
> > We have three sites running on cocoon.
> >
> > Www.zen.co.za
> > www.randshow.co.za
> > www.mtnartinst.com
> 
> Hello,
> 
> try to access this page:
> 
> http://www.mtnartinst.com/index.xml
> 
> And tell me how to avoid giving out this information to the user :)
> 
> kind regards,
> 
> Ulrich
> 
> --
> Ulrich Mayring
> DENIC eG, Systementwicklung
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
> 
> 


RE: Live sites with Cocoon? again

Posted by JJD <jj...@home.com>.
Hi Ulrich: FYI I tried to get your page http://www.mtnartinst.com/index.xml
and got the message below instead. I am running IE 5.00 on NT 4.0. Hope it
helps? JJD

Cocoon 1.5




Error found handling the request.
java.io.FileNotFoundException: /usr/local/Web/mtnart/index.xml
	at java.io.FileInputStream.(FileInputStream.java)
	at java.io.FileInputStream.(FileInputStream.java)
	at org.apache.cocoon.producer.FileProducer.getStream(FileProducer.java)
	at
org.apache.cocoon.producer.AbstractProducer.getDocument(AbstractProducer.jav
a)
	at org.apache.cocoon.Engine.handle(Engine.java)
	at org.apache.cocoon.Cocoon.service(Cocoon.java)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:588)
	at
org.apache.jserv.JServConnection.processRequest(JServConnection.java:335)
	at org.apache.jserv.JServConnection.run(JServConnection.java:197)
	at java.lang.Thread.run(Thread.java)


Warning: this page has been dynamically generated.


Copyright (c) 1999 The Java Apache Project.
All rights reserved





-----Original Message-----
From: ulim@mx5-e.mail.home.com [mailto:ulim@mx5-e.mail.home.com]On
Behalf Of Ulrich Mayring
Sent: Wednesday, April 26, 2000 10:13 AM
To: cocoon-users@xml.apache.org
Subject: Re: Live sites with Cocoon? again


Tsoloane Moahloli wrote:
>
> We have three sites running on cocoon.
>
> Www.zen.co.za
> www.randshow.co.za
> www.mtnartinst.com

Hello,

try to access this page:

http://www.mtnartinst.com/index.xml

And tell me how to avoid giving out this information to the user :)

kind regards,

Ulrich

--
Ulrich Mayring
DENIC eG, Systementwicklung

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


Re: Live sites with Cocoon? again

Posted by Ulrich Mayring <ul...@denic.de>.
Tsoloane Moahloli wrote:
> 
> We have three sites running on cocoon.
> 
> Www.zen.co.za
> www.randshow.co.za
> www.mtnartinst.com

Hello,

try to access this page:

http://www.mtnartinst.com/index.xml

And tell me how to avoid giving out this information to the user :)

kind regards,

Ulrich

-- 
Ulrich Mayring
DENIC eG, Systementwicklung