Re: [Q] util:include-uri relative path

2002-07-12 Thread Eric Dalquist

I am going to take a look at it today.

-Eric Dalquist

- Original Message -
From: "Vadim Gritsenko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; <[EMAIL PROTECTED]>;
"'Eric Dalquist'" <[EMAIL PROTECTED]>
Sent: Friday, July 12, 2002 8:42 AM
Subject: RE: [Q] util:include-uri relative path


> > From: Christian Haul [mailto:[EMAIL PROTECTED]]
> >
> > On 12.Jul.2002 -- 07:20 AM, Eric Dalquist wrote:
> > > My util.xsl doesn't have an include-source. There is include-uri,
> > > include-file & include-expr.
> >
> > Yeah, it's in 2.1 only. Might work just to copy this file from 2.1 and
> > recompile
> > 2.0.3 with it. Or try the snippet below and place it in your util.xsl:
> >
> >   
> > 
> >   
> > uri
> >   
> > 
> > 
> >   XSPUtil.getSourceAsString(,this.resolver)
> > 
> >   
> >
> >   
> > 
> >   
> > uri
> >   
> > 
> > 
> >   {
> >  org.apache.cocoon.components.parser.Parser newParser = null;
> >  try {
> > newParser = (org.apache.cocoon.components.parser.Parser)
> > this.manager.lookup(org.apache.cocoon.components.parser.Parser.ROLE);
> > XSPUtil.include(this.resolver.resolve( > select="$source-uri"/>).getInputSource(), this.contentHandler,
> newParser);
>
> Ooooh, no! Sorry Chris, but why the hell parse source twice???
>
> My thinking here is that everywhere else Cocoon uses resolver to
> resolver URIs (and factory is deprecated). Thus, include-source is not
> needed and include-uri has to be refactored.
>
>
> >   } catch (Exception e) {
> >   getLogger().error("Could not include source", e);
> >   } finally {
> >   if (newParser != null) this.manager.release((Component)
> > newParser);
> >   }
> >   }
>
> And here is memory leak: no source.recycle().
>
>
> Eric,
>
> Have you modified your copy as I suggested? Is it working? There is a
> chance to have this resolved with 2.0.3 release on Monday...
>
> Vadim
>
>
> > 
> >   
> >
> > Chris.
> > --
> > C h r i s t i a n   H a u l
> > [EMAIL PROTECTED]
> > fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
>
>
> -
> 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]>
>


-
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: [Q] util:include-uri relative path

2002-07-12 Thread Eric Dalquist

My util.xsl doesn't have an include-source. There is include-uri,
include-file & include-expr.

-Eric

- Original Message -
From: "Christian Haul" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, July 12, 2002 7:14 AM
Subject: Re: [Q] util:include-uri relative path


> On 11.Jul.2002 -- 10:03 PM, Vadim Gritsenko wrote:
> > > From: Eric Dalquist [mailto:[EMAIL PROTECTED]]
> > >
> > > I just tried using cocoon://nav_bar.xsp but it still didn't work.
> > Looking in
> > > the core.log I found the following message:
> > >
> > > DEBUG   (2002-07-11) 13:19.09:225
> > [core.url-factory](/cocoon/index.xsp)
> > > Thread-6/URLFactoryImpl: Making URL from cocoon://nav_bar.xsp
> > > DEBUG   (2002-07-11) 13:19.09:225
> > [core.url-factory](/cocoon/index.xsp)
> > > Thread-6/URLFactoryImpl: Making URL - MalformedURLException in getURL:
> > > java.net.MalformedURLException: unknown protocol: cocoon
> > >  at java.net.URL.(URL.java:586)
> > >  at java.net.URL.(URL.java:476)
> > >  at java.net.URL.(URL.java:425)
> > >  at
> > >
> > org.apache.cocoon.components.url.URLFactoryImpl.getURL(URLFactoryImpl.ja
> > va:1
> > > 18)
> > >  at org.apache.cocoon.www.logic.site_format_xsp.generate(C:\Program
> > > Files\Apache Group\Tomcat
> >
> > Hmmm... Looks like util logicsheet's code is quite outdated... Would you
> > mind patching util logicsheet (util.xsl)? It should use source resolver
> > to do the work.
>
> There's a util:include-source tag in util.xsl (2.1) that doesn't use
> URLFactory.  Maybe that one does it? So, should we have include-uri and
> include-source be the same then?
>
> Chris.
> --
> C h r i s t i a n   H a u l
> [EMAIL PROTECTED]
> fingerprint: 99B0 1D9D 7919 644A 4837  7D73 FEF9 6856 335A 9E08
>
>
> -
> 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]>
>



