Re: woody date extension

2003-06-23 Thread Bruno Dumon
On Fri, 2003-06-20 at 14:46, Frank Taffelt wrote:
> Hi,
> 
> i have a form which contains 2 fields with date entries (ex.:'17.06.2003
> 13:55'). What are the steps to get woody to:
> 
> * validate the values against a given dateformat ex. "dd.MM. HH:mm"
> * to say in a assertion rule that date2 must be greater than date1
> (date1,date2 are the formfields)
> 
> do i have to create a new Woody Datatype or a new ValidationRule for
> Datatype String ?
> 

The best way would be to create a new datatype, at least if you're
interested in getting/setting the value of that widget as a Date object.
Otherwise a validationrule for strings (e.g. a regexp-based rule) might
be sufficient.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



Re: TeX to PDF serializator

2003-06-11 Thread Bruno Dumon
On Wed, 2003-06-11 at 20:27, Alexander Schatten wrote:
> Peter Flynn wrote:
> 
> >This has come up several times before. I agree completely: many people
> >want to use LaTeX to create PDF because it does a vastly
> >better job than any of the FOP systems.
> >  
> >
> nevertheless it is imho the completly wrong attempt. because FOP is not 
> ready for primetime, you suggest to put energy to integrate a legacy 
> system, that does not fit into the XML publishing process??

What's the difference between letting fop rendering a pdf or tex
rendering a pdf? And why would it not fit within an xml publishing
process? The only thing you'd need to do is define an xml syntax for
tex, there used to be a project an ibm's alphaworks that did just that.
The serializer can then transparently transform that xml syntax to
native tex syntax, and run tex on it.

Alternatively, if I remember well, context (a tex macro package)
supports xml directly as input format.

The enegery required to do all this is a lot less (and of a different
kind) than that required to enhance fop.

[...]
> >
> I really cannot see the point. the only thing I would need is a 
> generator that 1:1 tries to move LaTeX into XML,

that's what *you* would need, not what the guy asked for. He wanted to
do the inverse.

[...]

> >  
> >
> >>The next one will ask, why Cocoon cannot create WML from powerpoint or 
> >>SVG from Postscript.

And here you are again comparing with the inverse process: it would make
sense to convert svg to postscript.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



Re: Encoding problems in flowscript

2003-06-06 Thread Bruno Dumon
On Fri, 2003-06-06 at 23:59, morten svanæs wrote:
> - Original Message -
> From: "morten svanæs" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, June 06, 2003 2:53 PM
> Subject: Re: Encoding problems in flowscript
> 
> 
> >
> > - Original Message -
> > From: "Bruno Dumon" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Friday, June 06, 2003 5:37 AM
> > Subject: Re: Encoding problems in flowscript
> >
> >
> > > On Fri, 2003-06-06 at 22:56, morten svanæs wrote:
> > > > Hi,
> > > > I'm having trouble with the enconding in a flowscript, when
> > > > I submit data in a form it gets escaped internaly in the flow
> > > > script, so if I try to get back data that has some norwegian
> > > > characters in them they get misinterpreted. All my documents
> > > > have UTF-8 enconding and headers, my serialzers in the
> > > > sitemap also have encoding parameters set to UTF-8.
> > > > My modeldata is correctly inserted into the forms, but as
> > > > soon as I submit the norwegian characters are misinterpred.
> >
> > > Have you enabled the form-encoding parameter in the web.xml?
> 
> > No, but have I tried it now and it did'nt make any difference.
> 
> Hi again, now it works ! What I did first after your answer was
> to set both  and  to utf-8
> this did not make any difference but when I commented out
>  so that just  was set it
> worked ! I should have done only what you said :)

Indeed :-) I was too lazy to type in that you shouldn't enable that one
(or if you do, it should be ISO-8859-1, because that's what it really
is, except in broken servlet containers).

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



Re: Encoding problems in flowscript

2003-06-06 Thread Bruno Dumon
On Fri, 2003-06-06 at 22:56, morten svanæs wrote:
> Hi,
> I'm having trouble with the enconding in a flowscript, when
> I submit data in a form it gets escaped internaly in the flow
> script, so if I try to get back data that has some norwegian
> characters in them they get misinterpreted. All my documents
> have UTF-8 enconding and headers, my serialzers in the
> sitemap also have encoding parameters set to UTF-8.
> My modeldata is correctly inserted into the forms, but as
> soon as I submit the norwegian characters are misinterpred.

