Re: xsp question

2003-06-26 Thread Roger I Martin PhD
I use Netbeans to check the xml.  It can also be used for performing xslt
per file rather than building the cocoon war and redeploying it on tomcat.
For some xml I've also got it to validate the xml to the dtd and xsd's.  For
xsp I've only verified checking it for wellformness.

I also recommend that you reorganise your project so that it isn't sub to
the Cocoon examples; just use what is needed, the cocoon-*.jar's and lib
dependencies for starters.  It is also possible to work on your webapp in
it's deployed directories and then eventually bring it back to a project
directory and develop a build.xml for ant at that point.  When working in
it's deployed state, out of nervousness I make sure there is no associated
war file in tomcat/webapps and constantly delete the associated tomcat work
files in the tomcat/work/Catalina/localhost/mywebapp.  When testing xsp's I
leave the work files and put a mount in Netbeans at the package root of the
generated *_xsp.java files.

A code writing cycle which includes Cocoon build and deployment can be
debilitating to say the least. Can be a real stumbling block for developers
working with Cocoon for the first time. It is completely unnecessary but it
is the way the all-to-familiar Cocoon developer's have structured their
project.  Otherwise Cocoon is a powerful servlet.

-Roger

- Original Message -
From: "Tim Bachta" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 6:11 PM
Subject: RE: xsp question


I tried using more tags like you suggested and I get an error:

The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error
and then click the Refresh button, or try again later.





End tag 'content' does not match the start tag 'tasks'. Error processing
resource
'http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1'.
Line 167, Position 3


--^


Thanks

Tim Bachta