-
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: [Q] util:include-uri relative path

2002-07-11 Thread Eric Dalquist

I'll look into patching it if you could give me a little more of a path to
follow ... like an example that uses the source revolver or API doc to look
at.

-Eric Dalquist

- Original Message -
From: "Vadim Gritsenko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 11, 2002 10:03 PM
Subject: RE: [Q] util:include-uri relative path


> > From: Eric Dalquist [mailto:[EMAIL PROTECTED]]
> >
> > I just tried using cocoon://nav_bar.xsp but it still didn't work.
> Looking in
> > the core.log I found the following message:
> >
> > DEBUG   (2002-07-11) 13:19.09:225
> [core.url-factory](/cocoon/index.xsp)
> > Thread-6/URLFactoryImpl: Making URL from cocoon://nav_bar.xsp
> > DEBUG   (2002-07-11) 13:19.09:225
> [core.url-factory](/cocoon/index.xsp)
> > Thread-6/URLFactoryImpl: Making URL - MalformedURLException in getURL:
> > java.net.MalformedURLException: unknown protocol: cocoon
> >  at java.net.URL.(URL.java:586)
> >  at java.net.URL.(URL.java:476)
> >  at java.net.URL.(URL.java:425)
> >  at
> >
> org.apache.cocoon.components.url.URLFactoryImpl.getURL(URLFactoryImpl.ja
> va:1
> > 18)
> >  at org.apache.cocoon.www.logic.site_format_xsp.generate(C:\Program
> > Files\Apache Group\Tomcat
>
> Hmmm... Looks like util logicsheet's code is quite outdated... Would you
> mind patching util logicsheet (util.xsl)? It should use source resolver
> to do the work.
>
> If you don't know who to patch it, file a bug into bugzilla saying that
> util:include-uri uses URLFactory but should use source resolver.
>
>
> Thanks,
> Vadim
>
>
> ...
>
> >  at java.lang.Thread.run(Thread.java:536)
> >
> > If anyone can make a suggestion it would be much appreciated.
> > I'm using cocoon 2.0.2-dev, Tomcat 4.1.3b and JDK1.4.0
> >
> > -Eric Dalquist
> >
> >
> > - Original Message -
> > From: "Vadim Gritsenko" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Thursday, July 11, 2002 12:02 PM
> > Subject: RE: [Q] util:include-uri relative path
> >
> >
> > > > From: Eric Dalquist [mailto:[EMAIL PROTECTED]]
> > > >
> > > > I'm wondering if I can use include-uri to include the output of an
> XSP
> > > in
> > > > another XSP. I can get it to work if I use the full path but I
> don't
> > > want to
> > > > do it this way unless I can use a relative path. The file is being
> > > included
> > > > in site_format.xsp which is used as a style sheet for index.xsp
> > > >
> > > > Here is the working include:
> > > >  > > >
> href="http://www.incoherentramblings.net:/cocoon/nav_bar.xsp"/>
> > > >
> > > > I would like to do:
> > > > 
> > >
> > > Why not:
> > >
> > > 
> > >
> > > ?
> > >
> > >
> > > Vadim
> > >
> > >
> ...
>
>
> -
> 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]>
>



-
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: [Q] util:include-uri relative path

2002-07-11 Thread Eric Dalquist
nvoke(StandardPipeline.java:483)
 at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:995)
 at org.apache.coyote.tomcat4.CoyoteAdapter.service(CoyoteAdapter.java:223)
 at
org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:405)
 at
org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConne
ction(Http11Protocol.java:376)
 at