Have you enabled the form-encoding parameter in the web.xml?

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



Re: Evaluating and working with XPointer in a Transformer

2003-06-04 Thread Bruno Dumon
On Tue, 2003-06-03 at 18:53, Stefan Pietschmann wrote:
> At the moment I'm looking for a good implementation (read: jar) that
> allows me to easily evaluate the XPointer expression, which means i
> can jump there and write the  tag around. Of course I'm thankful
> for every other tip that helps :)

I'm not aware of any. But this doesn't help of course :-)

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



Re: Again: "forgotten" namespaces problem

2003-06-03 Thread Bruno Dumon
On Mon, 2003-06-02 at 15:34, Geoff Howard wrote:
> 
> So... what I ended up doing was extending the HTMLSerializer (or whatever 
> serializer you're using for your pipelines), and overriding the 
> startPrefixMapping and endPrefixMapping methods to do nothing, effectively 
> removing all namespaces from my HTML. This also had the added benefit of 
> having no performance penalties (and theoretically, a ever-so-slight 
> speedup since we no longer process namespaces in our serializer).
> 
> 
> I have done exactly this before -- does this still work from a purely 
> technical perspective?  If so, why wouldn't we just define an 
> NoNsHTMLSerializer which extends HTMLSerializer and overrides
> just those two methods?  Then, it's a user decision whether these 
> namespaces belong
> in real-world html.

Pragmatically speaking, that will probably work.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



Re: Again: "forgotten" namespaces problem

2003-06-02 Thread Bruno Dumon
On Mon, 2003-06-02 at 14:33, Alexander Schatten wrote:
> Bruno Dumon wrote:
> 
> >Nice, but an overkill for Alexander who simply wants all namespaces to
> >be removed, which could be done streaming. And preferably immediately in
> >the serializer, instead of another transformation step. The Xalan people
> >seem not yet convinced though.
> >
> >  
> >
> Seem not convinced? HTMLserializer that generates wrong output does not 
> convince the programmer? I mean, I can understand, if there is nobody 
> who has time or the capabilities to solve this bug, but not beeing 
> convinced sounds a little strange to me.
> 

Don't tell me, tell the xalan babes:

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=19933

And read that last comment: even the W3C seems to think that HTML
documents should contain the namespaces.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



Re: Again: "forgotten" namespaces problem

2003-06-02 Thread Bruno Dumon
On Mon, 2003-06-02 at 13:14, Torsten Knodt wrote:
> On Monday 02 June 2003 09:49, Alexander Schatten wrote:
> AS> However, revisiting the problem (also watching websites others create
> AS> with Cocoon), I have to realize, that leftover namespaces are very
> AS> usual; e.g. the following: SQL, i18n, XHTML also others, that have
> AS> nothing to do with HTML specification.
> Don't know why I didn't see your first posting. But I had, like many others, 
> the same problem. I've solved by writing a NamespaceStripperTransformer, 
> which creates a DOM and removes unused namespaces. This solves the problem 
> for me. I can put it in the BTS on request. And no, I can't use SAX, because 
> I have to modify elements dependent on their childs. Details are in my 
> source.

Nice, but an overkill for Alexander who simply wants all namespaces to
be removed, which could be done streaming. And preferably immediately in
the serializer, instead of another transformation step. The Xalan people
seem not yet convinced though.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



Re: I have a problem with transformer XInclude

2003-06-02 Thread Bruno Dumon
On Sat, 2003-05-31 at 18:03, bosspring ... wrote:
[...]
> In this moment I have the information, but something is relationed
> with canciones.xml wiht a XPointer:
> 
> 
>  xlink:href="canciones.xml#xpointer(//[EMAIL PROTECTED]'1']/@canc)"/>
>  href="canciones.xml#xpointer(//[EMAIL PROTECTED]'1']/titulo)"/>
>
> 

what you write here is not xinclude, it should instead be something like
this:
 
 

with the xi prefix bound to http://www.w3.org/2001/XInclude

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



Re: Apperant Failure

2003-05-28 Thread Bruno Dumon
On Wed, 2003-05-28 at 10:11, Joerg Heinicke wrote:
> Dave Allen Barker Jr wrote:
>  > Stylesheets that use  generate a "Unable to get transformer
>  > handler" error.  Any help would be greatly appreciated!  I hope the
>  > following information is insightful.
> 
> Hello Dave,
> 
> not so long ago there was a problem with path resolving in XSLTC. AFAIK 
> it's fixed, I only don't know if it was before or after the 2.1M2 
> release. Maybe Bruno can help here.
> 

We did not upgrade xalan after the M2 release, so it seems there might
be yet another problem.

Dave, I assume you have nothing in your JAVA_HOME/jre/lib/endorsed
directory?

If so, could you create a simple reproducable testcase (and by
preference, file it as a bug in bugzilla)?

Thanks.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



Re: SAX Validation

2003-04-03 Thread Bruno Dumon
On Thu, 2003-04-03 at 17:39, [EMAIL PROTECTED] wrote:
> Hello all,
> 
> Thank's for your hints so far!
> 
> To be more detailed:
> We are looking for a SAX Validation inside the contenthandler, what means,
> right inside the SAX chain without building a dom representation (or
> something similar).

MSV can do that, it has a ContentHandler that can do validation. I've
done such things with it in the past.

I don't think Xerces can do that yet, but if you want to be sure ask
this on the xerces mailing list.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



RE: [CRASH] 2.1-Dev with HTMLGenerator & Transformer

2003-04-03 Thread Bruno Dumon
> Bruno,
> 
> I'm making a little bit of progress, but I'm still having problems getting
> the XSL to go through successfully.  The crashes and exceptions have
> stopped, but now I'm still experiencing some strangeness with XSL.  Here's
> my sitemap:

[... snipped sitemap snippet ...]
> 
> 
> And here's the XSL I'm using (pretty basic):
> 
[... snipped xsl ...]
> 
> Can you confirm this is not working correctly?  Unfortunately I'm not too
> adept at interpreting the LogTransformer's output, so I'll need to enlist
> your help for that. This isn't a matter of stupid XSL, or some other
> boneheaded oversight on my part, is it?
> 

Hmmm, actually, yes ;-)

