You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Ulrich Mayring <ul...@denic.de> on 2000/02/11 17:38:48 UTC

XSP vs. DCP (very basic)

Hi folks,

the subject tells you that I have not the slightest idea what I'm
talking about :)

I have lots of XML files and prior to applying my stylesheet I would
like to dynamically add some tags to the XML file, so that I can
reference the pre-computed content from the stylesheet. Really basic
things like:

<filepath>/home/httpd/xml/myfile.xml</filepath>
<file>myfile.xml</file>
<filename>myfile</filename>
<fileextension>.xml</fileextension>

I saw that these things can be accomplished with XSP and also with DCP.
So, what do I use? I hear that DCP goes away with cocoon2, but if the
DOM also goes away, then XSP can't be the way to go, either.

In my mind there should be some standard "W3C-approved" way to interface
between the realm of XML/XSL and the realm of
{external_program_of_your_choice}. After all, as much as I like cocoon,
I don't want to "get stuck" with it, should the need arise to port my
cocoon-driven website to another development/publishing tool.

That way I could say to my boss: "Let's use cocoon for now, we can drop
it anytime, if it doesn't work, and switch to another environment. If
that supports XML/XSL and {insert_interface_standard}, of course."

Well, maybe this standard exists (JavaBeans?) and I'm just too dumb to
notice. Please help me become smarter :)

Ulrich

-- 
Ulrich Mayring
DENIC eG, software development
ulim@denic.de

Re: cocoon install question

Posted by William Kuhn <wk...@biostat.ufl.edu>.
Michele,

Awesome!  Thanks a lot for the help.

I guess I didn't understand the format of the parameter to pass.  I
tried -Xms 4000000 and other variations and I couldn't find
documentation on the java command line options.

Thanks again for the help.  I made the change to jserv.properties,
restarted apache, and cocoon registers the memory.

-Bill

Michele Bianchi wrote:
> 
> On Mon, 14 Feb 2000, William Kuhn wrote:
> 
> > In the meantime I managed to figure out that one problem was that cocoon
> > was complaining about not enough memory.  I'm running it on rh6.1.  I
> 
> i resolved the problem adding this line to jserv.properties (i use apache jserv
> 1.1)
> 
> wrapper.bin.parameters="-ms4M"
> 
> that sets 4mb to the virtual machine (1.1), if you have the 1.2 is -Xms4M
> 
> michele
> 
> -------------------------------------------------------------------------------
> michele bianchi - telcordia technologies               http://mic.aesthetica.it
> 445 south street, mcc 1d316r                                  t +1 973 829 4117
> morristown, nj 07960                                          f +1 973 829 5981

-- 
Bill Kuhn
Coordinator of Computer Applications
Division of Biostatistics
University of Florida

Re: cocoon install question

Posted by Michele Bianchi <mi...@research.telcordia.com>.
On Mon, 14 Feb 2000, William Kuhn wrote:

> In the meantime I managed to figure out that one problem was that cocoon
> was complaining about not enough memory.  I'm running it on rh6.1.  I

i resolved the problem adding this line to jserv.properties (i use apache jserv
1.1)

wrapper.bin.parameters="-ms4M"

that sets 4mb to the virtual machine (1.1), if you have the 1.2 is -Xms4M

michele

-------------------------------------------------------------------------------
michele bianchi - telcordia technologies               http://mic.aesthetica.it
445 south street, mcc 1d316r                                  t +1 973 829 4117
morristown, nj 07960                                          f +1 973 829 5981


Re: cocoon install question

Posted by William Kuhn <wk...@biostat.ufl.edu>.
Donald,

Thanks for the help.  I didn't realize that this wasn't the right
mailing list.  I guess in my mind my questions were cocoon related, but
as I got to the heart of the problems they turned out to be java and
jserv/apache related.  Another member of this list already responded
similarly with respect to my java related question.  Not that it matters
now, but I'm running sun's jdk1.2.2. :-)

Your Action/AddHandler suggestion worked perfectly.  Thanks.

Thanks for your assistance and sorry again to you and other members of
the list for introducing and irrelevant post.