org.apache.tomcat.util.net.TcpWorkerThread.runIt(PoolTcpEndpoint.java:508)
 at
org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.jav
a:518)
 at java.lang.Thread.run(Thread.java:536)

If anyone can make a suggestion it would be much appreciated.
I'm using cocoon 2.0.2-dev, Tomcat 4.1.3b and JDK1.4.0

-Eric Dalquist


- Original Message -
From: "Vadim Gritsenko" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, July 11, 2002 12:02 PM
Subject: RE: [Q] util:include-uri relative path


> > From: Eric Dalquist [mailto:[EMAIL PROTECTED]]
> >
> > I'm wondering if I can use include-uri to include the output of an XSP
> in
> > another XSP. I can get it to work if I use the full path but I don't
> want to
> > do it this way unless I can use a relative path. The file is being
> included
> > in site_format.xsp which is used as a style sheet for index.xsp
> >
> > Here is the working include:
> >  > href="http://www.incoherentramblings.net:/cocoon/nav_bar.xsp"/>
> >
> > I would like to do:
> > 
>
> Why not:
>
> 
>
> ?
>
>
> Vadim
>
>
>
> > Here is my dir structure:
> > /
> > webapps/
> > cocoon/
> > sitemap.xmap
> > logic/
> > site_format.xsp
> > nav_bar.xsp
> > index.xsp
> > stylesheets/
> > nav_bar.xsl
> > index.xsl
> >
> >
> > Here is an experpt from my sitemap:
> >
> >
> > 
> > 
> >  > src="logic/site_format.xsp"/>
> > 
> > 
> > 
> > 
> >  src="logic/nav_bar.xsp"/>
> > 
> > 
> > 
> >
> > 
> > 
> > 
> > 
> > 
> > 
> > 
>
>
> -
> 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]>
>


-
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]>




[Q] util:include-uri relative path

2002-07-11 Thread Eric Dalquist

I'm wondering if I can use include-uri to include the output of an XSP in
another XSP. I can get it to work if I use the full path but I don't want to
do it this way unless I can use a relative path. The file is being included
in site_format.xsp which is used as a style sheet for index.xsp

Here is the working include:
http://www.incoherentramblings.net:/cocoon/nav_bar.xsp"/>

I would like to do:


Here is my dir structure:
/
webapps/
cocoon/
sitemap.xmap
logic/
site_format.xsp
nav_bar.xsp
index.xsp
stylesheets/
nav_bar.xsl
index.xsl


Here is an experpt from my sitemap:

























-
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: QUESTION: Dynamic XSL

2002-07-11 Thread Eric Dalquist

Thanks for the tip. It works great!

-Eric Dalquist

- Original Message -
From: "Koen Pellegrims" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 09, 2002 2:21 PM
Subject: RE: QUESTION: Dynamic XSL


> Your idea is not as far-fetched as you might think (I think there is a
> sample with dynamically generated content *and* stylesheets).
> You will, however, need to use the cocoon:/ protocol in your sitemap to
> allow your .xsl to be machted by the appropriate pipeline:
>
> 
> 
> 
> 
> 
>
> 
> 
> 
> 
>
> This example should do what you are looking for. The cocoon:/ protocol
tries
> to find an appropriate match in the
> current sitemap.
>
> Koen.
>
> -Oorspronkelijk bericht-
> Van: Eric Dalquist [mailto:[EMAIL PROTECTED]]
> Verzonden: dinsdag 9 juli 2002 19:56
> Aan: [EMAIL PROTECTED]
> Onderwerp: QUESTION: Dynamic XSL
>
>
> I was wondering if there is a way to generate an XSL document to be used
in
> another transformation. Here is an theoretical pipeline that might
> illustrate my question a bit better:
>
> 
> 
> 
> 
> 
> 
> 
>
> 
> 
>  src="logic/site_format.xsp"/>
> 
> 
>
> I hope this makes sence to someone and they have some suggestions.
>
> -Eric Dalquist
>
>
> -
> 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]>
>
>
>
> -
> 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]>
>
>



-
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 to write XSL for PDF?

