Re: [c2] q: howto use ESQL inside own logicsheets?

2001-12-05 Thread Hubert NEOtyk Iwaniuk

Hello Chris,

On Wed, Dec 05, 2001 at 12:24:51AM +0100, Christian Haul wrote:
 Wait a minute. stylesheet != taglib
 taglib: used when creating .java from XSP. taglibs are aka logicsheets.
 stylesheet: used when styling XML
 
 usually, both are implemented in XSLT
 
 you apply your taglib to XML - wrong
 
 right: add your taglib to cocoon.xconf
 

That's what i'm trying to do, in my cocoon.xconf i have builtin-logicsheet
and there i define my logicsheet.
But what have mentioned my logicsheet is applied, but after it is applied
no esql logicsheet is applied, but esql namespace isn't lost (i have found
it by using log transformation).
This is even worse, one time it works as expectedm, other time it
returns unprocessed esql.

 search this ML for examples. this has been asked many times. see
 concepts section in docs. it is all explained in great detail.

I have read about it so many times that if awaken in a middle of the
night i would tel you about this concept with no doubt ;-)


I have send in this thread mail with attachement where is my logicsheet and
xsp wich use it. If any other file would be helpfull, let me know i'll
post it.

thanks in advance,
hubert.

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

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




Re: [c2] q: howto use ESQL inside own logicsheets?

2001-12-05 Thread Hubert NEOtyk Iwaniuk

Problem solved!

I have manadged to solve the problem.
In attachement 3 files:
problem.tgz -- not working files
problem_solved.tgz  -- working files
problem.diff.gz -- differences between problem and 
problem_solved 
   
 (read this: how did i manadged to solve it)


IMPORTANT NOTICE!!!
When i have removed esql:parameter and left only xsp:expr inside
esql:query, it works.

Thanks,
Hubert.



problem.tgz
Description: GNU Unix tar archive


problem_solved.tgz
Description: GNU Unix tar archive


problem.diff.gz
Description: Binary data

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

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


Re: [c2] q: howto use ESQL inside own logicsheets?

2001-12-05 Thread Christian Haul

On 05.Dec.2001 -- 10:30 AM, Hubert NEOtyk Iwaniuk wrote:
 Hello Chris,
 
 On Wed, Dec 05, 2001 at 12:24:51AM +0100, Christian Haul wrote:
  Wait a minute. stylesheet != taglib
  taglib: used when creating .java from XSP. taglibs are aka logicsheets.
  stylesheet: used when styling XML
  
  usually, both are implemented in XSLT
  
  you apply your taglib to XML - wrong
  
  right: add your taglib to cocoon.xconf
  
 
 That's what i'm trying to do, in my cocoon.xconf i have builtin-logicsheet
 and there i define my logicsheet.

This wasn't clear from your postings. Please attach your
cocoon.xconf. To the contrary, you explicitly apply the mytaglib.xsl
in your pipeline which is wrong for a taglib.

 But what have mentioned my logicsheet is applied, but after it is applied
 no esql logicsheet is applied, but esql namespace isn't lost (i have found
 it by using log transformation).

Actually, you cannot look inside the taglib replacement
procedure. It is done completely inside the generator - no
transformator call help you debug it. The only way I know of is
applying your taglib manually using xalan.

 This is even worse, one time it works as expectedm, other time it
 returns unprocessed esql.

This I don't believe.

 I have send in this thread mail with attachement where is my logicsheet and
 xsp wich use it. If any other file would be helpfull, let me know i'll
 post it.

Indeed, your cocoon.xconf would be helpful.


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/faqs.html

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




Re: [c2] q: howto use ESQL inside own logicsheets?

2001-12-05 Thread Hubert NEOtyk Iwaniuk

