Re: XSP Logicsheet Questions...

2002-11-22 Thread jakob . dalsgaard
Not that I have that much experience on this issue, but there is a nice 
example of various ways to get in contact with a logicsheet in the file:

src/webapp/docs/samples/xsp/logicsheet.xsp

at least in my Cocoon 2.0.3 ...

Jakob Dalsgaard
Udvikler
e-mail:   [EMAIL PROTECTED]
Vesterbrogade 149
1620 København V
Tlf.:   70 25 80 30
Fax.: 70 25 80 31



-
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: XSP Logicsheet Questions...

2002-11-11 Thread Geoff Howard
I've been hoping someone would answer your questions
with authority - I've just started using logicsheets
as well.  My best answers follow:

--- Andy Lewis [EMAIL PROTECTED] wrote:

 First, it appears that a logicsheet must declared to
 be used and that the only place to declare a
 logic sheet is in the xconf file. Is this correct?

Yes, although there is an undocumented feature
available because of the TreeProcessor implementation
which allows components defined in the map:components
section of the sitemap the same as cocoon.xconf.  What
I don't know and haven't had the time to test is what
happens with a case like logicsheets when there are
some defined in cocoon.xconf and some defined in
sitemap?  Give it a try and let us know.

 Second, is the xconf file only reload at Cocoon
 restart time, or are there other events that
 trigger a reload as well?

I think reload of the conf can also be triggered by
sending an http request with the parameter
cocoon-reload=true if you have not turned this option
off in web.xml (or is it cocoon.xconf?)  While I have
used this, I cannot recall if I carefully confirmed
that the xconf file is actually re-read from disk
correctly if modified.

 Third, are changes to a logicsheet picked up and
 used in a running Cocoon environment, or are they
 only caught when the configuration is read? 

In my experience, changes to a logicsheet are not
picked up by a running cocoon, and I'm not even sure
they are re-read with cocoon-reload.  I have been
cycling tomcat to get changes visible.

 If
 changes are picked up, are they a dependancy of the
 pipeline, or are they only picked up when the XSP
 itself is recompiled due to another trigger,
 such as being updated.

They are not re-read when the xsp is modified (don't
know if this is a bug or intended functionality) but
this raises two important points I've learned:

- If you change the logicsheet, cycle the servlet
container, and reload your page, the changes are not
visible because the xsp is unmodified.  My current
hack until I have time to look into how to do all this
right is to touch the xsp (actually I make a trivial
modification in the file and resave it)
- You may be able to force reload of the logicsheet
and recompile of the xsp without all of the
histrionics reported above by using the
xsp:dependency tag to manually report that your xsp
relies on your logicsheet.

I really hope I've missed some magic bullet that makes
all this function as it seems it should.  I have a
hard time believing that any logicsheet development
happens the way I've been doing it (at least for
long).

HTH,
Geoff Howard

__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

-
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: XSP Logicsheet Questions...

2002-11-11 Thread Geoff Howard
An update - 

In looking into the issue regarding changes to
logicsheets, I found the following reference:
http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=102374809216737w=2

So, logicsheets declared with resource: in
cocoon.xconf are not checked for updates, but other
protocols are (including no protocol).

Geoff