2002-07-10 Thread Eric Dalquist

Search for XSL-FO The W3 has the spec for it at http://www.w3.org/TR/xsl/
all the formatting tags fop uses are in the fo namespace defined at that
URL.

-Eric Dalquist

- Original Message -
From: "Cenk Uysal" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 10, 2002 10:18 AM
Subject: How to write XSL for PDF?


> Hi,
>
> I plan to use Cocoon's PDF Serializer. But I don't know how to write
> XSLs for styling PDF documents. Is there any resource which tells how
> to do this?
>
> __
> Do You Yahoo!?
> Sign up for SBC Yahoo! Dial - First Month Free
> http://sbc.yahoo.com
>
> -
> 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]>
>


-
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]>




QUESTION: Dynamic XSL

2002-07-09 Thread Eric Dalquist

I was wondering if there is a way to generate an XSL document to be used in
another transformation. Here is an theoretical pipeline that might
illustrate my question a bit better:















I hope this makes sence to someone and they have some suggestions.

-Eric Dalquist


-
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: FOP performance

2002-07-09 Thread Eric Dalquist

I haven't used FOP with cocoon yet but I have with Oracle's XSQL server
pages. FOP is a very useful package but it is slow ESPECIALLY with tables. I
haven't looked to heavily into the status of the project for about a year
now but performance was a big issue with the dev team but changes weren't
happening too fast. I would read through their users list and see if you can
get some people to help you optimize your layout a little bit. There are
certain things that can be done other ways to save time.

-Eric Dalquist

- Original Message -
From: "Matthew Langham" <[EMAIL PROTECTED]>
To: "Cocoon-Dev@Xml. Apache. Org" <[EMAIL PROTECTED]>;
"Cocoon-Users@Xml. Apache. Org" <[EMAIL PROTECTED]>
Sent: Tuesday, July 09, 2002 7:48 AM
Subject: FOP performance


> Hi,
>
> we have a project where we are using Cocoon 2.0. We have a simple pipeline
> that generates a PDF document:
>
>   
> 
> 
> 
> 
>   
>
> The XML data arrives as a request paramter (130 KB in size!) and the
> stylesheet is 636 KB in size. We are using our own specific generator and
> transformer in the pipeline (but they don't do anything special).
>
> It takes 8.5 seconds to generate the PDF file - which is only 1 page!
Quite
> complex though with lots of tables etc - but no graphics. The system is a
> 650 Mhz with 256 MB RAM. Our customer thinks that this is too slow - and I
> am looking for any ideas as to how we can improve the speed (or perhaps
this
> is normal?). The duration is split evently between the transformation step
> and the FOP step.
>
> Would switching to 2.1-dev help? Why?
> The stylesheet is very large - any idea here (translets?)
> Perhaps it's quicker to use several stylesheets instead of 1 large one?
> Is there a different PDF rendering engine we can use with Cocoon?
> etc.
>
> Thanks.
>
> Matthew
>
> --
> Open Source Group   Cocoon { Consulting, Training, Projects }
> =
> Matthew Langham, S&N AG, Klingenderstrasse 5, D-33100 Paderborn
> Tel:+49-5251-1581-30 [EMAIL PROTECTED] - http://www.s-und-n.de
> -
> Cocoon book:
>   http://www.amazon.com/exec/obidos/ASIN/0735712352/needacake-20
> =
>
>
>
> -
> 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]>
>



-
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: LogicSheet not executing

2002-07-03 Thread Eric Dalquist
Title: RE: LogicSheet not executing



Beth,
    Thanks for the fix, all I have 
to say is sorry for bugging everyone :-) I had copied a logicsheet from a friend 
who is running and older version of cocoon and didn't even think about the xsp 
namespace.
 