On Wed, Dec 05, 2001 at 01:34:52PM +0100, Christian Haul wrote:
 On 05.Dec.2001 -- 10:30 AM, Hubert NEOtyk Iwaniuk wrote:
  Hello Chris,
  
  On Wed, Dec 05, 2001 at 12:24:51AM +0100, Christian Haul wrote:
   Wait a minute. stylesheet != taglib
   taglib: used when creating .java from XSP. taglibs are aka logicsheets.
   stylesheet: used when styling XML
   
   usually, both are implemented in XSLT
   
   you apply your taglib to XML - wrong
   
   right: add your taglib to cocoon.xconf
   
  
  That's what i'm trying to do, in my cocoon.xconf i have builtin-logicsheet
  and there i define my logicsheet.
 
 This wasn't clear from your postings. Please attach your
 cocoon.xconf. To the contrary, you explicitly apply the mytaglib.xsl
 in your pipeline which is wrong for a taglib.

attached file problem.tgz has cocoon.xconf serverpages and logicsheet

 
  But what have mentioned my logicsheet is applied, but after it is applied
  no esql logicsheet is applied, but esql namespace isn't lost (i have found
  it by using log transformation).
 
 Actually, you cannot look inside the taglib replacement
 procedure. It is done completely inside the generator - no
 transformator call help you debug it. The only way I know of is
 applying your taglib manually using xalan.
 
  This is even worse, one time it works as expectedm, other time it
  returns unprocessed esql.
 
 This I don't believe.
 

about hour ago i have posted mail taling that problem is solved.
indid it was working ok.
i stoped tomcat, removed directory $TOMCAT_HOME$/work/localhost/cocoon
started tomcat,
and it is *NOT* working any more
no file changes, i think that the coffee i drunk while restarting was
a cause of this behavior.

  I have send in this thread mail with attachement where is my logicsheet and
  xsp wich use it. If any other file would be helpfull, let me know i'll
  post it.

I'm starting to be realy confused,
my cocoon2 doesn't like me,
please tell me how to persudate or force c2 to be a good pet and listen
to what i'm talking to him,
Confused Hubert.



problem.tgz
Description: GNU Unix tar archive

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

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


Re: [c2] q: howto use ESQL inside own logicsheets?

2001-12-05 Thread Christian Haul

On 05.Dec.2001 -- 02:49 PM, Hubert NEOtyk Iwaniuk wrote:
 On Wed, Dec 05, 2001 at 01:34:52PM +0100, Christian Haul wrote:
  On 05.Dec.2001 -- 10:30 AM, Hubert NEOtyk Iwaniuk wrote:

  This wasn't clear from your postings. Please attach your
  cocoon.xconf. To the contrary, you explicitly apply the mytaglib.xsl
  in your pipeline which is wrong for a taglib.
 
 attached file problem.tgz has cocoon.xconf serverpages and logicsheet

OK, from what I have seen there, it should work as expected. At least
I couldn't spot any of the common mistakes like mismatching namespaces
c.

However the file URL to your logicsheet should really be relative to
your webapp. Otherwise the security model might prohibit loading
it. Another thing is, that I had problems with certain versions of
tomcat 4, please consider 4.0.1.

 about hour ago i have posted mail taling that problem is solved.
 indid it was working ok.
 i stoped tomcat, removed directory $TOMCAT_HOME$/work/localhost/cocoon
 started tomcat,
 and it is *NOT* working any more
 no file changes, i think that the coffee i drunk while restarting was
 a cause of this behavior.

That is wierd.

 I'm starting to be realy confused,
 my cocoon2 doesn't like me,
 please tell me how to persudate or force c2 to be a good pet and listen
 to what i'm talking to him,

I haven't found the time to install your logicsheets  and try myself,
but at first sight it looks good (apart from the file URL).

Sorry not to be able to help.

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/faqs.html

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




Re: [c2] q: howto use ESQL inside own logicsheets?

2001-12-04 Thread Hubert NEOtyk Iwaniuk

If my question is somehow incomplite or unclear, tell me what is
wrong with it.

It is very important to me to know why it is not working.

help, help,