--- Geoff Howard [EMAIL PROTECTED] wrote:
 I've been hoping someone would answer your questions
 with authority - I've just started using logicsheets
 as well.  My best answers follow:
 
 --- Andy Lewis [EMAIL PROTECTED] wrote:
 
  First, it appears that a logicsheet must declared
 to
  be used and that the only place to declare a
  logic sheet is in the xconf file. Is this correct?
 
 Yes, although there is an undocumented feature
 available because of the TreeProcessor
 implementation
 which allows components defined in the
 map:components
 section of the sitemap the same as cocoon.xconf. 
 What
 I don't know and haven't had the time to test is
 what
 happens with a case like logicsheets when there are
 some defined in cocoon.xconf and some defined in
 sitemap?  Give it a try and let us know.
 
  Second, is the xconf file only reload at Cocoon
  restart time, or are there other events that
  trigger a reload as well?
 
 I think reload of the conf can also be triggered by
 sending an http request with the parameter
 cocoon-reload=true if you have not turned this
 option
 off in web.xml (or is it cocoon.xconf?)  While I
 have
 used this, I cannot recall if I carefully confirmed
 that the xconf file is actually re-read from disk
 correctly if modified.
 
  Third, are changes to a logicsheet picked up and
  used in a running Cocoon environment, or are they
  only caught when the configuration is read? 
 
 In my experience, changes to a logicsheet are not
 picked up by a running cocoon, and I'm not even sure
 they are re-read with cocoon-reload.  I have been
 cycling tomcat to get changes visible.
 
  If
  changes are picked up, are they a dependancy of
 the
  pipeline, or are they only picked up when the XSP
  itself is recompiled due to another trigger,
  such as being updated.
 
 They are not re-read when the xsp is modified (don't
 know if this is a bug or intended functionality) but
 this raises two important points I've learned:
 
 - If you change the logicsheet, cycle the servlet
 container, and reload your page, the changes are not
 visible because the xsp is unmodified.  My current
 hack until I have time to look into how to do all
 this
 right is to touch the xsp (actually I make a
 trivial
 modification in the file and resave it)
 - You may be able to force reload of the logicsheet
 and recompile of the xsp without all of the
 histrionics reported above by using the
 xsp:dependency tag to manually report that your
 xsp
 relies on your logicsheet.
 
 I really hope I've missed some magic bullet that
 makes
 all this function as it seems it should.  I have a
 hard time believing that any logicsheet development
 happens the way I've been doing it (at least for
 long).
 
 HTH,
 Geoff Howard
 
 __
 Do you Yahoo!?
 U2 on LAUNCH - Exclusive greatest hits videos
 http://launch.yahoo.com/u2
 

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


__
Do you Yahoo!?
U2 on LAUNCH - Exclusive greatest hits videos
http://launch.yahoo.com/u2

-
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: XSP Logicsheet Questions...

2002-11-11 Thread Christopher Painter-Wakefield

FWIW, we are using relative file paths for our logicsheets, and this is
supposed to cause pages to be recompiled if we modify the logicsheet.  Be
warned, though, that it seems to be somewhat flaky; it often works as
expected, but sometimes not.  In those cases, you have to touch the main
XSP source file.  This can be extremely frustrating when you are wondering
why a bugfix you just put in doesn't seem to be working!!

-Christopher




An update -

In looking into the issue regarding changes to
logicsheets, I found the following reference:
http://marc.theaimsgroup.com/?l=xml-cocoon-usersm=102374809216737w=2

So, logicsheets declared with resource: in
cocoon.xconf are not checked for updates, but other
protocols are (including no protocol).

Geoff

--- Geoff Howard [EMAIL PROTECTED] wrote:
 I've been hoping someone would answer your questions
 with authority - I've just started using logicsheets
 as well.  My best answers follow:

 --- Andy Lewis [EMAIL PROTECTED] wrote:

  First, it appears that a logicsheet must declared
 to
  be used and that the only place to declare a
  logic sheet is in the xconf file. Is this correct?

 Yes, although there is an undocumented feature
 available because of the TreeProcessor
 implementation
 which allows components defined in the
 map:components
 section of the sitemap the same as cocoon.xconf.
 What
 I don't know and haven't had the time to test is
 what
 happens with a case like logicsheets when there are
 some defined in cocoon.xconf and some defined in
 sitemap?  Give it a try and let us know.

  Second, is the xconf file only reload at Cocoon
  restart time, or are there other events that
  trigger a reload as well?

 I think reload of the conf can also be triggered by
 sending an http request with the parameter
 cocoon-reload=true if you have not turned this
 option
 off in web.xml (or is it cocoon.xconf?)  While I
 have
 used this, I cannot recall if I carefully confirmed
 that the xconf file is actually re-read from disk
 correctly if modified.

  Third, are changes to a logicsheet picked up and
  used in a running Cocoon environment, or are they
  only caught when the configuration is read?

 In my experience, changes to a logicsheet are not
 picked up by a running cocoon, and I'm not even sure
 they are re-read with cocoon-reload.  I have been
 cycling tomcat to get changes visible.

  If
  changes are picked up, are they a dependancy of
 the
  pipeline, or are they only picked up when the XSP
  itself is recompiled due to another trigger,
  such as being updated.

 They are not re-read when the xsp is modified (don't
 know if this is a bug or intended functionality) but
 this raises two important points I've learned:

 - If you change the logicsheet, cycle the servlet
 container, and reload your page, the changes are not
 visible because the xsp is unmodified.  My current
 hack until I have time to look into how to do all
 this
 right is to touch the xsp (actually I make a
 trivial
 modification in the file and resave it)
 - You may be able to force reload of the logicsheet
 and recompile of the xsp without all of the
 histrionics reported above by using the
 xsp:dependency tag to manually report that your
 xsp
 relies on your logicsheet.

 I really hope I've missed some magic bullet that
 makes
 all this function as it seems it should.  I have a
 hard time believing that any logicsheet development
 happens the way I've been doing it (at least for
 long).

 HTH,
 Geoff Howard