-Eric Dalquist

  - Original Message - 
  From: 
  Naquin, 
  Beth 
  To: '[EMAIL PROTECTED]' 
  
  Sent: Wednesday, July 03, 2002 1:21 
  PM
  Subject: RE: LogicSheet not 
  executing
  
  Look at the namespace declaration for xsp in your 
  logicsheet.  It is not right and it does not match the xsp namespace used 
  in your xsp file.
  Use: 
  xmlns:xsp="http://apache.org/xsp" 
  -Original Message----- From: Eric 
  Dalquist [mailto:[EMAIL PROTECTED]] Sent: Wednesday, July 03, 2002 8:06 AM To: [EMAIL PROTECTED] 
  Subject: LogicSheet not executing 
  I'm trying to create a logicsheet to act as a page hit 
  counter. I want to expand on the functionality of 
  cocoon's counter but I'm having problems getting the 
  simplest of logicsheets to work correctly. Cocoon finds the logic sheet ok but applies it as if it were a plain style sheet. None 
  of the xsp tags are parsed or executed. I'm running 
  Cocoon 2.0.2-dev, Tomcat 4.1.3b and JDK1.4. I know the 
  logicsheet is pretty much pointless right now but I figured I'd try to get something simple working first. Here are my 
  files and directory structure. 
  -Eric Dalquist 
       
  \WebApps     
  \cocoon     
  \WEB-INF     
  coccon.xconf     
  \logicsheets     
  pgutil.xsl     
  page_info.xsp 
   
   Here is my logicsheet definition 
  in cocoon.xconf:   
       
        
  http://apache.org/xsp"/> 
     
    
      
         value="http://www.incoherentramlbings.net/XML/xmlns/pgutil/1.0"/> 
    
  file:///C:/Program Files/Apache Group/Tomcat 4.1/webapps/cocoon/logicsheets/pgutil.xsl"/> 
      
   
        
   
   
   Here is the logicsheet: 
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform"     xmlns:xsp="http://www.apache.org/1999/XSP/Core"     xmlns:esql="http://apache.org/cocoon/SQL/v2" 
  xmlns:pgutil="http://www.incoherentramlbings.net/XML/xmlns/pgutil/1.0" 
      
  version="1.0"> 
              
       

    
       String uri = 
  request.getRequestURI(); 
      
  uri 
        
     
            

    
   
   
   Here is the XSP I'm trying to 
  use the logicsheet in:  
       
  language="java"     xmlns:xsp="http://apache.org/xsp" 
      xmlns:esql="http://apache.org/cocoon/SQL/v2"     xmlns:xsp-session="http://apache.org/xsp/session/2.0"     xmlns:pgutil="http://www.incoherentramlbings.net/XML/xmlns/pgutil/1.0" 
      > 
            
      
       
        
         
   
  - 
  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]> 


LogicSheet not executing

2002-07-03 Thread Eric Dalquist

I'm trying to create a logicsheet to act as a page hit counter. I want to
expand on the functionality of cocoon's counter but I'm having problems
getting the simplest of logicsheets to work correctly. Cocoon finds the
logic sheet ok but applies it as if it were a plain style sheet. None of the
xsp tags are parsed or executed. I'm running Cocoon 2.0.2-dev, Tomcat 4.1.3b
and JDK1.4. I know the logicsheet is pretty much pointless right now but I
figured I'd try to get something simple working first. Here are my files and
directory structure.

-Eric Dalquist



\WebApps
\cocoon
\WEB-INF
coccon.xconf
\logicsheets
pgutil.xsl
page_info.xsp



Here is my logicsheet definition in cocoon.xconf:
  

  
  http://apache.org/xsp"/>

  

 


  
  http://www.incoherentramlbings.net/XML/xmlns/pgutil/1.0"/>
  








Here is the logicsheet:

http://www.w3.org/1999/XSL/Transform";
xmlns:xsp="http://www.apache.org/1999/XSP/Core";
xmlns:esql="http://apache.org/cocoon/SQL/v2";

xmlns:pgutil="http://www.incoherentramlbings.net/XML/xmlns/pgutil/1.0";
version="1.0">












String uri = request.getRequestURI();

uri

















Here is the XSP I'm trying to use the logicsheet in:


http://apache.org/xsp";
xmlns:esql="http://apache.org/cocoon/SQL/v2";
xmlns:xsp-session="http://apache.org/xsp/session/2.0";
xmlns:pgutil="http://www.incoherentramlbings.net/XML/xmlns/pgutil/1.0";
>