-Original Message-
From: Roger I Martin PhD [mailto:[EMAIL PROTECTED]
Sent: Wednesday, June 25, 2003 4:51 PM
To: [EMAIL PROTECTED]
Subject: Re: xsp question

You need to put more starts and stops(only where your doing Java) to the
xsp:logic...see below. at the bottom I pasted some xsp with logic that I
know is working.
- Original Message -
From: "Tim Bachta" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 4:33 PM
Subject: xsp question


I am trying to use logic in an xsp page to get the output formatted
correctly, here is what I want the output to look like





  2003-05-20

  

0

Somebodys, Name

0

Somebodys, Name2

0

Somebodys, Name3

  







here is the code that I am using





   String date = ;

   if(!date.equalsIgnoreCase(oldDate))

   { oldDate = date;


 



   








   }


   

 

   




   if(!date.equalsIgnoreCase(oldDate))

   {




 


   }





and here is the result that I am getting:




<http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##>
- 

  2003-05-22 00:00:00.0


<http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##>
- 

  }

  

  if(!date.equalsIgnoreCase(oldDate)) {

  

  


<http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##>
- 

  2003-05-23 00:00:00.0


<http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##>
- 

  }

  

  if(!date.equalsIgnoreCase(oldDate)) {

  

  


<http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##>
- 

  2003-05-24 00:00:00.0


<http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##>
- 

  }

  

  if(!date.equalsIgnoreCase(oldDate)) {

  

  





If anyone knows of a way to do this correctly I would greatly appreciate
the help.



Thank you



Tim Bachta



  if(!selectMap && parameterNames!=null &&
parameterNames.length>0)
  {
   //System.out.println("here");
   str=mapIDValues[0];
   boolean check=false;
   int index=str.length()-1;
   while(!check && index>=0)
   {
if(!Character.isDigit(str.charAt(index)))
{
  check=true;
  index++;
}
else if(index==0)
{
 check=true;
}
else
{
 index--;
}
   }
   if(check)
   {
  mapIDPrefix=str.substring(0,index);

mapIDIndex=Integer.parseInt(str.substring(index,str.length(

Re: xsp question

2003-06-26 Thread Frank Taffelt
take a look at the grouping features from esql, maybe these could ease your
task.

hth,
frank


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



RE: xsp question

2003-06-25 Thread Tim Bachta
I tried using more tags like you suggested and I get an error:

The XML page cannot be displayed 
Cannot view XML input using XSL style sheet. Please correct the error
and then click the Refresh button, or try again later. 





End tag 'content' does not match the start tag 'tasks'. Error processing
resource
'http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1'.
Line 167, Position 3 


--^


Thanks

Tim Bachta
 
 

-Original Message-
From: Roger I Martin PhD [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, June 25, 2003 4:51 PM
To: [EMAIL PROTECTED]
Subject: Re: xsp question

You need to put more starts and stops(only where your doing Java) to the
xsp:logic...see below. at the bottom I pasted some xsp with logic that I
know is working.
- Original Message -
From: "Tim Bachta" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 4:33 PM
Subject: xsp question


I am trying to use logic in an xsp page to get the output formatted
correctly, here is what I want the output to look like





  2003-05-20

  

0

Somebodys, Name

0

Somebodys, Name2

0

Somebodys, Name3

  







here is the code that I am using





   String date = ;

   if(!date.equalsIgnoreCase(oldDate))

   { oldDate = date;


 



   








   }


   

 

   




   if(!date.equalsIgnoreCase(oldDate))

   {




 


   }





and here is the result that I am getting:




<http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##>
- 

  2003-05-22 00:00:00.0


<http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##>
- 

  }

  

  if(!date.equalsIgnoreCase(oldDate)) {

  

  


<http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##>
- 

  2003-05-23 00:00:00.0


<http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##>
- 

  }

  

  if(!date.equalsIgnoreCase(oldDate)) {

  

  


<http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##>
- 

  2003-05-24 00:00:00.0


<http://localhost:8080/cocoon/vyzo/Room_Report_pdf?cocoon-view=debug1##>
- 

  }

  

  if(!date.equalsIgnoreCase(oldDate)) {

  

  





If anyone knows of a way to do this correctly I would greatly appreciate
the help.



Thank you



Tim Bachta



  if(!selectMap && parameterNames!=null &&
parameterNames.length>0)
  {
   //System.out.println("here");
   str=mapIDValues[0];
   boolean check=false;
   int index=str.length()-1;
   while(!check && index>=0)
   {
if(!Character.isDigit(str.charAt(index)))
{
  check=true;
  index++;
}
else if(index==0)
{
 check=true;
}
else
{
 index--;
}
   }
   if(check)
   {
  mapIDPrefix=str.substring(0,index);

mapIDIndex=Integer.parseInt(str.substring(index,str.length()));
   }


 Map Locations
 Location
#XYMAP_ID

int count=1;
for(index=0;index<xValues.length;index++)
  {

   if(removeRowSet.elementAt(index)==null)
   {
str=xValues[index];

   count
   
X
str
  
  
str=yValues[index];
  
   
Y
str
  
  
str=mapIDPrefix+mapIDIndex;
  
   
MAP_ID
str
  
  
 mapIDIndex++;
 count++;
}
  }
  int priorIndex=index-1;
  for(index=0;index<appendRange;index++)
  {
str=xValues[priorIndex];

   priorIndex+index+2
   
X
str
  

 str=yValues[priorIndex];

   
Y
str
  

   str=mapIDPrefix+mapIDIndex;

   
MAP_ID
str
  

 mapIDIndex++;
  }

 
 
  }




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


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



Re: xsp question

2003-06-25 Thread Roger I Martin PhD
You need to put more starts and stops(only where your doing Java) to the
xsp:logic...see below. at the bottom I pasted some xsp with logic that I
know is working.
- Original Message -
From: "Tim Bachta" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, June 25, 2003 4:33 PM
Subject: xsp question


I am trying to use logic in an xsp page to get the output formatted
correctly, here is what I want the output to look like





  2003-05-20

  

0

Somebodys, Name

0

Somebodys, Name2

0

Somebodys, Name3

  







here is the code that I am using





   String date = ;

   if(!date.equalsIgnoreCase(oldDate))

   { oldDate = date;


 



   








   }


   

 

   




   if(!date.equalsIgnoreCase(oldDate))

   {




 


   }





and here is the result that I am getting:





- 

  2003-05-22 00:00:00.0



- 

  }

  

  if(!date.equalsIgnoreCase(oldDate)) {

  

  



- 

  2003-05-23 00:00:00.0



- 

  }

  

  if(!date.equalsIgnoreCase(oldDate)) {

  

  



- 

  2003-05-24 00:00:00.0



- 

  }

  

  if(!date.equalsIgnoreCase(oldDate)) {

  

  





If anyone knows of a way to do this correctly I would greatly appreciate
the help.



Thank you



Tim Bachta



  if(!selectMap && parameterNames!=null &&
parameterNames.length>0)
  {
   //System.out.println("here");
   str=mapIDValues[0];
   boolean check=false;
   int index=str.length()-1;
   while(!check && index>=0)
   {
if(!Character.isDigit(str.charAt(index)))
{
  check=true;
  index++;
}
else if(index==0)
{
 check=true;
}
else
{
 index--;
}
   }
   if(check)
   {
  mapIDPrefix=str.substring(0,index);

mapIDIndex=Integer.parseInt(str.substring(index,str.length()));
   }


 Map Locations
 Location
#XYMAP_ID

int count=1;
for(index=0;index

RE: XSP question: How to set tag attributes dynamically?

2002-04-25 Thread Volker Schneider

Hi Artur,

thank you very much, that works fine.

Best regards,
Volker

-Original Message-
From: Artur Bialecki [mailto:[EMAIL PROTECTED]]
Sent: Donnerstag, 25. April 2002 16:27
To: [EMAIL PROTECTED]
Subject: RE: XSP question: How to set tag attributes dynamically?



Hello,

String yourString = "blah";
...

  youString
  
yourString
  


will create:




I hope ;)

For more info look in:
cocoon-2.0.2/src/java/org/apache/cocoon/components/language/xsp/java
xsp.xsl - for all xsp tags
.xsl - for how they can be used.

Artur...

> -Original Message-
> From: Volker Schneider [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 25, 2002 9:57 AM
> To: [EMAIL PROTECTED]
> Subject: XSP question: How to set tag attributes dynamically?
>
>
> Dear colleagues,
>
> does anybody know how I can set a tag attribute within xsp, for example
>
> ...
> String theLanguage = "en";
> 
> ...
>
> How can I fill the "en" into the language attribute from the JAVA
variable?
>
> The same problem is to set dynamic tags:
>
> ...
>
> How can I fill the ??? from JAVA?
>
> Thank you, best regards
> - Volker -
>
> -
> 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]>


-
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 question: How to set tag attributes dynamically?

2002-04-25 Thread Graeme Rocher

In this case you could use XSLT, so that you generate some xml, maybe like
so

getLanguage()

and then in your transformation you do




you can then transform the result of that into whatever...

Graeme

-Original Message-
From:
[EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
.org]On Behalf Of Volker Schneider
Sent: 25 April 2002 14:57
To: [EMAIL PROTECTED]
Subject: XSP question: How to set tag attributes dynamically?


Dear colleagues,

does anybody know how I can set a tag attribute within xsp, for example

...
String theLanguage = "en";

...

How can I fill the "en" into the language attribute from the JAVA variable?

The same problem is to set dynamic tags:

...

How can I fill the ??? from JAVA?

Thank you, best regards
- Volker -

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


-
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: XSP question: How to set tag attributes dynamically?

2002-04-25 Thread Artur Bialecki


Hello,

String yourString = "blah";
...

  youString
  
yourString
  


will create:




I hope ;)

For more info look in:
cocoon-2.0.2/src/java/org/apache/cocoon/components/language/xsp/java
xsp.xsl - for all xsp tags
.xsl - for how they can be used.

Artur...

> -Original Message-
> From: Volker Schneider [mailto:[EMAIL PROTECTED]]
> Sent: Thursday, April 25, 2002 9:57 AM
> To: [EMAIL PROTECTED]
> Subject: XSP question: How to set tag attributes dynamically?
> 
> 
> Dear colleagues,
> 
> does anybody know how I can set a tag attribute within xsp, for example
> 
> ...
> String theLanguage = "en";
> 
> ...
> 
> How can I fill the "en" into the language attribute from the JAVA variable?
> 
> The same problem is to set dynamic tags:
> 
> ...
> 
> How can I fill the ??? from JAVA?
> 
> Thank you, best regards
> - Volker -
> 
> -
> 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]>
> 

-
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: XSP Question

2002-03-19 Thread Piroumian, Konstantin

> From: Joseph Rajkumar [mailto:[EMAIL PROTECTED]] 
> 
> Hi
>   I understand that db.xsl has to be modified,
> but my problem is that I am not able to set any
> attribute values for the db:employees tag.
> 
>   In this case I am trying to set the 
> attribute start to some value or default of 0
> and count to some value or a default of 7, but
> when I try to print the value of @start or @count
> in the db.xsl, it does not contain any values at all.

So, maybe the problem is not in db.xsl? Are you sure that you get request
params as expected? Look at the generated XSP java class to see where the
problem can be.

--
Konstantin Piroumian 
[EMAIL PROTECTED]

> 
> Regards
> Joseph Rajkumar 
> ==
> > > 
> > > 
> > >   
> > > 
> > >   
> > >  
> > >   
> > > 
> > > 
> > > 
> > >  
> > >
> > >  
> > >
> > >  
> > >
> > > 
> > 
> > Range attributes are not supported by db logicsheet, it's just a 
> > sample. To add some new features you should add them to the 
> logicsheet 
> > (see db.xsl).
> 
> -
> 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]>

-
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: XSP Question

2002-03-19 Thread Joseph Rajkumar

Hi
I understand that db.xsl has to be modified,
but my problem is that I am not able to set any
attribute values for the db:employees tag.

In this case I am trying to set the 
attribute start to some value or default of 0
and count to some value or a default of 7, but
when I try to print the value of @start or @count
in the db.xsl, it does not contain any values at all.

Regards
Joseph Rajkumar
==
> > 
> > 
> >   
> > 
> >   
> >  
> >   
> > 
> > 
> > 
> >  
> >
> >  
> >
> >  
> >
> > 
> 
> Range attributes are not supported by db logicsheet, it's just a sample. To
> add some new features you should add them to the logicsheet (see db.xsl).

-
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: XSP Question

2002-03-19 Thread Piroumian, Konstantin

> -Original Message-
> From: Joseph Rajkumar [mailto:[EMAIL PROTECTED]] 
> Sent: Tuesday, March 19, 2002 12:37 AM
> To: cocoon-users
> Subject: XSP Question
> 
> 
> Hi Folks
> 
>   I have taken Konstantin Piroumian's 
> sample logic sheet ie "db.xsp" and I am trying
> to modify it so that I could select from a certain
> range of date ie I want to use the "LIMIT # #" command
> to select and I am using the following syntax
> 
> 
> 
>   
> 
>   
>  
>   
> 
> 
> 
>  
>
>  
>
>  
>
> 

Range attributes are not supported by db logicsheet, it's just a sample. To
add some new features you should add them to the logicsheet (see db.xsl).

--
Konstantin Piroumian 
[EMAIL PROTECTED]

> 
> 
> 
>  
> 
> 
> Any help will be greatly appreciated.
> 
> Joseph Rajkumar
> email: [EMAIL PROTECTED]
> 
> -
> 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]>

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