-Bill
Donald Ball wrote:
> 
> On Mon, 14 Feb 2000, William Kuhn wrote:
> 
> > In the meantime I managed to figure out that one problem was that cocoon
> > was complaining about not enough memory.  I'm running it on rh6.1.  I
> > read the documentation that addressed this condition and was even more
> > confused.  It said the preferred method of solving this problem is to
> > pass command line options to the java interpreter.  I tracked down the
> > correct property in one of the jserv configuration files, but prior to
> > adding the options (-Xms and -Xmx) I figured I'd try the options on the
> > command line.  I'm not sure what units the memory are to be given in
> > (bytes, kb, or mb??) so I tried sensible options for all three with no
> > success.  What I mean by sensible is that the minimum initial (-Xms)
> > needs to be less than the max (-Xmx).  In all cases, however, I received
> > an error message that said that the minimum must be less than the
> > maximum which didn't make any sense since I had set the minimum less
> > than the maximum.
> 
> These parameters are JVM specific. You don't say in this post what JVM
> you're using, nor is this necessary the appropriate forum for such
> questions. You will almost certainly have better luck going through the
> docs for your JVM or posting to a list for your JVM. That being said,
> however, if you're using JDK-1.2.x for Linux, you can type:
> 
> java -X
> 
> for a list of nonstandard options. Likely you want something like this:
> 
> java -Xms16m -Xmx64m
> 
> minimum 16m, maximum 64m.
> 
> > So, then I tried to *increase* the memory in cocoon.properties to 2x10^6
> > (from the default of 2x10^5) and that didn't help.  Reading the
> > documentation a little further it appeared that *decreasing* this
> > setting might help get cocoon working (albeit not optimally) so I
> > dropped it to 2000.  Cocoon seemed to work then.  I'm not satisfied with
> > this approach and would like some advice on how to set up cocoon
> > properly for production use.  Any help would be appreciated.
> 
> The store.memory property apparantly is just a sanity check - it's the
> number of bytes that must be free what cocoon starts or else there's a
> good chance that we'll run out of memory at some point. I think this is an
> ugly hack, myself. Upping the maximum amount of memory allowed for your
> JVM should help.
> 
> > Okay, so now cocoon is running but when I request .xml documents my web
> > server returns the .xml file rather than passing the request to the
> > cocoon servlet.  I followed the instructions and added the ApJservAction
> > line to jserv.conf.  I saw mention on a message board that Action and
> > AddHandler could somehow be used to overcome this problem, but what I
> > read didn't give specifics.  I could use any help I can get.  The only
> > way I can run cocoon currently is to request (for example)
> > http://localhost/servlets/cocoon/somepath/somefile.xml.
> 
> in your .htaccess files:
> 
> Action cocoonparse /servlets/cocoon
> AddHandler cocoonparser .xml
> 
> That's what I use. More questions regarding this likely oughta be taken to
> the apache-jserv-users list - you'll get faster better answers. :)
> 
> - donald

-- 
Bill Kuhn
Coordinator of Computer Applications
Division of Biostatistics
University of Florida

Re: cocoon install question

Posted by Donald Ball <ba...@webslingerZ.com>.
On Mon, 14 Feb 2000, William Kuhn wrote:

> In the meantime I managed to figure out that one problem was that cocoon
> was complaining about not enough memory.  I'm running it on rh6.1.  I
> read the documentation that addressed this condition and was even more
> confused.  It said the preferred method of solving this problem is to
> pass command line options to the java interpreter.  I tracked down the
> correct property in one of the jserv configuration files, but prior to
> adding the options (-Xms and -Xmx) I figured I'd try the options on the
> command line.  I'm not sure what units the memory are to be given in
> (bytes, kb, or mb??) so I tried sensible options for all three with no
> success.  What I mean by sensible is that the minimum initial (-Xms)
> needs to be less than the max (-Xmx).  In all cases, however, I received
> an error message that said that the minimum must be less than the
> maximum which didn't make any sense since I had set the minimum less
> than the maximum.

These parameters are JVM specific. You don't say in this post what JVM
you're using, nor is this necessary the appropriate forum for such
questions. You will almost certainly have better luck going through the
docs for your JVM or posting to a list for your JVM. That being said,
however, if you're using JDK-1.2.x for Linux, you can type:

java -X

for a list of nonstandard options. Likely you want something like this:

java -Xms16m -Xmx64m

minimum 16m, maximum 64m.

> So, then I tried to *increase* the memory in cocoon.properties to 2x10^6
> (from the default of 2x10^5) and that didn't help.  Reading the
> documentation a little further it appeared that *decreasing* this
> setting might help get cocoon working (albeit not optimally) so I
> dropped it to 2000.  Cocoon seemed to work then.  I'm not satisfied with
> this approach and would like some advice on how to set up cocoon
> properly for production use.  Any help would be appreciated.