-
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: Form Validator

2002-07-01 Thread Eric Dalquist

Thanks for the detailed example. It gives me a good alternative if the
DBAuth SessionValidator stuff falls through. I think I might look into the
DatabaseAuthenticatorAction class and see how it does things for the
PASSWORD() stuff.

-Eric Dalquist

- Original Message -
From: "Tim Myers" <[EMAIL PROTECTED]>
To: "Eric Dalquist" <[EMAIL PROTECTED]>
Sent: Monday, July 01, 2002 11:41 AM
Subject: Re: Form Validator


>
>
> On Mon, Jul 01, 2002 at 08:56:18AM -0400, Eric Dalquist wrote:
> > Tim,
> > Could I get an example of how you would set your sitemap up to use
the
> > XSP you attached?
>
> Hi Eric,
>
> This is probably more than you wanted to see,
>
> my directory layout is a little like this:
>
> shortcourses/
>   sitemap.xmap
>   xsp/
> action/
>   authenticate.xsp
>   permissions.xsp
> admin/
>   login.xsp
>   menu.xsp
> signup.xsp
> index.xsp
>
> in the components/actions section:
>
> 
>
> in the pipeline:
>
> 
>   
> 
> 
> 
>   
> 
> 
> 
> 
> 
>   
> 
> 
> 
> 
> 
>   
>
>   
> 
> 
>   
>
>   
> 
> 
>
> 
>   
>   
> 
>   
> 
>
> 
>   
>   
> 
>   
> 
>
> 
>   
>   
> 
>   
> 
>
> 
> 
> 
>     
>   
>
>   
>   
>   
>   
>   
>
> 
>
> My match is obviously far more complicated than necesarry, but i wanted to
show
> you stuff in context quickly.
>
> If you find this helpful, please see that it gets back to the user list.
>
>
> Tim
> >
> > -Eric Dalquist
> >
> > - Original Message -
> > From: "Tim Myers" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Sunday, June 30, 2002 11:07 PM
> > Subject: Re: Form Validator
> >
> >
> > > > > My other question with the DBAuth stuff is can cocoon run the
> > submitted
> > > > > password through MySQLs PASSWORD() function? I would really like
to be
> > > > able
> > > > > to keep the password column in the table encrypted and still be
able
> > to
> > > > use
> > > > > the DBAuth stuff.
> > >
> > > sometime slightly less than a year ago i sent a patch to the dev
mailing
> > list
> > > for exactly that purpose.  Since then, i don't use it anymore.  I use
an
> > > xsp action with esql that i'll go ahead and attach.
> > >
> > > If you really want the patch for dbauth, let me know-- but i consider
it
> > hackish.
> > >
> > > Tim
> > >
> > >
> >
> >
>
> --
--
> > 
> >
> >
> > > -
> > > 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]>
> >
>


-
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: Form Validator

2002-07-01 Thread Eric Dalquist

Thanks for the tips Dave. I have the DBAuthenticator working. But I still
can't get the session validator and form validator to work. Could you please
post an example of the XML file you use in your Form or Session validators?
I'm trying to be really simple right now with mine:






Here is an exerpt of my sitemap. I took the FormValidator off the
do_login.xsp to get the DBAuth working.



















































- Original Message -
From: "Dave Covert" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Sunday, June 30, 2002 10:54 PM
Subject: Re: Form Validator