-
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: XSP logicsheet for the ServletContext object

2002-08-16 Thread Vadim Gritsenko

Werner Guttmann wrote:

Hi,

just looking at the available XSP logicsheets, it seems that there is
not a logicsheet for the ServletContext that would offer the kind of
functionality the request logicsheet offers for interacting with the
HttpServletRequest. 


They (context parameters) are not that popular.


If that's true, how does one access e.g. context
parameters of the web app from within an XSP page ?


Either by writing a logicsheet (and donating it back) or by using plain 
Java in XSP, which is still possible ;)

Vadim


Werner
  





-
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: XSP logicsheet for the ServletContext object

2002-08-16 Thread Per Kreipke

I just noticed that class XSPUtil (the implementing class for util taglib)
has the following function, which also shows how to get context info in
Java:

public static Object getContextAttribute(Map objectModel, String name)
{
Context context = ObjectModelHelper.getContext(objectModel);
return context.getAttribute(name);
}

In XSP (assuming XSPUtil class is already imported):


xsp:logic
// objectModel is already a local var available to your XSP
String attr = XSPUtil.getContextAttribute(objectModel, foo);

// If you want this for anything else
Context context = ObjectModelHelper.getContext(objectModel);
/xsp:logic

debugxsp:exprcontext.getAttribute(bar)/xsp:expr/debug



Per


-
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: xsp logicsheet

2002-05-06 Thread KOZLOV Roman

Hi,

Did you try to use apostrophs inside quotes? Something like this:
String temp = xsl:value-of select='name'/;

Best regards.
Roman

Bert Van Kets wrote:

 At 10:38 30/04/2002 -0300, you wrote:

 I guess it's
 
   String temp = xsl:value-of select=name/;
 
 or
 
   String temp = new String(xsl:value-of select=name/);
 
 Alejandro
 Tried it, doesn't work.  I guess it must be a bug.
 If I use
 String temp = xsl:value-of select=name/
 I get

 org.apache.cocoon.ProcessingException: Exception in creating Transform
 Handler: org.apache.cocoon.ProcessingException: Language Exception:
 org.apache.cocoon.components.language.LanguageException: Error compiling
 listCreateQuery_xsp:
 Line 252, column 23: unclosed character literal
 Line 252, column 22: illegal start of expression
 Line 278, column 6: unclosed character literal
 Line 278, column 4: illegal start of expression
 Line 0, column 0:
 4 errors

 The code snipet it refers to is

  String temp = 
  xspAttr.addAttribute(
,
select,
select,
CDATA,
name
  );

  this.contentHandler.startElement(
http://www.w3.org/1999/XSL/Transform;,
value-of,
xsl:value-of,
xspAttr
  );
  xspAttr.clear();

  this.contentHandler.endElement(
http://www.w3.org/1999/XSL/Transform;,
value-of,
xsl:value-of
  );

  ;

 As you can see the string is closed three commands down.  There is no way
 this can work.
 Is there another way to store the content of a node in a string?

 Bert

 BTW I'm using todays CVS

 -
 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: xsp logicsheet