Though it could be related with what I changed. All elements generated
by the HTMLGenerator are in the XHTML namespace, so the stylesheet
should use that namespace:


http://www.w3.org/1999/XSL/Transform";
xmlns:xhtml="http://www.w3.org/1999/xhtml";>







I don't have any previous experience with the HTMLGenerator (and
currently too lazy to try it out), but do you (or someone else) know if
previously the elements were not in the xhtml namespace? Just to know if
I broke backwards-compatibility.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



Re: Cocoon 2.1 cache

2003-04-02 Thread Bruno Dumon
On Wed, 2003-04-02 at 09:42, zze-MORY Nicolas FTRD/DMI/REN wrote:
> How can i turn off the cache under Cocoon 2.1 ? because :
> 
> 
>   
> class="org.apache.cocoon.components.pipeline.NonCachingEventPipeline"/>
> 
>   
> class="org.apache.cocoon.components.pipeline.NonCachingStreamPipeline"/>
> 
> doesn't exist under Cocoon 2.1

You can now configure this in the sitemap itself. Inside
 you should find the following (or if it's not there,
add it):


   
 
 
   On
 
 
   
 
 
 



change the default attribute from "caching" to "noncaching".
Alternatively, you can configure this on a per-pipeline level by adding
an attribute named "type" to the map:pipeline element, e.g.



-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



Re: SAX Validation

2003-04-02 Thread Bruno Dumon
On Wed, 2003-04-02 at 13:17, [EMAIL PROTECTED] wrote:
> Hello all,
> 
> Does anybody know if its possible in Java to validate SAX Events against a
> schema (or at least against a subset of w3c schema)?
> Are there any implementations available? If not, then it should be at least
> possible - shouldn´t it?
> 

Sun's MSV (Multi Schema Validator) can do that. It supports most of the
W3C schema spec. You can find it here:

http://wwws.sun.com/software/xml/developers/multischema/

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



Re: Failed to execute pipeline.: Errors in XSLT transformation