hubert.

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

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




Re: [c2] q: howto use ESQL inside own logicsheets?

2001-12-04 Thread David Rosenstrauch

At 10:41 AM 12/4/01 +0100, you wrote:
If my question is somehow incomplite or unclear, tell me what is
wrong with it.

It is very important to me to know why it is not working.

help, help,

 hubert.


Hi Hubert.

Your previous question was a little unclear, but I'll try my best to help.

Generally the way I handle logicsheets and XSP is as follows:

1) take an XML file (what you refer to in your message as my server page I would say 
is not a server page; it's just a regular xml file)

2) at compile time (i.e., using Ant and Xalan, not Cocoon) I perform an XSLT against 
that XML file using the logicsheet.  The result is the XSP server page. (what you 
refer to in your message as output is I would say is your server page; this now 
needs to get executed)

3) at run time (i.e., using Cocoon, in your sitemap), execute the server page (using  
map:generator name=serverpages 
src=org.apache.cocoon.generation.ServerPagesGenerator).  This will perform the 
database calls and make all the esql tag substitutions.


It is also possible to do step 2 at run time (i.e., using Cocoon), although it's a bit 
more complicated.


HTH.  Email back if you need more info.


DR


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

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




Re: [c2] q: howto use ESQL inside own logicsheets?

2001-12-04 Thread Christopher Painter-Wakefield


Obviously the ESQL logicsheet is not being applied.  In Cocoon 1 this would
imply that you had removed the declaration of the esql logicsheet from
cocoon.properties, or that your namespace declaration URI didn't match the
one in the logicsheet.  I don't know how this works in Cocoon 2; maybe the
sitemap?  I know some of the namespace URI's have changed; is it possible
that the one for ESQL is something other than 
http://apache.org/cocoon/SQL/v2;?

If either of these is true then you shouldn't be able to even get a simple
XSP using ESQL to work.

If you *can* get ESQL to work using simple XSP, then it suggests that you
are somehow managing to strip out the ESQL namespace declaration with your
logicsheet.  If that is also not true, perhaps you have found a bug, and
should report it to cocoon-dev.

Sorry I can't help more - I haven't yet upgraded to C2.

-Christopher




Please respond to [EMAIL PROTECTED]

To:   [EMAIL PROTECTED]
cc:

Subject:  [c2] q: howto use ESQL inside own logicsheets?


Hi all,
i want my logicsheet to use ESQL, i try this:


!-- my logicsheet --
xsl:stylesheet version=1.0
 xmlns:esql=http://apache.org/cocoon/SQL/v2;
 xmlns:xsp=http://apache.org/xsp;
 xmlns:my-logicsheet=http://my.org/my-logicsheet;
 xmlns:xsl=http://www.w3.org/1999/XSL/Transform;

 xsl:template match=my-logicsheet:my-tag
  esql:connection
   esql:poolmy-pool/esql:pool

   esql:execute-query
esql:querySELECT * FROM my-table/esql:query

esql:results
 esql:row-results
  xsp:element name=my-element
   xsp:attribute name=my-attr
 esql:get-string column
=my-string-column/
   /xsp:attribute
  /xsp:element
 /esql:row-results
/esql:results
   /esql:execute-query
  /esql:connection
 /xsl:template

/xsl:stylesheet

!-- my server page --
xsp:page
 xmlns:esql=http://apache.org/cocoon/SQL/v2;
 xmlns:xsp=http://apache.org/xsp;
 xmlns:my-logicsheet=http://my.org/my-logicsheet;

 element-embding-my-tag
  my-logisheet:my-tag
 /element-embding-my-tag
/xsp:page


!-- output is --
element-embding-my-tag
 !-- namespace declarations --
 
 esql:connection
  esql:poolfp/esql:pool
  esql:execute-query
   esql:querySELECT * FROM my-table/esql:query
   esql:results
esql:row-results
 my-element my-attr=/
 !-- unprocessed esql tags --
 !-- xsp has been processed --