2002-04-30 Thread Konstantin Piroumian

From: Bert Van Kets [EMAIL PROTECTED]
 I want to use an XSP logicsheet to process the values submitted by a
 form.  In this page I have the following code (simplified):

xsl:template match=list
  xsl:for-each select=element
xsl:sort select=name/
xsp:logic
  String temp = xsl:value-of select=name/;

Maybe would help:
String temp = xsl:value-of select=name/;

/xsp:logic
  /xsl:for-each
 myQueryxsp:exprtemp/xsp:expr/myQuery
/xsl:template

 When I try to run this simple code I get an error saying
 org.apache.cocoon.ProcessingException: Exception in creating Transform
 Handler: org.apache.cocoon.ProcessingException: Language Exception:
 org.apache.cocoon.components.language.LanguageException: Error compiling
 listCreateQuery_xsp:
 Line 263, column -1: incompatible types
 Line 0, column 0:
 1 error

 The code block in the generated java file that throws the error is
  String temp =
  xspAttr.addAttribute(
,
select,
select,
CDATA,
name
  );

Sure this won't compile.

--
  Konstantin


 How can I get the string value out of a node in xsp:logic  Using
 text(name) doesn't work either.
 Bert

 My spelling is Wobbly.  It's good spelling but it Wobbles, and the
letters
   get in the wrong places. A. A. Milne (1882-1958)


 -
 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: xsp logicsheet

2002-04-30 Thread Alejandro Raiczyk
Title: RE: xsp logicsheet





I guess it's


 String temp = xsl:value-of select=name/;


or


 String temp = new String(xsl:value-of select=name/);


Alejandro


-Mensaje original-
De: Bert Van Kets [mailto:[EMAIL PROTECTED]]
Enviado el: Martes 30 de Abril de 2002 10:37 AM
Para: [EMAIL PROTECTED]
Asunto: xsp logicsheet



I want to use an XSP logicsheet to process the values submitted by a 
form. In this page I have the following code (simplified):


 xsl:template match=list
 xsl:for-each select=element
 xsl:sort select=name/
 xsp:logic
 String temp = xsl:value-of select=name/;
 /xsp:logic
 /xsl:for-each
 myQueryxsp:exprtemp/xsp:expr/myQuery
 /xsl:template


When I try to run this simple code I get an error saying
org.apache.cocoon.ProcessingException: Exception in creating Transform 
Handler: org.apache.cocoon.ProcessingException: Language Exception: 
org.apache.cocoon.components.language.LanguageException: Error compiling 
listCreateQuery_xsp:
Line 263, column -1: incompatible types
Line 0, column 0:
1 error


The code block in the generated java file that throws the error is
 String temp =
 xspAttr.addAttribute(
 ,
 select,
 select,
 CDATA,
 name
 );


How can I get the string value out of a node in xsp:logic Using 
text(name) doesn't work either.
Bert


My spelling is Wobbly. It's good spelling but it Wobbles, and the letters
 get in the wrong places. A. A. Milne (1882-1958)



-
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: xsp logicsheet

2002-04-30 Thread Bert Van Kets

Oh my God!! I can't believe how stupid this mistake is.
Guess that's what happens when you work 12 to 14 hours a day, six days a week.
I was already getting out my XML books and checking out how to make sure a 
node returned text.
Thanks,  I guess I'll be off to bed early tonight.
Bert

At 10:38 30/04/2002 -0300, you wrote:

I guess it's

  String temp = xsl:value-of select=name/;

or

  String temp = new String(xsl:value-of select=name/);

Alejandro

-Mensaje original-
De: Bert Van Kets [mailto:[EMAIL PROTECTED]mailto:[EMAIL PROTECTED]]
Enviado el: Martes 30 de Abril de 2002 10:37 AM
Para: [EMAIL PROTECTED]
Asunto: xsp logicsheet

I want to use an XSP logicsheet to process the values submitted by a
form.  In this page I have the following code (simplified):

xsl:template match=list
  xsl:for-each select=element
xsl:sort select=name/
xsp:logic
  String temp = xsl:value-of select=name/;