2003-04-02 Thread Bruno Dumon
On Tue, 2003-04-01 at 02:01, Don Saxton wrote:
> I have tried several xsl and after double checking each of them  I am
> stumped.
>  
> I found several zarros in  bugzilla. In mail list I have seen several
> "Failed to execute pipeline"  and a couple related to NPE, but none
> linking either to "Errors in XSLT".  Worse these other msgs don't
> indicate what solved the their problems.  
>  
> I am running 2.04 on w2k and I sure could use a clue.  All classes
> immediately surrounding the error are all cocoon. I have been
> studiously avoiding 2.1 beta chaos. Is it now time to dive in?  will
> that help?

Hey Don,

Could you maybe try to put in a log transformer before your XSL and send
the output of that as an attachment? I'm not sure but just maybe the
error is caused by some invalid SAX-events being generated.

The logtransformer can be used as follows:
  

  

and then all sax-events will be logged to the file output.txt.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



RE: [CRASH] 2.1-Dev with HTMLGenerator & Transformer

2003-04-01 Thread Bruno Dumon
On Tue, 2003-04-01 at 09:42, Tony Collen wrote:
> On Mon, 31 Mar 2003, Geoff Howard wrote:
> 
> > While you're waiting for someone who has the foggiest clue what is
> > going on (which I don't) I'd suggest two experiments:
> >
> > 1) saving the output of the output from the noaa.gov site to a local file
> > and see if that has any effect
> > 2) try increasingly less complicated xpath statements
> 
> Welp, I'm on a fresh checkout of CVS, and I'm still getting the error.  In
> response you your suggestions:
> 
> 1) I'm getting a caught NullPointerException in HTMLGenerator.generate()
> now, and the entire JVM isn't crashing.  Here's the entire stacktrace:
> 
> Original Exception: java.lang.NullPointerException
> at org.apache.xalan.xsltc.dom.DOMImpl$DOMBuilderImpl.endDocument(DOMImpl.java:3313)
> at 
> org.apache.xalan.xsltc.trax.TransformerHandlerImpl.endDocument(TransformerHandlerImpl.java:235)

I've tried out your sample, and had the same problem. After putting in a
logtransformer, I noticed that the endDocument SAX event was called
twice.

I've updated CVS to correct this behaviour.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



Re: Authentication - Accessing The Context

2003-03-31 Thread Bruno Dumon
On Mon, 2003-03-31 at 10:28, [EMAIL PROTECTED] wrote:
[...]
> 
> [NamespaceNormalizingDOMStreamer] Encountered a 
> DOM Element without a localName. DOM Level 1 trees 
> are not supported by this DOMStreamer.
> 

Update your Cocoon CVS. This has been fixed for weeks.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



Re: SourceWritingTransformer, namespaces problem with Cocoon 2.1

2003-03-11 Thread Bruno Dumon
On Sat, 2003-03-01 at 17:52, Mark H wrote:
> I'm trying to write an XSP to a file using SourceWritingTransformer but the
> latest DOMStreamer (v2.1) with setNormalizeNamespacesOn to true adds a
> namespace to every element rather than to the xsp:page element (so that the
> logicsheets don't work),

This problem should be fixed now in cocoon-2.1

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]  [EMAIL PROTECTED]


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



Re: Cocoon2: Logger required?

2003-02-26 Thread Bruno Dumon
On Wed, 2003-02-26 at 14:00, Uwe Gerger wrote:
> Hello,
> can I configure Cocoon2 so that it doesn't use the logger?
> 

Cocoon logging can be configured in the file WEB-INF/logkit.xconf.

Usually for deployment the log-levels are set to ERROR (instead of
DEBUG).

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]


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



RE: Reporting Engine

2003-02-10 Thread Bruno Dumon
On Mon, 2003-02-10 at 22:25, Conal Tuohy wrote:
> Looks interesting... but where is the "live demo"?

Here:
http://xreporter.cocoondev.org/cocoon/mount/xreporter/en-US/datasources
(log in with demo/demo)

the link is at the bottom of the homepage, but maybe you are confused by
the TOC on top?

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




[ANN] GroupingTransformer

2003-02-05 Thread Bruno Dumon
Hi all,

Based on some code from the xReporter project, I created a new
transformer for Cocoon that can do grouping and summary calculation of
table-like data (such as the data that comes out of the SQLTransformer).
The grouping to be performed is described in a configuration file. This
transformer works independent from xReporter.