> Eric-
> I have a simple authentication running with mySql.
>
> The db-authenticator is missing from the pipeline given. form-validator is
> only validating that the values in your form meet the constraints in
> params.xml. db-authenticator will check the database table against what
the
> user typed in.
>
> The corresponding pipeline in my sub-site is:
>   
> 
> 
>value="context://wbs/descriptors/params.xml"/>
>   
>   
>   
>  value="context://wbs/descriptors/auth.xml"/>
> 
> 
>   
>   
> 
>   
>   
> (Yes, it was shamelessly stolen from the example.)
> The auth.xml I use looks like this:
> 
> 
>   wbs
>   
> 
>  to-session="user_password"/>
>  type="string"/>
>   
> 
>
> An item of note: the names for the id & password MUST match in login.xsp
> (request name - html form), in params.xml (name=), and auth.xml
> (request-param=). The "dbcol" in auth.xml is the column name in your
table -
> "user_name" from your table def.
> If the request name in login.xsp (from the html form) is not the same as
in
> params.xml (in your case "user_id") that may be why the form is not
> validated - sending you back to login.
>
>
> Then, assuming other pipes will be 'protected' you need to wrap each one.
> Such as:
>   
> 
>value="context://wbs//descriptors/params.xml"/>
>   
>   
>   
>   
>   
>   
> 
> 
> 
>   
> "session-validator" will validate that the user_id & user_password (placed
> in session variables by "db-authenticator" from the "to-session" of
> auth.xml) are valid. It only checks validity in terms of a 'form' check -
it
> does not access the database again (as far as I know).
> These values are invalidated on session timeout, forcing the user to login
> again.
> Since I am still playing, I am allowing the password to stay around as a
> session variable.
>
> On your PASSWORD() function question, I can not help. My guess is that you
> would have to modify (or make your own)
> org.apache.cocoon.acting.FormValidatorAction.
>
> HTH
> Dave...
>
> - Original Message -
> From: "Eric Dalquist" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, June 29, 2002 12:06 PM
> Subject: Form Validator
>
>
> > I've been trying to get the form validator and DB Validator working for
> > about a week now. I decided to try and just got the form stuff working
> first
> > but I can't even get that. I'm running Cocoon 2.0.2-dev and Tomcat
4.1.3.
> >
> > In my sitemap.xmap I have the following:
> >
> > 
> > 
> > 
> >  > value="context://house_bills/descriptors/params.xml"/>
> > 
> >
> > 
> > 
> >
> > 
> > 
> >
> > login.xsp has a form that posts to do_login.xsp and has two inputs named
> > user_name and user_password.
> >
> > Here is my params.xml
> > 
> > 
> >   
> >   
> >
> >   
> > 
> > 
> >   
> > 
> >
> > I've checked through the logs and there aren't any context errors so
> Coc

Form Validator

2002-06-29 Thread Eric Dalquist

I've been trying to get the form validator and DB Validator working for
about a week now. I decided to try and just got the form stuff working first
but I can't even get that. I'm running Cocoon 2.0.2-dev and Tomcat 4.1.3.

In my sitemap.xmap I have the following:













login.xsp has a form that posts to do_login.xsp and has two inputs named
user_name and user_password.

Here is my params.xml


  
  

  


  


I've checked through the logs and there aren't any context errors so Cocoon
seems to be finding the params.xml file OK. Everytime I submit the form I
get bounced back to the login.xsp page instead of getting sent to index.xsp.
It doesn't matter if I don't put anything in the inputs or have valid data
in both.

I would also like to be able to validate the user_name & password_fields
against a MySQL database and setting the value in the corresponding user_id
column in a session variable. I played with it a little and cocoon was
connection to the DB but not authenticating, I don't have my descriptor file
for that any more. Here is my DDL for the table I want to auth against.

CREATE TABLE `users` (
  `user_id` int(11) unsigned NOT NULL auto_increment,
  `user_name` varchar(255) NOT NULL default '',
  `user_password` varchar(16) NOT NULL default '',
  `user_first_name` varchar(255) NOT NULL default '',
  `user_last_name` varchar(255) NOT NULL default '',
  `user_email` varchar(255) NOT NULL default '',
  `user_status` tinyint(4) unsigned NOT NULL default '1',
  PRIMARY KEY  (`user_id`),
  UNIQUE KEY `user_login` (`user_name`,`user_password`),
  UNIQUE KEY `user_id` (`user_id`)
) TYPE=MyISAM

My other question with the DBAuth stuff is can cocoon run the submitted
password through MySQLs PASSWORD() function? I would really like to be able
to keep the password column in the table encrypted and still be able to use
the DBAuth stuff.

I hope someone can give me a hand with this. After a week of searching the
mailing lists, coocon site and web in general I'm stuck!

-Eric Dalquist



-
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]>