The store.memory property apparantly is just a sanity check - it's the
number of bytes that must be free what cocoon starts or else there's a
good chance that we'll run out of memory at some point. I think this is an
ugly hack, myself. Upping the maximum amount of memory allowed for your
JVM should help.

> Okay, so now cocoon is running but when I request .xml documents my web
> server returns the .xml file rather than passing the request to the
> cocoon servlet.  I followed the instructions and added the ApJservAction
> line to jserv.conf.  I saw mention on a message board that Action and
> AddHandler could somehow be used to overcome this problem, but what I
> read didn't give specifics.  I could use any help I can get.  The only
> way I can run cocoon currently is to request (for example)
> http://localhost/servlets/cocoon/somepath/somefile.xml.

in your .htaccess files:

Action cocoonparse /servlets/cocoon
AddHandler cocoonparser .xml

That's what I use. More questions regarding this likely oughta be taken to
the apache-jserv-users list - you'll get faster better answers. :)

- donald


cocoon install question

Posted by William Kuhn <wk...@biostat.ufl.edu>.
I posted some questions/problems I was having getting cocoon installed,
but never got any replies.

In the meantime I managed to figure out that one problem was that cocoon
was complaining about not enough memory.  I'm running it on rh6.1.  I
read the documentation that addressed this condition and was even more
confused.  It said the preferred method of solving this problem is to
pass command line options to the java interpreter.  I tracked down the
correct property in one of the jserv configuration files, but prior to
adding the options (-Xms and -Xmx) I figured I'd try the options on the
command line.  I'm not sure what units the memory are to be given in
(bytes, kb, or mb??) so I tried sensible options for all three with no
success.  What I mean by sensible is that the minimum initial (-Xms)
needs to be less than the max (-Xmx).  In all cases, however, I received
an error message that said that the minimum must be less than the
maximum which didn't make any sense since I had set the minimum less
than the maximum.

So, then I tried to *increase* the memory in cocoon.properties to 2x10^6
(from the default of 2x10^5) and that didn't help.  Reading the
documentation a little further it appeared that *decreasing* this
setting might help get cocoon working (albeit not optimally) so I
dropped it to 2000.  Cocoon seemed to work then.  I'm not satisfied with
this approach and would like some advice on how to set up cocoon
properly for production use.  Any help would be appreciated.

Okay, so now cocoon is running but when I request .xml documents my web
server returns the .xml file rather than passing the request to the
cocoon servlet.  I followed the instructions and added the ApJservAction
line to jserv.conf.  I saw mention on a message board that Action and
AddHandler could somehow be used to overcome this problem, but what I
read didn't give specifics.  I could use any help I can get.  The only
way I can run cocoon currently is to request (for example)
http://localhost/servlets/cocoon/somepath/somefile.xml.

I'd be very appreciative if someone could take a couple of minutes to
help me.  I think that cocoon is a powerful tool and I have several
applications for it that are on hold until I can get it working
properly.

Thanks in advance for whoever answers.

-Bill
-- 
Bill Kuhn
Coordinator of Computer Applications
Division of Biostatistics
University of Florida

Re: XML Query language

Posted by Darren Scott <ds...@bluecheese.co.uk>.
Stefano Mazzocchi wrote:
> 
> I would strongly discouradge the implementation of such a addressing
> space. URLs are contracts and they should not change nor include
> information that trigger some dynamic content processing on the server
> side.
> 

I sorta agree in principle, but then that is exactly what Cocoon does,
particularly when using the media type negotiation. Also, I can't find
the actual RFC (damn it) but I remember reading that the # part of a URL
is left open to interpretation by the server, but that it should
generally be for locating specific parts (or nodes) of the resource,
which is what I propose it be used as.

If there is an argument against it, then it would be from either a
security standpoint - i.e. a user may be able to access parts of a
document to which he/she should not be able to, although this could
easily be avoided by the author. The other argument surely should be
from a compatibility standpoint - in that because browsers choose to
interpret the # part themselves, that has become the norm.

> As far as localization goes, a getter way to do it would be to clone
> apache functionalities on this side... but you need a sitemap for
> that... which means you need Cocoon2 functionalities.
> 
> > If such support isn't already there, I'd be happy to do some
> > implementation since I think it would be a powerful feature to have -
> > the alternatives I've looked at to acheive the same effect in Cocoon
> > without querying seemed messy.
> 
> In Cocoon 1.x? Totally agreed. But once you have a sitemap in place, I
> see much better ways of doing things like these....

I don't know about sitemaps, is there more info on xml.apache.org? Can
you give me an indication of the better ways.