Details and downloads are available here:
http://xreporter.cocoondev.org/subprojects/groupingtransformer.html

The transformer itself and the xReporter code on which it depends are
all released under Apache style licenses.

Enjoy,

Bruno

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Fantastic!!!! My first Generator that connects to an EJB.

2003-01-27 Thread Bruno Dumon
On Mon, 2003-01-27 at 13:58, Robert Simmons wrote:
> This sucker connects to an EJB which runs the given JDO query and
> returns the set of found objects from the database. Best of all it
> works See the two attached files. Next thing you know I will be
> writing something useful. O_O
>  

Just some small hints...

* I see you do the following in your code:

this.contentHandler.processingInstruction("xml",   
"version=\"1.0\" encoding=\"UTF-8\"");

You shouldn't create the XML declaration this way, since an XML
declaration is not a processing instruction. The SAX API explicitely
forbids this.

* For logging, instead of using log4j, you can use Avalon's logger.
Since the class extends from AbstractGenerator, it is already available:
simply call getLogger().error("...")

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Cocoon not compatible with latest Avalon/Excalibur version?

2002-12-03 Thread Bruno Dumon
On Mon, 2002-12-02 at 17:25, Vermeulen, Francis wrote:
> Hi folks,
> 
> we are trying to invoke an application framework from within Cocoon by means
> of a custom transformer. This framework itself uses Avalon/Excalibur
> components through a separate component and role manager, instantiated from
> within the framework. The framework is developed using the version 4.1.2 of
> Avalon and 4.1 of Excalibur and works fine in "stand-alone"mode when invoked
> from our own servlet. However when invoked from the custom transformer in
> Cocoon version 2.0.3, the Avalon/Excalibur part doesn't work because we are
> then using the version supplied with Cocoon as libraries.

What exactly do you mean with "doesn't work"? Do you get any exceptions
or just strange behaviour?

>  So to me it looks
> as if Cocoon comes bundled with its own version of Avalon/Excalibur that is
> not compatible with the latest release of these. 

Wouldn't it help to simply recompile your own framework against the
avalon libraries that ship with cocoon?

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Using own application components in Cocoon

2002-12-03 Thread Bruno Dumon
On Tue, 2002-12-03 at 09:12, Vermeulen, Francis wrote:
> Hi folks,
> 
> cab anyone tell me what the recommended way is to add Avalon/Excalibur
> components to the Cocoon configuration? I guessed it is by adding
>  entries in cocoon.xconf, but this is nowhere explicitely
> mentioned in the developers docs.

That's the way to go indeed.

>  Related to this: does Cocoon use an
> Excalibur role manager so that roles and components can be defined
> independently?

Yes (the default excalibur role manager)

>  Can  entries be added to cocoon.xconf?

You need to create your own roles file, and refer to it using the
user-roles attribute on the cocoon element (the root element of the
cocoon.xconf file). This is also mentioned in the faq item at
http://xml.apache.org/cocoon/faq/faq-configure-c2.html

The use of a roles file optional though, you can also use the generic
component declaration syntax.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: my.roles file

