RE: XSP in a stylesheet help

2001-12-19 Thread neil

Wouldn't it be easier to compute the row number in the stylesheet instead of
XSP?

I think  will give you the 1 based index
of the current element
e.g.

 
   
   

which might be what you need. Otherwise you could define a variable and
increment it to count the rows.

Great XSLT examples are available at:
http://wwbota.free.fr/XSLT_models/README.htm and sites it refers to (see
http://IncrementalDevelopment.com/xsltrick/ for numeric computations).


-Original Message-
From: Andrew C. Oliver [mailto:[EMAIL PROTECTED]]
Sent: Thursday, 20 December 2001 2:18 AM
To: [EMAIL PROTECTED]
Subject: REQ: XSP in a stylesheet help


Hi all,

(please CC me your response, I get the digest)

I'm working on a stylesheet that is intent on organizing the simple-sql
example page ($COCOON/docs/samples/sql/sql-page.xml) into a gnumeric
style xml spreadsheet.  I'm very close, but I need to an incremental row
number.  I figured I'd just use XSP inside of my stylesheet, but all
I've accomplished so far is a literal printout of what is in between the
 tags.  I thought perhaps I needed some other directives
inside the cocoon configuration but I've not

Attached is my stylesheet so far.  Can someone point me in the right
direction.  I've been reading like mad (yes I read xml.apache.org), and
I'm just short of the understanding I need to pull this off.  An example
of a stylesheet that uses an incremental value via xsp would be ideal,
or if someone could show me how to get this to work would be even
better.  One thing I know I've got to figure out is how to get the
expression value into the row attribute, but first even getting the expr
tag interpreted correctly would be a good start.

Once I get a few of these finished we'll probably have enough test cases
for our XML->XLS serialization project (sourceforge.net/projects/poi).
(it shares gnumeric's xml format) We hope to release a beta on Monday.

Thanks,

Andy

-


http://www.w3.org/1999/XSL/Transform";

xmlns:sql="http://apache.org/cocoon/SQL/2.0";

xmlns:xsp="http://apache.org/1999/XSP/Core";
  >

  
  
int incr = 5;
  

  
   http://www.gnome.org/gnumeric/v7";>
 
 
 
 2
 

 
 


 
 

 

 

  

  
  
  

  
 incr
 
   


 
 
  

 
 



--
www.superlinksoftware.com
www.sourceforge.net/projects/poi - port of Excel format to java
http://developer.java.sun.com/developer/bugParade/bugs/4487555.html
- fix java generics!


The avalanche has already started. It is too late for the pebbles to
vote.
-Ambassador Kosh


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




HSSF-Serializer stylesheet (WAS: Re: XSP in a stylesheet help)

2001-12-19 Thread Andrew C. Oliver

Thanks everyone who helped.  As it turned out I didn't need XSP (and the
O'Reilly book deceived me).  Here is the final solution to my problem. 
(I ran this against the simple-sql example).  I realize this is the
wrong list to ask, but we'd love to have some more examples if anyone is
game (I'll ask on the developers list as well).

Thanks,

Andy


--STYLESHEET ---



http://www.w3.org/1999/XSL/Transform";
 
xmlns:sql="http://apache.org/cocoon/SQL/2.0";
  >

  

  
   http://www.gnome.org/gnumeric/v7";>
 
 
 
 2
 
 
 
 


 
 

 

 

  

  
  
  

  
 
  
  
 
  
   


 
 
  

 
 




 
-- 
www.superlinksoftware.com
www.sourceforge.net/projects/poi - port of Excel format to java
http://developer.java.sun.com/developer/bugParade/bugs/4487555.html 
- fix java generics!


The avalanche has already started. It is too late for the pebbles to
vote.
-Ambassador Kosh


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