> At the end, more and more people think at XML as a data-storage
> facility. And XPath as a good way of replacing queries and get a hold on
> the required data. Also, some want to add Persistent-DOM capabilities to
> totally eliminate database requirements...

I think it is becoming a given that XML data storage engines like
Excelon will enventually replace RDBMS' - XPath was designed to cope
with this very fundmental shift from an orientation towards applications
to an orientation towards documents.

> Well, this is _exactly_ one scary thing about XML: it's too flexible.
> Many don't see (yet!) the problems that lay ahead.

I agree. I don't want to appear argumentative (I love a debate), but I
am unconvinced. Have you considered this issue before? What were your
conclusions? Have the W3C reconsidered their position on using XPath in
a URL (I think it was called XQL at the time).

Regards,

Darren Scott
Technical Director
bluecheese.co.uk

Re: XML Query language

Posted by Stefano Mazzocchi <st...@apache.org>.
Darren Scott wrote:
> 
> Hello members,
> 
> Glad to join the list. I've been keeping my eye on Cocoon since it's
> launch (at the time, I was formulating something similar, but dropped it
> to save replicating the good work already done by the Apache team), and
> I have just decided it's time to start to seriously look at revamping
> our content delivery model ala XSL/XML.
> 
> Cocoon's come quite a way already, and things are looking even better
> with Cocoon 2!
> 
> I have a question - does Cocoon support some sort of query language like
> XPath or XQL for selecting sub-trees of the XML source via the URL. (I
> beleive XQL was designed to be usable in the resource part of a URL).
> 
> Specifically, I have an XML doc with multiple language translations,
> which I would like to render using the same XSL document using something
> like:
> 
> http://www.something.com/index.xml#en

I would strongly discouradge the implementation of such a addressing
space. URLs are contracts and they should not change nor include
information that trigger some dynamic content processing on the server
side.

As far as localization goes, a getter way to do it would be to clone
apache functionalities on this side... but you need a sitemap for
that... which means you need Cocoon2 functionalities.

> If such support isn't already there, I'd be happy to do some
> implementation since I think it would be a powerful feature to have -
> the alternatives I've looked at to acheive the same effect in Cocoon
> without querying seemed messy.

In Cocoon 1.x? Totally agreed. But once you have a sitemap in place, I
see much better ways of doing things like these....

At the end, more and more people think at XML as a data-storage
facility. And XPath as a good way of replacing queries and get a hold on
the required data. Also, some want to add Persistent-DOM capabilities to
totally eliminate database requirements...

Well, this is _exactly_ one scary thing about XML: it's too flexible.
Many don't see (yet!) the problems that lay ahead.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------



XML Query language

Posted by Darren Scott <ds...@bluecheese.co.uk>.
Hello members,

Glad to join the list. I've been keeping my eye on Cocoon since it's
launch (at the time, I was formulating something similar, but dropped it
to save replicating the good work already done by the Apache team), and
I have just decided it's time to start to seriously look at revamping
our content delivery model ala XSL/XML.

Cocoon's come quite a way already, and things are looking even better
with Cocoon 2!

I have a question - does Cocoon support some sort of query language like
XPath or XQL for selecting sub-trees of the XML source via the URL. (I
beleive XQL was designed to be usable in the resource part of a URL).

Specifically, I have an XML doc with multiple language translations,
which I would like to render using the same XSL document using something
like:

http://www.something.com/index.xml#en

If such support isn't already there, I'd be happy to do some
implementation since I think it would be a powerful feature to have -
the alternatives I've looked at to acheive the same effect in Cocoon
without querying seemed messy.

Regards,

Darren Scott
Technical Director
bluecheese.co.uk

Re: XSP vs. DCP (very basic)

Posted by Stefano Mazzocchi <st...@apache.org>.
Ulrich Mayring wrote:
> 
> Stefano Mazzocchi wrote:
> 
> > XSP are compiled pages. The XSP pages is transformed into java code,
> > it's compiled and then executed as runtime if the XSP page doesn't
> > change in its structure. If it does, the compilation process is done
> > again.
> 
> With my example files it works differently. I have three files,
> basically snatched from the supplied XSP samples:
> 
> test.xml  <== has the content, points to test.xsp
> test.xsp  <== does XSP processing, points to test.xsl
> test.xsl  <== transforms to HTML
> 
> If I change something in my stylesheet test.xsl, then only restarting
> apache will reflect these changes. Touching any of the three files (via
> UNIX touch command) has no effect.
> 
> If I change something in test.xsp, then only touching test.xml will show
> these changes. Restarting Apache has no effect.
> 
> So, is there some black magic going on? :)