2002-11-08 Thread Bruno Dumon
On Fri, 2002-11-08 at 10:48, Ryan Heise wrote:
> On Fri, Nov 08, 2002 at 09:44:39AM +0100, Joerg Heinicke wrote:
> > Hello Ryan,
> > 
> > the error message is non-ambiguous: You created a non-valid web.xml.
> > Remove the changes you did and add the roles at the correct place
> > according to the DTD.
> 
> Thanks for your reply..
> 
> Before I go tracking down the problem the hard way, can you tell me if
> these instructions are wrong?
> 
>   http://xml.apache.org/cocoon/faq/faq-configure-c2.html#faq-1
> 
> 
> Here is what I did, I just:
> 
> 1. edited one line of cocoon.xconf to read:
> 
>   
> 
> 2. created a file called WEB-INF/my.roles which I copied from
> src/java/org/apache/cocoon/cocoon.roles (first I tried copy&pasting the
> example from the FAQ, but that didn't work either)
> 

You should not copy the cocoon.roles file to my.roles. The my.roles file
is for declaring roles for *additional* components. When using the
my.roles file, all roles declared in cocoon.roles also continue to
exist.

> Just a point of clarification: is it true that cocoon.xconf and my.roles
> are just cocoon specific files, and not web.xml files (or included into
> web.xml files)?

Yes that is true.

If you want to know how all that works (from Java-developer viewpoint),
you should go read the developing with avalon guide at
http://jakarta.apache.org/avalon/developing/index.html

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Parameters for Actions

2002-11-06 Thread Bruno Dumon
On Wed, 2002-11-06 at 11:50, Ludovic de Beaurepaire wrote:
> Hi All,
> 
> I don't find in documentation how to pass to an Action some parameters
> defined in one of the configuration files (web.xml, cocoon.xconf or
> sitemap.xmap). Someone knows ?
> 

the parameters given in the sitemap to the action, such as in:


  


are passed as a "par" argument in the act method of the Action.

Parameters (or actually "configurations") defined in de cocoon.xconf
can't be read directly by actions, since those are used to configure
specific components to which those configurations map (via the roles
file, see the avalon documentation for how that works).

Init parameters declared in the web.xml should be accessible through the
standard servlet interfaces, thus in your action you would do something
like:
ObjectModelHelper.getContext(objectModel).getInitParameter("myparam")
(objectModel is an argument supplied in the act method)

Configuration for the action specified inside the component declaration
in the map:actions element, such as in:


 
 
   
 hello
   
   
 


are accessible by implementing the "Configurable" interface (from
Avalon) in your Action. (this is again described in the Avalon
documentation)

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: restricting access to cocoon

2002-10-29 Thread Bruno Dumon
On Tue, 2002-10-29 at 06:29, Ivelin Ivanov wrote:
> 
> A few other people asked the same question recently.
> 
> My personal believe is that security is orthogonal to Cocoon and belongs to
> the J2EE container.
> 
> If you will have the time, please consider submitting a HOWTO patch to
> Cocoon's bugzilla on using Tomcat security with Cocoon.
> 

We used the Tomcat-security-approach in a project, so I quickly wrote
down some notes about how to do it. You can find it in the wiki:
http://outerthought.net/wiki/Wiki.jsp?page=AuthWithTomcat

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: R: encoding problem

2002-10-25 Thread Bruno Dumon
On Fri, 2002-10-25 at 16:33, Bert Van Kets wrote:
> Of course I checked the mail logs before bugging the list.  I could not 
> find a solution though.  I did find that I need to use UTF-8 and not 
> iso-8859-1 (the Cocoon default)
> 
> Searching through the source I found that a LOT of classes and XSLTs set 
> the encoding to iso-8859-1, so I am replacing these to UTF-8 and will 
> recompile afterwards.  Lets see what that gives.
> 

Bert, 

I cannot imagine that the above would help, nor would changing the
encoding of the serializer. Both UTF-8 and ISO-8859-1 support the
characters you're having problems with.

My guess is that the problem is either with mysql itself or with the
mysql jdbc driver. Maybe your mysql client inserts the data incorrectly
in the database? Try using a Java-based mysql (jdbc) client to insert
the data into the database (or write a small java-prog).

I'm also running mysql over here with cocoon etc (all in linux) and have
no problems with special characters. But of course that doesn't help you
;-)

Regards.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: How do I match cocoon-action-*

2002-10-15 Thread Bruno Dumon

On Mon, 2002-10-14 at 17:19, Bobby Mitchell wrote:
> I want to be able to match cocoon-action-* and use the value {1}. Is 
> this possible? Which matcher?
> 

Someone else just asked me this last week, so I wrote one (see
attachment). It's tested with C2.03. You'll need to compile this and put
it an jar and put that in WEB-INF/lib (let me know if you need more help
on this).

It is of course possible that there are multiple request parameter names
that match, but this matcher will take the first one that it encounters.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]


import org.apache.cocoon.matching.AbstractPreparableMatcher;
import org.apache.cocoon.matching.helpers.WildcardHelper;
import org.apache.cocoon.sitemap.PatternException;
import org.apache.cocoon.environment.Request;
import org.apache.cocoon.environment.ObjectModelHelper;
import org.apache.avalon.framework.thread.ThreadSafe;
import org.apache.avalon.framework.parameters.Parameters;

import java.util.Map;
import java.util.Enumeration;
import java.util.HashMap;