/esql:row-results
   /esql:results
  /esql:execute-query
 /esql:connection
/element-embding-my-tag


please tell me why i sthat so, and what i i need to understend to use this
properly.

thanks in advance,
 hubert.

-
Please check that your question has not already been answered in the
FAQ before posting. http://xml.apache.org/cocoon/faqs.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/faqs.html

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




Re: [c2] q: howto use ESQL inside own logicsheets?

2001-12-04 Thread Hubert NEOtyk Iwaniuk

Hi David,

 Your previous question was a little unclear, but I'll try my best to help.
 
 Generally the way I handle logicsheets and XSP is as follows:
 
 1) take an XML file (what you refer to in your message as my server page I would 
say is not a server page; it's just a regular xml file)
 
 2) at compile time (i.e., using Ant and Xalan, not Cocoon) I perform an XSLT against 
that XML file using the logicsheet.  The result is the XSP server page. (what you 
refer to in your message as output is I would say is your server page; this now 
needs to get executed)

I'm no familiar with Ant, can you tell me how to do it (some build.xml i gues?).
Or how to do it in cocoon, because that is what i was trying to do.
I wanted to achieve this by using logicsheet, which is an xsl:stylesheet, as
documented in c2docs. what i should do, i think, is to
map:match patter=my_xsp.xsp
map:generate type=file 
src=my_xsl-file-containing-logicsheet-tags.xml/
map:transform type=xslt src=my-logicsheet.xsl/
map:serialize type=xml/
/map:match
but that is what i thought c2 is doing with logisheet.
if it's not then please let me know.


 
 3) at run time (i.e., using Cocoon, in your sitemap), execute the server page (using 
 map:generator name=serverpages 
src=org.apache.cocoon.generation.ServerPagesGenerator).  This will perform the 
database calls and make all the esql tag substitutions.
 
 
 It is also possible to do step 2 at run time (i.e., using Cocoon), although it's a 
bit more complicated.

Is this a bit more complicated the same that i wrote before?


Thanks in advance,
Hubert.

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

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




Re: [c2] q: howto use ESQL inside own logicsheets?

2001-12-04 Thread Christian Haul

On 04.Dec.2001 -- 06:20 PM, Hubert NEOtyk Iwaniuk wrote:
 Hi David,
 
  Your previous question was a little unclear, but I'll try my best to help.
  
  Generally the way I handle logicsheets and XSP is as follows:
  
  1) take an XML file (what you refer to in your message as my server page I would 
say is not a server page; it's just a regular xml file)
  
  2) at compile time (i.e., using Ant and Xalan, not Cocoon) I perform an XSLT 
against that XML file using the logicsheet.  The result is the XSP server page. (what 
you refer to in your message as output is I would say is your server page; this now 
needs to get executed)
 
 I'm no familiar with Ant, can you tell me how to do it (some build.xml i gues?).
 Or how to do it in cocoon, because that is what i was trying to do.
 I wanted to achieve this by using logicsheet, which is an xsl:stylesheet, as
 documented in c2docs. what i should do, i think, is to
   map:match patter=my_xsp.xsp
   map:generate type=file 
src=my_xsl-file-containing-logicsheet-tags.xml/
   map:transform type=xslt src=my-logicsheet.xsl/
   map:serialize type=xml/
   /map:match
 but that is what i thought c2 is doing with logisheet.
 if it's not then please let me know.
 

Wait a minute. stylesheet != taglib
taglib: used when creating .java from XSP. taglibs are aka logicsheets.
stylesheet: used when styling XML

usually, both are implemented in XSLT

you apply your taglib to XML - wrong

right: add your taglib to cocoon.xconf

search this ML for examples. this has been asked many times. see
concepts section in docs. it is all explained in great detail.

To David: yes, you could use your two pipeline setup. but then you
would need to know in which order to apply all taglibs. the official
way is much more comfortable.

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/faqs.html

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