Hmmm, I'm checking right now... maybe it was broken somehow... wait a
sec..

Gosh, you're right... it's a design problem since the guy who wrote the
XSPProcessor didn't fully understand Cocoon's internal architecture and
went on his own on many things....

Anyway, I'll try to come up with a solution tonight...

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------



Re: XSP vs. DCP (very basic)

Posted by Ulrich Mayring <ul...@denic.de>.
Stefano Mazzocchi wrote:

> XSP are compiled pages. The XSP pages is transformed into java code,
> it's compiled and then executed as runtime if the XSP page doesn't
> change in its structure. If it does, the compilation process is done
> again.

With my example files it works differently. I have three files,
basically snatched from the supplied XSP samples:

test.xml  <== has the content, points to test.xsp
test.xsp  <== does XSP processing, points to test.xsl
test.xsl  <== transforms to HTML

If I change something in my stylesheet test.xsl, then only restarting
apache will reflect these changes. Touching any of the three files (via
UNIX touch command) has no effect.

If I change something in test.xsp, then only touching test.xml will show
these changes. Restarting Apache has no effect.

So, is there some black magic going on? :)

cheers,

Ulrich

-- 
Ulrich Mayring
DENIC eG, software development
ulim@denic.de

Re: Advice on XML -> PNG Image creation

Posted by Stefano Mazzocchi <st...@apache.org>.
Roberto Gilberti wrote:
> 
> Hi,
> I've modified Cocoon in order to serve image information.
> I'm not sure it is right, but I simply changed the internal handling of page
> from Writer to Stream in order to avoid changes on the byte stream.
> 
> Problems:
> .       Page contains a String
> .       Formatter.format accepts a Writer
> .       Engine.handle create a StringWriter for formatter.format
> Actions:
> .       Page contains a byte[] (methods change from String to byte[])
> .       Formatter.format accepts an OutputStream
> .       Engine.handle create a ByteArrayOutputStream for formatter.format
> .       Engine.handle get response.getOutputStream() instead of
> response.getWriter()
> 
> I've not found other components using "character" api vs. byte api, so I've
> done simple patches.

Yes, that was a know problem and we were trying to patch it for
cocoon2... anyway, send the patches in and I'll look at them. (they may
break other parts of the system).
 
> Changed this and create a ImageFormatter (based on ImagePrinter found in
> stylebook)
> Now (my) Cocoon can produce also binary content and it works fine, but I'm
> not verified if there are side effects (maybe using different encodings).

Exactly.
 
> If this is of interest, I can send the patches.

Go right ahead. Thank you.

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------



RE: Advice on XML -> PNG Image creation

Posted by Roberto Gilberti <gi...@tin.it>.
Hi,
I've modified Cocoon in order to serve image information.
I'm not sure it is right, but I simply changed the internal handling of page
from Writer to Stream in order to avoid changes on the byte stream.

Problems:
.	Page contains a String
.	Formatter.format accepts a Writer
.	Engine.handle create a StringWriter for formatter.format
Actions:
.	Page contains a byte[] (methods change from String to byte[])
.	Formatter.format accepts an OutputStream
.	Engine.handle create a ByteArrayOutputStream for formatter.format
.	Engine.handle get response.getOutputStream() instead of
response.getWriter()


I've not found other components using "character" api vs. byte api, so I've
done simple patches.

Changed this and create a ImageFormatter (based on ImagePrinter found in
stylebook)
Now (my) Cocoon can produce also binary content and it works fine, but I'm
not verified if there are side effects (maybe using different encodings).

If this is of interest, I can send the patches.



-----Original Message-----
From: dherr@badger [mailto:dherr@badger]On Behalf Of David Herring
Sent: Monday, February 14, 2000 7:36 PM
To: cocoon-users@xml.apache.org
Subject: Advice on XML -> PNG Image creation




Hello,

Has anyone any expericence or advice on transforming XML data into graphical
images (charts etc).

Obviously the Graphics2d java api can perform the image creation, but how
would one segragate this
process within a Cocoon driven system.

Thanks in advance,
David Herring



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



Advice on XML -> PNG Image creation

Posted by David Herring <da...@micromuse.com>.

Hello,

Has anyone any expericence or advice on transforming XML data into graphical
images (charts etc).

Obviously the Graphics2d java api can perform the image creation, but how
would one segragate this
process within a Cocoon driven system.