/**
 * Matcher that matches on the names of request parameters. The first parameter which
 * matches is used.
 */
public class RequestParameterNameMatcher extends AbstractPreparableMatcher implements ThreadSafe
{
public Object preparePattern(String pattern) throws PatternException
{
return WildcardHelper.compilePattern(pattern);
}

public Map preparedMatch(Object preparedPattern, Map objectModel, Parameters parameters)
{
int[] pattern = (int[])preparedPattern;
Request request = ObjectModelHelper.getRequest(objectModel);
Enumeration parameterNamesEnum = request.getParameterNames();

HashMap map = new HashMap();

while (parameterNamesEnum.hasMoreElements())
{
String name = (String)parameterNamesEnum.nextElement();
if (WildcardHelper.match(map, name, pattern))
return map;
}
return null;
}
}



-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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


Re: Efficient aggregation

2002-09-05 Thread Bruno Dumon

On Thu, 2002-09-05 at 10:37, Martin Lüthi wrote:
> Dear Cocooners
> 
> I wonder what would be the most efficient aggregation of many small xml
> documents in a directory. My present approach is very slow:
> 
> 1. use directory-generator to make an index of documents
> 2. generate a document containing xincludes with help of a stylesheet
> 3. perform all xincludes
> 4. serialize
> 

You first need to find out why it is taking so long. Cocoon's profiler
can help you here.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




[ANN] Cocoon pipelines captor

2002-08-30 Thread Bruno Dumon

Captor is a tool that lets you see the XML being produced by each
transformer in a Cocoon pipeline. Currently it only works with Cocoon
2.03, and not yet with 2.1. Implementation-wise captor works like the
profiler included with cocoon, but instead of storing the time spent in
each transformer, it stores the SAX-events that came out of each
transformer.

For more information and download, see:

http://outerthought.net/captor.html

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: SQLTransformer

2002-07-11 Thread Bruno Dumon

On Mon, 2002-07-08 at 17:40, Joshua McCulloch wrote:
> Hello,
> 
> I've been looking at page generating times with the
> profiler. I am finding that SQLTransoformer is taking
> a huge amount of time to do what I consider simple
> queries. For example, a page that has two minor
> queries takes about 130ms to complete.
> 
> Combined there are about 20 rows being returned. Would
> you expect lower times?
> 

Are you sure you are using connection pooling? If not, then the above
times seem reasonable.

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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




Re: Proxy Support instead of mod_jk

2002-07-05 Thread Bruno Dumon

On Fri, 2002-07-05 at 18:21, Thomas Garger wrote:
> hi!
> 
> i use now the "Proxy Support" to redirect requests from apache to
> tomcat.
> couldn't get mod_jk to run.
> 
> is this not so good as mod_jk
> 

Functionally, I don't think there are any disadvantages.

mod_jk is probably somewhat faster (when using ajp13), and has some
additional features such as load balancing.

--
Bruno



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

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




Re: can't start cocoon under root

2002-07-05 Thread Bruno Dumon

On Fri, 2002-07-05 at 15:48, Andrew C. Oliver wrote:
> Hummm.  I'm not running Apache as root (its running as "nobody").  It 
> responds on port 80.  
> I'm starting it with apachectl.  
> 

If it responds to port 80, the main httpd process is running with root
privileges. The user that is used for the childprocesses handling the
requests is normally specified using the 'User' directive in the
httpd.conf

--
Bruno



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

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




Re: can't start cocoon under root

2002-07-04 Thread Bruno Dumon

On Thu, 2002-07-04 at 17:33, Thomas Garger wrote:
> hi!
> 
> i use tomcat 4.0.1, cocoon 2.0.2 and SUSE linux 8.0
> 
> if i start tomcat under a normal user (not root) everthing
> works fine.
> 
> but if i start tomcat under root user - and i want to access cocoon
> 
> ->there is an error message in my catalin.out like this:
> Xlib: connection to "212.186.159.80:0.0" refused by server
> Xlib: No protocol specified
> 

As 'normal user' (the user who started X), enter 'xhost +' (in a
console) to allow everyone to connect to your X server, or 'xhost
+212.186.159.80' to allow only users from that host.
(nothing cocoon-specific about that)

-- 
Bruno Dumon http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
[EMAIL PROTECTED]


-
Please check that your question  has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>

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