/xsp:logic
  /xsl:for-each
 myQueryxsp:exprtemp/xsp:expr/myQuery
/xsl:template

When I try to run this simple code I get an error saying
org.apache.cocoon.ProcessingException: Exception in creating Transform
Handler: org.apache.cocoon.ProcessingException: Language Exception:
org.apache.cocoon.components.language.LanguageException: Error compiling
listCreateQuery_xsp:
Line 263, column -1: incompatible types
Line 0, column 0:
1 error

The code block in the generated java file that throws the error is
  String temp =
  xspAttr.addAttribute(
,
select,
select,
CDATA,
name
  );

How can I get the string value out of a node in xsp:logic  Using
text(name) doesn't work either.
Bert

My spelling is Wobbly.  It's good spelling but it Wobbles, and the letters
   get in the wrong places. A. A. Milne (1882-1958)

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

2002-04-30 Thread Bert Van Kets

At 10:38 30/04/2002 -0300, you wrote:

I guess it's

  String temp = xsl:value-of select=name/;

or

  String temp = new String(xsl:value-of select=name/);

Alejandro
Tried it, doesn't work.  I guess it must be a bug.
If I use
String temp = xsl:value-of select=name/
I get

org.apache.cocoon.ProcessingException: Exception in creating Transform 
Handler: org.apache.cocoon.ProcessingException: Language Exception: 
org.apache.cocoon.components.language.LanguageException: Error compiling 
listCreateQuery_xsp:
Line 252, column 23: unclosed character literal
Line 252, column 22: illegal start of expression
Line 278, column 6: unclosed character literal
Line 278, column 4: illegal start of expression
Line 0, column 0:
4 errors

The code snipet it refers to is

 String temp = 
 xspAttr.addAttribute(
   ,
   select,
   select,
   CDATA,
   name
 );


 this.contentHandler.startElement(
   http://www.w3.org/1999/XSL/Transform;,
   value-of,
   xsl:value-of,
   xspAttr
 );
 xspAttr.clear();



 this.contentHandler.endElement(
   http://www.w3.org/1999/XSL/Transform;,
   value-of,
   xsl:value-of
 );

 ;

As you can see the string is closed three commands down.  There is no way 
this can work.
Is there another way to store the content of a node in a string?

Bert

BTW I'm using todays CVS


-
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: xsp logicsheet

2002-04-30 Thread Christian Haul

On 30.Apr.2002 -- 09:50 PM, Bert Van Kets wrote:
 At 10:38 30/04/2002 -0300, you wrote:
 
 I guess it's
 
  String temp = xsl:value-of select=name/;
 
 or
 
  String temp = new String(xsl:value-of select=name/);
 
 Alejandro
 Tried it, doesn't work.  I guess it must be a bug.
 If I use
 String temp = xsl:value-of select=name/
 I get
 
 org.apache.cocoon.ProcessingException: Exception in creating Transform 
 Handler: org.apache.cocoon.ProcessingException: Language Exception: 
 org.apache.cocoon.components.language.LanguageException: Error compiling 
 listCreateQuery_xsp:
 Line 252, column 23: unclosed character literal
 Line 252, column 22: illegal start of expression
 Line 278, column 6: unclosed character literal
 Line 278, column 4: illegal start of expression
 Line 0, column 0:
 4 errors
 
 The code snipet it refers to is
 
 String temp = 
 xspAttr.addAttribute(
   ,
   select,
   select,
   CDATA,
   name
 );
 
 
 this.contentHandler.startElement(
   http://www.w3.org/1999/XSL/Transform;,
   value-of,
   xsl:value-of,
   xspAttr
 );
 xspAttr.clear();
 
 
 
 this.contentHandler.endElement(
   http://www.w3.org/1999/XSL/Transform;,
   value-of,
   xsl:value-of
 );
 
 ;
 
 As you can see the string is closed three commands down.  There is no way 
 this can work.
 Is there another way to store the content of a node in a string?

Your xsl is not applied but inserted. Your final XSP still contains the
xsl tag which has no known logicsheet namespace. Thus it is outputted
to the rest of your pipeline.

If we knew more, we might be able to suggest a working solution to your
original problem.

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]