Thanks in advance,
David Herring



Re: XSP vs. DCP (very basic)

Posted by Stefano Mazzocchi <st...@apache.org>.
Ulrich Mayring wrote:
> 
> Stefano Mazzocchi wrote:
> 
> > Read the XSP spec again. XSP make absolutely no assumption on the
> > underlying XML transport, this is their unique power.
> 
> Alright, so I take it that XSP is the way to go, not DCP. This raises
> two questions about XSP:
> 
> 1) Are XSP pages cached? If yes, how does cocoon know when to recompute
> the <xsp:logic> part and when to use the cached version?

XSP are compiled pages. The XSP pages is transformed into java code,
it's compiled and then executed as runtime if the XSP page doesn't
change in its structure. If it does, the compilation process is done
again.
 
> 2) Do XSP pages have to have the .xsp extension or can they also be
> called .xml? Meaning that: how does cocoon know whether the page I'm
> requesting is an XSP or an XML page?

Depends on the presence of the <?cocoon-process type="xsp"?> PI.
 
-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------



Re: XSP vs. DCP (very basic)

Posted by Ulrich Mayring <ul...@denic.de>.
Stefano Mazzocchi wrote:

> Read the XSP spec again. XSP make absolutely no assumption on the
> underlying XML transport, this is their unique power.

Alright, so I take it that XSP is the way to go, not DCP. This raises
two questions about XSP:

1) Are XSP pages cached? If yes, how does cocoon know when to recompute
the <xsp:logic> part and when to use the cached version?

2) Do XSP pages have to have the .xsp extension or can they also be
called .xml? Meaning that: how does cocoon know whether the page I'm
requesting is an XSP or an XML page?

> Cocoon will support XSLT extentions when the Apache XSLT processor will.

Sounds good to me.

cheers,

Ulrich

-- 
Ulrich Mayring
DENIC eG, software development
ulim@denic.de

Re: XSP vs. DCP (very basic)

Posted by Stefano Mazzocchi <st...@apache.org>.
Ulrich Mayring wrote:
> 
> Hi folks,
> 
> the subject tells you that I have not the slightest idea what I'm
> talking about :)

Not only the subject :)
 
> I have lots of XML files and prior to applying my stylesheet I would
> like to dynamically add some tags to the XML file, so that I can
> reference the pre-computed content from the stylesheet. Really basic
> things like:
> 
> <filepath>/home/httpd/xml/myfile.xml</filepath>
> <file>myfile.xml</file>
> <filename>myfile</filename>
> <fileextension>.xml</fileextension>
> 
> I saw that these things can be accomplished with XSP and also with DCP.
> So, what do I use? I hear that DCP goes away with cocoon2, but if the
> DOM also goes away, then XSP can't be the way to go, either.

Read the XSP spec again. XSP make absolutely no assumption on the
underlying XML transport, this is their unique power.
 
> In my mind there should be some standard "W3C-approved" way to interface
> between the realm of XML/XSL and the realm of
> {external_program_of_your_choice}. 

There is. XSLT extentions and XSP will probably become the format to
programmatically specify them. NOTE: XSP might well be submitted for
review at W3C.

> After all, as much as I like cocoon,
> I don't want to "get stuck" with it, should the need arise to port my
> cocoon-driven website to another development/publishing tool.

I totally understand that. Unfortunately, this is brave new world and
bleeding edge technology is not yet standardized.
 
> That way I could say to my boss: "Let's use cocoon for now, we can drop
> it anytime, if it doesn't work, and switch to another environment. If
> that supports XML/XSL and {insert_interface_standard}, of course."

Cocoon will support XSLT extentions when the Apache XSLT processor will.
Not before, not after. You might want to try out Saxon and see how that
works with extentions...
 
> Well, maybe this standard exists (JavaBeans?) and I'm just too dumb to
> notice. Please help me become smarter :)

The only thing in the XML world that was standardized about dynamic
generation are XSLT extentions, but they are _not_ mandated by the spec
and very few XSLT processors really support them.

Anyway, it's up to you to decide what to do. We, from our part, provide
solutions that do their job the best way we can and try to follow open
standard whenever it's possible (and propose new ones if a hole is
found).

I can't tell you more than this :)

-- 
Stefano Mazzocchi      One must still have chaos in oneself to be
                          able to give birth to a dancing star.
<st...@apache.org>                             Friedrich Nietzsche
--------------------------------------------------------------------
 Come to the first official Apache Software Foundation Conference!  
------------------------- http://ApacheCon.Com ---------------------