TR: HSSFSerializer / Null Pointer exception

2002-07-31 Thread PLISSON Sébastien (DSIT-XS/I)



>  -Message d'origine-
> De :  PLISSON Sébastien (DSIT-XS/I)  
> Envoyé :  jeudi 1 août 2002 08:11
> À :   [EMAIL PROTECTED]
> Objet :   HSSFSerializer / Null Pointer exception
> 
> 
> Hi,
> 
> When i try to use the HSSFSerializer from java, using an XMLReader,
> i get a NullPointer Exception when i use the parse function.
> 
> I use POI, Xerces and xalan from cocoon 2.0.3 distribution.
> All is deployed on Websphere 3.5.6.
> 
> Any idea how to solve this problem ?
> 
> Thanks.
> Seb
> 
> Here is my code :
> 
> / Output XML to XLS
>   //
>   // Instantiate a TransformerFactory.
>   javax.xml.transform.TransformerFactory tFactory = 
>   
> javax.xml.transform.TransformerFactory.newInstance();
>   // Verify that the TransformerFactory implementation you are
> using
>   // supports SAX input and output (Xalan-Java does!).
>   if
> (tFactory.getFeature(javax.xml.transform.sax.SAXSource.FEATURE) &&
>   
> tFactory.getFeature(javax.xml.transform.sax.SAXResult.FEATURE))
>   {
> //System.out.println("sauveXMLToXLS - Debut
> transformation");
> // Cast the TransformerFactory to SAXTransformerFactory.
> javax.xml.transform.sax.SAXTransformerFactory saxTFactory
> =
>   
> ((javax.xml.transform.sax.SAXTransformerFactory) tFactory);
> // Create a Templates ContentHandler to handle parsing of
> the
> // stylesheet.
> javax.xml.transform.sax.TemplatesHandler templatesHandler
> =
>   
> saxTFactory.newTemplatesHandler();
>   
> // Create an XMLReader and set its ContentHandler.
> org.xml.sax.XMLReader reader =
>   
> org.xml.sax.helpers.XMLReaderFactory.createXMLReader();
> reader.setContentHandler(templatesHandler);
>   
> // Parse the stylesheet.
> reader.parse(xslFilename);
>   
> // Get the Templates object (generated during the parsing
> of the stylesheet)
> // from the TemplatesHandler.
> javax.xml.transform.Templates templates =
>   
> templatesHandler.getTemplates();
> // Create a Transformer ContentHandler to handle parsing
> of
> // the XML Source.
> javax.xml.transform.sax.TransformerHandler
> transformerHandler
>=
> saxTFactory.newTransformerHandler(templates);
> // Reset the XMLReader's ContentHandler to the
> TransformerHandler.
> reader.setContentHandler(transformerHandler);
>   
> // Set the ContentHandler to also function as a
> LexicalHandler, which
> // can process "lexical" events (such as comments and
> CDATA).
>   
> reader.setProperty("http://xml.org/sax/properties/lexical-handler";,
>   
> transformerHandler);
>   
> // Set up a Serializer to serialize the Result to a file.
> HSSFSerializer ser = new HSSFSerializer();
> ser.setOutputStream(xlsFile);
> 
> //org.apache.cocoon.serialization.XMLSerializer ser = new
> org.apache.cocoon.serialization.XMLSerializer();
> //ser.setOutputStream(System.out);
>   
> // The Serializer functions as a SAX ContentHandler.
> javax.xml.transform.Result result =
>   new
> javax.xml.transform.sax.SAXResult((org.xml.sax.ContentHandler)ser);
> transformerHandler.setResult(result);
>   
> // Parse the XML input document.
> reader.parse(xmlFilename); // Here i get NullPointer
> Exception
> 
> 
> Sébastien PLISSON
> DSIT XS / Infocentre
> Tél. : 30.13.90
> 

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




Forms

2002-07-31 Thread Richard




Hi Guys,
 
Good Day!
 
On http://xml.apache.org/cocoon/tutorial/tutorial-develop-webapp.html
 
It is written that...
The website specification 
is missing the tags for form building, we will provide an example 
here: 
 
Where can I find the "tags for form building" syntax and description?
 
in the codes... 
 
    
  You can 
create a department by typing in 
the  name and pressing 
the "submit" button.    
    
  Name: 
    
        
  * These 
fields are required.    

 
How does the handler="create-dept.html"> attribute work?
 
The  element is not required by 
the FormValidatorAction right? 
This element were used only by the xsl 
transformation.
 
Thanks!


cocoon 2.0.3 on tomcat 3.2.4

2002-07-31 Thread Crispin Murphy

Hello there.  I am trying to get cocoon up and running in tomcat 3.2.4.

I have done the following:

1.  Installed tomcat.
2.  Loaded the cocoon.war file into $tomcat_home/webapps.
3.  Removed the jaxp.jar file from tomcat/lib.  I would remove 
parser.jar but parser.jar does not exist.
4.  Installed xercesImpl-2.0.0.jar, xalan-2.3.1.jar, and xml-apis.jar 
into tomcat/lib.
5.  Installed the same 3 files into Java Home/jre/lib/endorsed/

Every time I try to access the cocoon page:

java.lang.NullPointerException
at org.apache.cocoon.servlet.CocoonServlet.service(CocoonServlet.java:999)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:405)
at org.apache.tomcat.core.Handler.service(Handler.java:287)
at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372)
at 
org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:806)
at org.apache.tomcat.core.ContextManager.service(ContextManager.java:752)
at 
org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:213)
at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416)
at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:501)
at java.lang.Thread.run(Thread.java:484)


Is the output.

I have managed to get cocoon 2.0.3 to fire up under tomcat 3.3.1, but I 
have another webapp that will not run under tomcat 3.3.1.

JDK is blackdown 1.3.1 for linux.

I have also tried building cocoon from source - same problem.

Every time I make a change, I blow away the tomcat/work directory - 
there's nothing stale there to cause this.

I have also tried renaming the xerces jar file to parser.jar to see if 
that worked.  No luck.

I can't find anything else in the FAQs to help, nor google groups / 
google...

Help, anyone?

Thanks!

Crispin

-- 
Those who would improve their argument with volume do nothing but deafen themselves




-
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: [docs] Installation on resin 2.1.1 (was R: resin 2.1.x problems)

2002-07-31 Thread Vadim Gritsenko

> From: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]

...
> > Since it's by far much easier and cleaner than the procedure for
> > previous
> > versions, I suggest it be added to the documentation.
> >
> > How can we achieve this?

Please check it out:

http://cvs.apache.org/viewcvs.cgi/xml-cocoon2/src/documentation/xdocs/in
stalling/index.xml?rev=1.31&content-type=text/vnd.viewcvs-markup
"Installing on Resin 2.x"


Hope it helps

Vadim


> > L.
> >
> > -Messaggio originale-
> > Da: Robert S. Koberg [mailto:[EMAIL PROTECTED]]
> > Inviato: lunedì 29 luglio 2002 12.12
> > A: [EMAIL PROTECTED]
> > Oggetto: Re: resin 2.1.x problems
> >
> >
> > Hi,
> >
> > Lorenzo De Sio wrote:
> > > I just tried the following procedure (found on this list) to solve
> > > my problem w/Resin 2.1.1.
> > >
> > > It worked. What about adding it to the installation docs?
> > >
> > > L.
> >
> >
> > Another thing you can do in the RESIN_HOME/conf/resin.conf is:
> >
> >
> >true
> >
> > when set to true it goes to your WEB-INF/lib
> >
> > best,
> > -Rob
...


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




object rexx script within xslt

2002-07-31 Thread Gerald Michalitz

im trying to use the objectrexx script within an xsltransformation
my xsl-file has this:


 


 
   
 

and my xml-file has this:



but when i(cocoon) try to transform i get an emty page, it seems that the
rexx script did not get the argument from the deadline-node

if you would be so kind and have a short look at it

thankx

gerald


-
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: own generator

2002-07-31 Thread Geoff Howard

How about this?  If I read you right, what you're really going for is not
getting the sitemap parameters but the request parameters.  There's a
difference between doing that from within the sitemap and within java code
like this.  I'm not positive this will compile, and I'm not 100% positive
that this keeps up with any changes in the last few months but I think it's
OK on both counts.  Of course, one would never want to put all that text
formatted data in there - I just wanted to change as little as possible for
the sake of comparison.

// for the setup() method
import org.apache.cocoon.environment.SourceResolver;
import java.util.Map;
import org.apache.avalon.framework.parameters.Parameters;
// used to get and hold the request parameters.
import org.apache.cocoon.environment.ObjectModelHelper;
import org.apache.cocoon.environment.Request;
import java.util.Enumeration;


public class NewAnyName extends AbstractGenerator 
{

// will be initialized in the setup() method and used in generate()
Request request = null;
Enumeration paramNames = null;

/**
 * Implement the generate() method from AbstractGenerator.
 * It simply generates SAX events using SAX methods.  I haven't
 * tested it, but this has to be faster than parsing them from a string.
 * I've made comments on many of the original comments (which have been
promoted
 * to "really commented out" status: )
 */

public void generate() throws IOException, SAXException, 
ProcessingException
{
  // xspAttr will stay empty for this simple implementation
  // If we had any attributes in our tags, we would add them to this
variable
  // before the call to startElement(), and either create a new
AttributesImpl
  // instance for each element, or reuse one being careful to reset it
before 
  // each use.
  
  AttributesImpl xspAttr = new AttributesImpl();
  // contentHandler is inherited from
org.apache.cocoon.xml.AbstractXMLProducer
  contentHandler.startDocument();
  
This string will be feeded to the transformer pipeline as sax
events
// String xmlText = "\nMy first Cocoon 2 generator\n";
// - nope, do this with SAX:
  contentHandler.startElement("", "doc", "doc", xspAttr);
  
  // NOTE: xml is not the place to worry about line break characters.
For the sake of the
  // simple example, I left many of yours in, but you really would
handle the parameter information
  // using nested tags (which you can do easily by nesting
startElement()-endElement() paired calls inside
  // this element).
  // By the way, the characters(char[] chars, int start, int end) begs
to be overloaded with 
  // a version like characters(String justPutTheWholeThingIn) that
handles the conversion
  // to a character array and assumes you want from beginning to end.  I
thought some of the cocoon
  // Generators did this, but I can't find any right now.  You'll
probably want to set up a convenient 
  // BaseGenerator with helpers like that and extend it for your real
Generators.
  contentHandler.characters("My first Cocoon 2
generator\n".toCharArray(),0,"My first Cocoon 2 generator\n".length());

This object will read and parse the XML content
// no longer needed since we're using SAX methods
//XMLReader xmlReader = XMLReaderFactory.createXMLReader();

super.xmlConsumer will receive the SAX events
xmlReader.setContentHandler(super.xmlConsumer);

// This is _not_ how you get your request parameters.
//String paramNames[] = parameters.getNames();

// text way
//xmlText += "Number of parameters: " + paramNames.length + "\n";
// SAX way
contentHandler.characters(("Number of parameters: " +
paramNames.length + "\n").toCharArray(),0,("Number of parameters: " +
paramNames.length + "\n").length());

//same thing:
//xmlText += "Parameter names:\n";
contentHandler.characters(("Parameter names:
\n").toCharArray(),0,("Parameter names: \n").length());

//for(int i = 0; i < paramNames.length; i++)
while (paramNames.hasMoreElements()) {
//xmlText += paramNames[i] + "\n";
String param = (String)paramNames.nextElement() + "\n";
contentHandler.characters(param.toCharArray(),0,param.length());
}

//xmlText += "Source: " + source + "\n";
contentHandler.characters(("Source: " + source +
"\n").toCharArray(),0,("Source: " + source + "\n").length());

//xmlText += "";
contentHandler.endElement("","doc", "doc");

// no longer needed with SAX
Create an InputSource from the hardcoded string
//InputSource src = new InputSource(new StringReader(xmlText));

// no longer needed with SAX
Parse the XML input and generate SAX events to the consumer
//xmlRe

Accessing SVG's in Cocoon via SVG Serializer

2002-07-31 Thread Torsten Knodt

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,
I've a question regarding href's in the image tag of SVG's. Is there a way to 
access the actual sitemap context from an svg?

Example Sitemap:













Example resizer.xsl:
  
  

  



The example above doesn't work. Using file:// is no problem, but I want to use 
it with dynamically created content, so I can't access the filesystem 
directly.

Thanks in advance
Torsten Knodt
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9SDHOvxZktkzSmiwRAsotAKCYbqxxRNPSpECNqPz5cUR2vvE7DwCffYcG
rohTz1KgS4ihUGwr513Z0cQ=
=80Qr
-END PGP SIGNATURE-


-
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: own generator

2002-07-31 Thread Vadim Gritsenko

> From: Istvan Beszteri [mailto:[EMAIL PROTECTED]]
> 
> Hi All,
> 
> I'd like to write my own generator. I have written the following
generator
> according to the documents on the Cocoon 2 site, by extending an
example.
> I can start the generator properly, but I can not pass any parameter
to it.
> Somehow I'd like to reach the HTTP request itself (requested URI,
headers
> etc.) within the generator.
> 
> public class AnyName extends AbstractGenerator
> {

ServletGenerator has:

protected Request request;

...

> I use the following pipeline. In the generated XML I could see the
> parameters, and the source, but it seems that the source is null, and
no
> parameters are passed to the generator.
> 
> 
> 
>   
> 
> 

http://xml.apache.org/cocoon/faq/faq-actions.html#faq-2

See also recent threads.

Vadim


> 
>   
> 
> 
> 
>   
>   
> 
>   
> 
> 
> How could I get the request data in the generator?
> 
> Thanks in advance!
> Br,
>   Istvan
> 


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




own generator

2002-07-31 Thread Istvan Beszteri

Hi All,

I'd like to write my own generator. I have written the following generator 
according to the documents on the Cocoon 2 site, by extending an example.
I can start the generator properly, but I can not pass any parameter to it.
Somehow I'd like to reach the HTTP request itself (requested URI, headers 
etc.) within the generator.

public class AnyName extends AbstractGenerator
{
/**
 * The only implemented method from AbstarctGenerator.
 * It simply generates SAX events from a string.
 */

public void generate() throws IOException, SAXException, 
ProcessingException
{
//This string will be feeded to the transformer pipeline as sax events
String xmlText = "\nMy first Cocoon 2 generator\n";

//This object will read and parse the XML content
XMLReader xmlReader = XMLReaderFactory.createXMLReader();

//super.xmlConsumer will receive the SAX events
xmlReader.setContentHandler(super.xmlConsumer);

String paramNames[] = parameters.getNames();

xmlText += "Number of parameters: " + paramNames.length + "\n";

xmlText += "Parameter names:\n";

for(int i = 0; i < paramNames.length; i++)
xmlText += paramNames[i] + "\n";

xmlText += "Source: " + source + "\n";

xmlText += "";

//Create an InputSource from the hardcoded string
InputSource src = new InputSource(new StringReader(xmlText));

//Parse the XML input and generate SAX events to the consumer
xmlReader.parse(src);
}
}

I use the following pipeline. In the generated XML I could see the 
parameters, and the source, but it seems that the source is null, and no 
parameters are passed to the generator.



  



  



  
  

  


How could I get the request data in the generator?

Thanks in advance!
Br,
  Istvan

-
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: LinkSerializer not seeing links (href, src)

2002-07-31 Thread Torsten Knodt

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello Vadim,
> > I have a second problem with LinkSerializer. Sometimes I can only see
> href's
> > (no src),
> Give an example (reproducible).
> > sometimes I can't see any links.
> Same here.
I wasn't able to reproduce the version, where only href's where recognised, 
but here's a version, which doesn't produce any links.
It's stripped down as much as possible. When it would work, you should see a 
broken link to test2.html.
The error xsl isn't included, it's the sample.

With kind regards
Torsten Knodt
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9SAolvxZktkzSmiwRAndYAJ0SgE1mV0heRoaups9ovf3WJrhaVACggrs6
3DDSqIDMr/NU7e38YnQCCQg=
=EMJZ
-END PGP SIGNATURE-



http://apache.org/cocoon/sitemap/1.0";>
  

  



  
true

true

true
  



  
-//W3C//DTD XHTML 1.0 Transitional//EN

http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd

	iso-8859-1
1
  

  



  

  

  

  

  

  

  

  

  



  

  



Title: Test



  

  

  




-
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: advice on a simple architecture for xml versioning

2002-07-31 Thread Bertrand Delacretaz

On Wednesday 31 July 2002 14:51, Giuseppe Bonelli wrote:
>. . .
> 3. I have the impression that a CVS like system could be an option, but I
> don't know the details of the system, so I cannot tell for sure and I am
> not able to evaluate the implications of using it as a xml document based
> (vs. a code based) versioning system.
>. . .

Integrating CVS as a storage back-end for Cocoon (WriteableSource?) would be 
great and would certainly work for XML too, but the diffs will not be very 
usable IMHO.

CVS diffs are line-oriented, not element-oriented, which might make it very 
hard to display the diffs in a meaningful way to the user.

-Bertrand

-
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: esql - oracle stored procedure returns resultset

2002-07-31 Thread Frank Taffelt

- Original Message -
From: "Luca Morandini" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 31, 2002 11:36 AM
Subject: RE: esql - oracle stored procedure returns resultset


> just for the record: I use SQLTransformer, which runs smoothly even with
multiple cursors returned by SPs.
> I used this method for a couple of projects and for some dozens SPs... not
a glitch.

thanks, tried it out . works quit well.

Christian, i'm pretty sure that the current esql is not able to run oracle
sp in that way.
It would be possible if i could write something like that:



The esql:parameter is restricted to java.sql.Type

Frank




-
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: [docs] Installation on resin 2.1.1 (was R: resin 2.1.x problems)

2002-07-31 Thread Vadim Gritsenko

> From: Lorenzo De Sio [mailto:[EMAIL PROTECTED]]
> 
> Robert,
> 
> it worked perfectly on a fresh Resin installation.

You mean no modifications to resin? No, it does not work. Have you tried
http://localhost:8080/cocoon/xscript/soap-getquote1 sample?

However,

>true

Helps (have not tested all the samples though)


Vadim


 
> Since it's by far much easier and cleaner than the procedure for
previous
> versions, I suggest it be added to the documentation.
> 
> How can we achieve this?
> 
> 
> L.
> 
> -Messaggio originale-
> Da: Robert S. Koberg [mailto:[EMAIL PROTECTED]]
> Inviato: lunedì 29 luglio 2002 12.12
> A: [EMAIL PROTECTED]
> Oggetto: Re: resin 2.1.x problems
> 
> 
> Hi,
> 
> 
> Lorenzo De Sio wrote:
> > I just tried the following procedure (found on this list) to solve
my
> > problem w/Resin 2.1.1.
> >
> > It worked. What about adding it to the installation docs?
> >
> > L.
> >
> 
> 
> 
> Another thing you can do in the RESIN_HOME/conf/resin.conf is:
> 
>
>true
> 
> when set to true it goes to your WEB-INF/lib
> 
> best,
> -Rob
> 
> 
> 
...


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




Antwort: RE: Redirecting

2002-07-31 Thread michael_hampel

Hello,

  I already tried
  Context context = ObjectModelHelper.getContext(objectModel);
  String param = context.getInitParameter("param_one");

but also there my String is null.

Is there another way?

Thanx again for any help,


miHam


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




R: Multiple map:resource calls

2002-07-31 Thread Lorenzo De Sio

OK :-))

-Messaggio originale-
Da: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
Inviato: mercoledì 31 luglio 2002 15.45
A: [EMAIL PROTECTED]
Oggetto: RE: Multiple map:resource calls


> From: Lorenzo De Sio [mailto:[EMAIL PROTECTED]]
> 
> Hi Vadim,
> 
> I tried several possibilities, and I found a few points regarding my
webapp
> (I'm sure they're not C2 issues:-)):

...

> So it seems like:
> 
> a) A resource needs a serializer;

Yes, I looked into the code and I can confirm this. At least, in its
current implementation, resource needs serializer.

> b) A serializer prevents any further processing;

Yep.


> => In any matcher there can be only one ,
and it
> must be the last stage of the processing.

As of now, yep.


> I'm sure I'm wrong. :-) But please help me find why!
> 
> 2)
> 
> > Temporary work-around could be:
> > 
> >   
> > 
> >   
> >   
> > 
> >   
> >   
> > 
> 
> Just for curiosity, I tried the suggested workaround, but without the
>  (which, as said, stops further processing).
I
> found that the nested matchers are not evaluated in the context of
their
> "father", but in the same context:

In this sense, yep. Matchers do not change environment.


> that is, the nested  pattern="*"> must be changed to .

Consider it typo on my part: I meant "**". Unless, of course, instead of
{../1} you still want to use {1} - then "data/*" will be better.


> A working example is:
> 
>   
>   [...]
>   
>   
>   
>   
>   
>   
>   
>   [...]
>   
> 
> 
> Thanks,
> 
> 
> L.
...


-
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: xsl and http request header

2002-07-31 Thread Barbara Post

Thank you, it does work :

80

- Original Message -
From: ROSSEL Olivier <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 31, 2002 3:56 PM
Subject: RE: xsl and http request header


I think that you can do that using a xsl document() pointing to a
cocoon url with http generator and xml serializer.

This is a VERY powerful option of Cocoon.



> -Message d'origine-
> De: Barbara Post [mailto:[EMAIL PROTECTED]]
> Date: mercredi 31 juillet 2002 15:51
> À: [EMAIL PROTECTED]
> Objet: xsl and http request header
>
>
> Hello, can an xsl directly access http request header (like
> http request
> parameters) or should I use request generator ?
>
> I want a text field to have a size specified by the kind of browser...
>
> Maybe rather use browser selector to pass a parameter to my xsl...?
>
> Babs
>
>
> -
> 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]>



-
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: xsl and http request header

2002-07-31 Thread ROSSEL Olivier

I think that you can do that using a xsl document() pointing to a
cocoon url with http generator and xml serializer.

This is a VERY powerful option of Cocoon.



> -Message d'origine-
> De: Barbara Post [mailto:[EMAIL PROTECTED]]
> Date: mercredi 31 juillet 2002 15:51
> À: [EMAIL PROTECTED]
> Objet: xsl and http request header
> 
> 
> Hello, can an xsl directly access http request header (like 
> http request
> parameters) or should I use request generator ?
> 
> I want a text field to have a size specified by the kind of browser...
> 
> Maybe rather use browser selector to pass a parameter to my xsl...?
> 
> Babs
> 
> 
> -
> 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: Redirecting

2002-07-31 Thread Vadim Gritsenko

> From: [EMAIL PROTECTED]
> 
> Hello,
> 
>   I have two question and hope somebody can help me:
> 
>   1.) Are there any examples how to redirect with an Action that
inherits
>from AbstractXMLFormAction - how do I get the Redirector there
-
>if this is the right object to redirect?

getRedirector()


>   2.) How do I access the init-parameters of my web.xml in an action.
>I tried:
>  HttpContext context =
>   (HttpContext)ObjectModelHelper.getContext(objectModel);

Context context = ObjectModelHelper.getContext(objectModel);

Vadim

 
>   and
>   objectModel.get("httpservletcontext");
> 
>but that did not work.
> 
> 
> Thanks in advance for any help,
> 
> 
> miHam


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




xsl and http request header

2002-07-31 Thread Barbara Post

Hello, can an xsl directly access http request header (like http request
parameters) or should I use request generator ?

I want a text field to have a size specified by the kind of browser...

Maybe rather use browser selector to pass a parameter to my xsl...?

Babs


-
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: Multiple map:resource calls

2002-07-31 Thread Vadim Gritsenko

> From: Lorenzo De Sio [mailto:[EMAIL PROTECTED]]
> 
> Hi Vadim,
> 
> I tried several possibilities, and I found a few points regarding my
webapp
> (I'm sure they're not C2 issues:-)):

...

> So it seems like:
> 
> a) A resource needs a serializer;

Yes, I looked into the code and I can confirm this. At least, in its
current implementation, resource needs serializer.

> b) A serializer prevents any further processing;

Yep.


> => In any matcher there can be only one ,
and it
> must be the last stage of the processing.

As of now, yep.


> I'm sure I'm wrong. :-) But please help me find why!
> 
> 2)
> 
> > Temporary work-around could be:
> > 
> >   
> > 
> >   
> >   
> > 
> >   
> >   
> > 
> 
> Just for curiosity, I tried the suggested workaround, but without the
>  (which, as said, stops further processing).
I
> found that the nested matchers are not evaluated in the context of
their
> "father", but in the same context:

In this sense, yep. Matchers do not change environment.


> that is, the nested  pattern="*"> must be changed to .

Consider it typo on my part: I meant "**". Unless, of course, instead of
{../1} you still want to use {1} - then "data/*" will be better.


> A working example is:
> 
>   
>   [...]
>   
>   
>   
>   
>   
>   
>   
>   [...]
>   
> 
> 
> Thanks,
> 
> 
> L.
...


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




xsp problem

2002-07-31 Thread cyril vidal



hy,
 
In the last message, I've asked  
a question about a small factorial program, dynamically written with a 
recursive  XSLT named-template call and getting a parameter via HTTP 
request.
 


xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:http="http://xml.apache.org/cocoon/requestgenerator/2.0">
























1




 
 Now, for 
training, I just would like to do the same with XSP. So, instead of the 
recursive call to the xsl template name, I'de like to use a Java 
method:
 
This one might be the 
following:
 
   public static int 
factorialize (int input){   int result;   if 
(input>1) {   result=factorialize(input-1);   
}      else{    
result=1;  }    return 
input*result;}
 
Problem, I'm new to XSP and I don't 
know exactly how to do. I know I have to embeed this code in a 
 element, and get the result with a  but I 
ignore the correct syntax.
 
Can you give me some 
advice?
Thanks,
 
Cyril VidalEmail: [EMAIL PROTECTED]Web: http://www.planetexml.com


RE: LinkSerializer not seeing links (href, src)

2002-07-31 Thread Vadim Gritsenko

> From: Torsten Knodt [mailto:[EMAIL PROTECTED]]
> 
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA1
> 
> Hello,
> I have a second problem with LinkSerializer. Sometimes I can only see
href's
> (no src),

Give an example (reproducible).


> sometimes I can't see any links.

Same here.

Vadim


> The cocoon examples work without problems.
> The xhtml output validates against the DTD.
> If this helps you, DOCTYPE isn't in the output of my xhtml (don't know
why).
> 
> Oh yes, tested with cocoon 2.0.3 and cvs-version.
> 
> With kind regards
>   Torsten Knodt


-
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: xalan and request generator

2002-07-31 Thread Vadim Gritsenko

> From: Barbara Post [mailto:[EMAIL PROTECTED]]
> 
> Since the root of the document returned by 
> contains xmlns declaration, my xpath query against this document does
not
> work. Using xalan 2.3.1.
> 
> Any workaround ? or would need to have another stylesheet to move
xmlns
> declaration ?

You would have to fix your xpath query, it must contain error.

Vadim

> 
> http://xml.apache.org/cocoon/requestgenerator/2.0";
> target="/baepp/getcheckedplugs" source="">
>  
> 
> Thanks
> 
> Barbara


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




Redirect-to... wap

2002-07-31 Thread zze-STIENNE Nicolas FTRD/DMI/CAE

Hi !!

I have a problem with a  command.

For example, when I request the uri "monsite/wap/menu.contact", I would
like to be redirect to the uri "monsite/wap/contact/contact.info".

To do that, I have in my subdirectory monsite a sitemap with this lines
: 


[...]
  

  

 


  
  
  
  
   
   
  
  
  
  
 
   

  
[...]


The other pages (without redirection) works fine.

one wap terminal emulator says : 

Net Request   :
http://c-ace-st1.rd.francetelecom.fr:8080/cocoon/transrapide/wap/menu.co
ntact
Net Request   : error:neterr/compile-error.wml

 the screen stays blank and the source seams to be empty

another : 

Invalid WML Code



How could I resolve my problem ?
Is redirect-to command avaible with a wap terminal, a wml serializer ??

Thanks

Nicolas !!

Cocoon 2.0.2, jdk 1.3.1-03, tomcat 4.0.4, W2000

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




Redirecting

2002-07-31 Thread michael_hampel

Hello,

  I have two question and hope somebody can help me:

  1.) Are there any examples how to redirect with an Action that inherits
   from AbstractXMLFormAction - how do I get the Redirector there -
   if this is the right object to redirect?

  2.) How do I access the init-parameters of my web.xml in an action.
   I tried:
 HttpContext context =
  (HttpContext)ObjectModelHelper.getContext(objectModel);

  and
  objectModel.get("httpservletcontext");

   but that did not work.


Thanks in advance for any help,


miHam


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




advice on a simple architecture for xml versioning

2002-07-31 Thread Giuseppe Bonelli

Hi all,

I need advice on the various options available for building a simple versioning system 
for xml files. I went through the list archives looking for pointers, but I did not 
find much (apart from some very interesting, but old, conversation about cms 
implementation issues).

Very briefly, the issue is as follow.

I have succesfully implemented a very satisfying solution for client-side editing of 
xml files. The edited files are saved on the server (as separate files with a 
timestamp in the filename) by means of source write transformations.

The next logical step would be to process these files automatically in order to 
produce sort of diff files to be used to present to the client various view of the 
edited content. 

The user's scenario is an editorial review process.

My research on the subject led me to the following (not much, I admit):

1. It does exist an XMLDiff utility (see www.vmguys.com), but it needs JDOM.
   Is anyone using it in a C2 environment ?
   Does exist some other alternative in the xml.apache realm ?

2. some vague hints on using XIndice as a back-end for an xml versioning system 
(forgive me if I am wrong).

3. I have the impression that a CVS like system could be an option, but I don't know 
the details of the system, so I cannot tell for sure and I am not able to evaluate the 
implications of using it as a xml document based (vs. a code based) versioning system.

I think that a server side xml versioning tool for "documents" is something getting 
hotter and hotter now that browser based xml editors are maturing and the option of 
let non-technical people edit trasparently xml files is becoming a reality.

I am sure that quite a lot of people on this list has already done some thinking on 
the subject, so I am asking to share any findings. 

I am realively new to this list, so forgive me if I am opening again an old thread.

Thanks in advance for any reply,

--peppo


-
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: Error handling in xsp:element...

2002-07-31 Thread Vadim Gritsenko

> From: Per Kreipke [mailto:[EMAIL PROTECTED]]
> 
> > > If I do the following in an XSP, the CInclude transformer doesn't
> > > recognize
> > > the cinclude:include element because it has no namespace
> > > associated with it.
> > >
> > > 
> >
> > This is incorrect.
> 
> Of course. I thought it might take it from the a parent XSP element
> but it doesn't.
> 
> > >> > name="src">strURL
> > > 
> > >
> > >
> > > I had to change it to be:
> > >
> > >  > > uri="http://apache.org/cocoon/include/1.0";>
> >
> > This is also not ok. Should be:
> >
> >  > uri="http://apache.org/cocoon/include/1.0";>
> 
> Yep, you're right of course, copy/paste sloppiness.
> 
> > >> > name="src">strURL
> > > 
> > >
> > >
> > > In the second example, the condition where I forget to include 
> > > both @prefix
> > > and @uri, I get an error. But in the first example, there's 
> > > no error even
> > > though cinclude:include is an invalid XML element name without 
> > > a namespace.
> > >
> > > xsp.xsl would need an extra check.
> >
> > It will not be efficient to do this, because this check must be made
at
> > run time, and every time. I guess you have not considered that this
is
> > possible:

Forgot to add @name:

> >  > uri="http://apache.org/cocoon/include/1.0";>
> >   "incl" +
"ude"
> > 
> [aside: is  a real thing?]

Now it's real.


> I see you're point. But I'm willing to let that case go for efficiency
as
> long as we protect the beginner from naiive mistakes like
> name="cinclude:include". Just testing for ':' within @name would help
> prevent highlight their error instead of doing nothing at all.

Ok.

> It turns out that the CIncludeTransformer (correctly) skips the
element
> completely (because the namespace URI isn't applied to the element)
but when
> you examine the XML, it's not at all apparent, especially if you've
added
> the cinclude namespace at the top. Instead, the cinclude:include
element
> continues to appear in the output, no matter what you do to the
sitemap,
> mistakenly thinking that the transformer isn't being executed.

:)

Vadim


> Per


-
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: using request selector to choose xsl

2002-07-31 Thread Jo Bourne

thanks so much for explaining! I had not understood that the serialise would always 
terminate the sitemap processing.

At 9:49 AM -0400 30/7/02, Vadim Gritsenko wrote:
> > From: Jo Bourne [mailto:[EMAIL PROTECTED]]
>>
>> Hi Vadim,
>>
>> I am confused by your example, the way it reads to me the default xsl
>will
>> always run, even if the special one is detected and run first?
>
>You have not interpreted sitemap correctly.
>
>
>> >
>> >  
>
>Add generator.
>
>> >  
>
>Is "style" request parameter present?
>
>> >  
>
>Yes:
>
>> >
>
>Add transformer.
>
>> >
>
>Add serializer and **stop** sitemap processing.
>
>> >  
>
>No:
>
>> >  
>
>Add transformer.
>
>> >  
>
>Add serializer and **stop** sitemap processing.
>
>> >
>
>
>
>PS See lint.xmap, it will open your eyes.
>
>Vadim
>
>
>> thanks
>> Jo
>>
>> At 9:18 AM -0400 30/7/02, Vadim Gritsenko wrote:
>> > > From: Barbara Post [mailto:[EMAIL PROTECTED]]
>> >>
>> >> Hello,
>> >>
>> >> is this ok for your problem ? But if "style" is not specified this
>> >> wouldn't
>> >> be ok. So you would have to specify a default value anyway when
>> >> submitting...
>> >
>> >Edited version:
>> >
>> >
>> >  
>> >
>> >  
>> >  
>> >
>> >
>> >  
>> >
>> >  
>> >  
>> >
>> >
>> >Vadim
>> >
>...
>
>
>-
>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]>


-- 
Jo Bourne
Virtual Artists Pty Ltd

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




[docs] Installation on resin 2.1.1 (was R: resin 2.1.x problems)

2002-07-31 Thread Lorenzo De Sio

Robert,

it worked perfectly on a fresh Resin installation.

Since it's by far much easier and cleaner than the procedure for previous
versions, I suggest it be added to the documentation.

How can we achieve this?


L.

-Messaggio originale-
Da: Robert S. Koberg [mailto:[EMAIL PROTECTED]]
Inviato: lunedì 29 luglio 2002 12.12
A: [EMAIL PROTECTED]
Oggetto: Re: resin 2.1.x problems


Hi,


Lorenzo De Sio wrote:
> I just tried the following procedure (found on this list) to solve my
> problem w/Resin 2.1.1.
> 
> It worked. What about adding it to the installation docs?
> 
> L.
> 



Another thing you can do in the RESIN_HOME/conf/resin.conf is:

   
   true

when set to true it goes to your WEB-INF/lib

best,
-Rob




> 
> 
>>List: xml-cocoon-users
>>Subject:  Solution for Problem with Resin 2.1.x and Cocoon 2.0.x
>>From: =?iso-8859-1?Q?J=F6rn_Heid?= <[EMAIL PROTECTED]>
>>Date: 2002-05-01 12:11:05
>>
>>For all who will have problems with Resin 2.1.x running Cocoon 2.0.x and
> 
> JDK < 1.4. Symptom:
> 
>>After deleting dom.jar, sax.jar and jaxp.jar (the TODO for Resin 2.0.x),
> 
> and putting all required JARs to resin/lib I got a "NoSuchMethodError" as
> the Resin-XSLT implementation was used instead of Xalan.
> 
>>java.lang.NoSuchMethodError: javax.xml.transform.TransformerException:
>>method ()V not found
>>at com.caucho.xsl.XslException.(XslException.java:59)
>>
>>Changing xalan-xxx.jar to a_xalan-xxx.jar does not succeed.
>>
>>Solution:
>>Remove all entries in WEB-INF/services from resin.jar (you can change the
> 
> filename to resin.zip, delete those entries, and change the filename back
> again).
> 
>>JOERN
> 
> 
> -
> 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]>

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




Controlling the flow based on users role

2002-07-31 Thread Tuomo Lesonen

Hi,

Is there a way to protect resources in a
way that only
certain "roles" have access to them? Already tried Session Selector, but
I wasn't able to access the session context that the "auth-login" action
creates.

I'd also like to know if it's possible for a user to have multiple roles
defined (for example user could be an "dbAdmin" and "user")

Ideas?

-Tuomo


-
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: multiple checkboxes and request parameters passed to an xsl

2002-07-31 Thread Barbara Post

Hi Elmar, I found a close solution : use request generator to get all the
parameters, then apply an xsl to get only the family of parameters I want
(name starting with a special word) then I can use the resulting xml by
aggregation too..

Thanks

Babs
- Original Message -
From: Sternath Elmar <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 31, 2002 11:56 AM
Subject: AW: multiple checkboxes and request parameters passed to an xsl


Hi Barbara,

I already spent a couple of time about this problem and found the following,
suboptimal solution:
I created an XSP, called the 
and filled all the parameter name/value pairs in a loop into an XML element.
Then I used the  tag in the sitemap to concatenate the xml stream
generated by the XSP (which contains now the parameter name/value pairs)
with the original one. So I was at least able to reuse my stylesheet and
additionally to get my parameter values out of the XML stream.

Regards,
Elmar

-Ursprüngliche Nachricht-
Von: Barbara Post [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 31. Juli 2002 00:05
An: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Betreff: Re: multiple checkboxes and request parameters passed to an xsl


hello Christian,, I don't want to use xsp, only xsl
so...


Babs
--
website: www.babsfrance.fr.st
ICQ #: 135868405
- Original Message -
From: "Christian Haul" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 30, 2002 7:45 PM
Subject: Re: multiple checkboxes and request parameters passed to an xsl


> On 30.Jul.2002 -- 07:15 PM, Barbara Post wrote:
> > Hello, how can my stylesheet get all the http request parameters since
the
> > http request sends a variable number of parameters named "checkedbox_i"
for
> > example, "i" being an unique identifier ? checkboxes are in variable
number
> > on the submit page, depending on a former choice.
> >
>
> Have a look at the getParameterValues() method (or
> ). They return arrays
> containing all values.
>
> 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. 
>
> 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]>

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




creating new file with SWT

2002-07-31 Thread Bert Van Kets

Hi all,
I am trying to get the SourceWritingTransformer to create a new XML 
file.  Is this possible at all?  All the samples I find write to existing 
files.  The portal is the only sample that writes new files, but it's using 
session:target to create the new files.

Anyway, here's my code snip

  

  docs//my.xml
  
new page
description of new page
Enter your content here
  

  

And the pipeline that manages it




   





I'm using CVS HEAD from May 15th.  Should I update?

Any help is welcome!

Bert

-
Please notify me if you did not receive this mail.


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




AW: multiple checkboxes and request parameters passed to an xsl

2002-07-31 Thread Sternath Elmar

Hi Barbara,

I already spent a couple of time about this problem and found the following, 
suboptimal solution:
I created an XSP, called the  and filled 
all the parameter name/value pairs in a loop into an XML element. Then I used the 
 tag in the sitemap to concatenate the xml stream generated by the XSP 
(which contains now the parameter name/value pairs) with the original one. So I was at 
least able to reuse my stylesheet and additionally to get my parameter values out of 
the XML stream.

Regards,
Elmar

-Ursprüngliche Nachricht-
Von: Barbara Post [mailto:[EMAIL PROTECTED]]
Gesendet: Mittwoch, 31. Juli 2002 00:05
An: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Betreff: Re: multiple checkboxes and request parameters passed to an xsl


hello Christian,, I don't want to use xsp, only xsl
so...


Babs
--
website: www.babsfrance.fr.st
ICQ #: 135868405
- Original Message -
From: "Christian Haul" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 30, 2002 7:45 PM
Subject: Re: multiple checkboxes and request parameters passed to an xsl


> On 30.Jul.2002 -- 07:15 PM, Barbara Post wrote:
> > Hello, how can my stylesheet get all the http request parameters since
the
> > http request sends a variable number of parameters named "checkedbox_i"
for
> > example, "i" being an unique identifier ? checkboxes are in variable
number
> > on the submit page, depending on a former choice.
> >
>
> Have a look at the getParameterValues() method (or
> ). They return arrays
> containing all values.
>
> 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. 
>
> 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]>

-
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 : xalan and request generator

2002-07-31 Thread Barbara Post

OK I have the solution :
in the xsl declare "rg" namespace as
http://xml.apache.org/cocoon/requestgenerator/2.0 and then prefix every
element in xpath queries by it...

Learned something !

Barbara
- Original Message -
From: Barbara Post <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 31, 2002 11:41 AM
Subject: xalan and request generator


> Since the root of the document returned by 
> contains xmlns declaration, my xpath query against this document does not
> work. Using xalan 2.3.1.
>
> Any workaround ? or would need to have another stylesheet to move xmlns
> declaration ?
>
> 
> http://xml.apache.org/cocoon/requestgenerator/2.0";
> target="/baepp/getcheckedplugs" source="">
>  
>
> Thanks
>
> Barbara
>


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




New sunBow Preview

2002-07-31 Thread Matthew Langham

The newest preview version of our Cocoon IDE plugin for eclipse - sunBow -
is now available. More information here:
http://radio.weblogs.com/0108489/2002/07/31.html#a6

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. 

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




xalan and request generator

2002-07-31 Thread Barbara Post

Since the root of the document returned by 
contains xmlns declaration, my xpath query against this document does not
work. Using xalan 2.3.1.

Any workaround ? or would need to have another stylesheet to move xmlns
declaration ?


http://xml.apache.org/cocoon/requestgenerator/2.0";
target="/baepp/getcheckedplugs" source="">
 

Thanks

Barbara


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




LinkSerializer not seeing links (href, src)

2002-07-31 Thread Torsten Knodt

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Hello,
I have a second problem with LinkSerializer. Sometimes I can only see href's 
(no src), sometimes I can't see any links. The cocoon examples work without 
problems.
The xhtml output validates against the DTD.
If this helps you, DOCTYPE isn't in the output of my xhtml (don't know why).

Oh yes, tested with cocoon 2.0.3 and cvs-version.

With kind regards
Torsten Knodt
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.0.7 (GNU/Linux)

iD8DBQE9R6/HvxZktkzSmiwRAoHoAJ97JjeyPY0mLjHNDs8qrCv6zP5IywCfVyOb
0XtaVCzjHhQ8FlhtJbnuk04=
=Hy4i
-END PGP SIGNATURE-


-
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: esql - oracle stored procedure returns resultset

2002-07-31 Thread Luca Morandini

Frank,

just for the record: I use SQLTransformer, which runs smoothly even with multiple 
cursors returned by SPs. 
I used this method for a couple of projects and for some dozens SPs... not a glitch.

Best regards,

- 
   Luca Morandini 
   GIS Consultant 
  [EMAIL PROTECTED] 
http://utenti.tripod.it/lmorandini/index.html 
-
 

> -Original Message-
> From: Frank Taffelt [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 31, 2002 11:12 AM
> To: [EMAIL PROTECTED]
> Subject: Re: esql - oracle stored procedure returns resultset
> 
> 
> - Original Message -
> From: "Christian Haul" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Tuesday, July 30, 2002 7:42 PM
> Subject: Re: esql - oracle stored procedure returns resultset
> 
> 
> > I'm certain that others do use oracle sps the way described. Actually,
> > the esql sp support started that way...
> 
> it would be nice, if other oracle sp users can confirm this and even better
> send a small
> example how they do it.
> 
> thanks in advance
> Frank Taffelt
> 
> 
> -
> 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]>




support non-english characters in HTML serializer

2002-07-31 Thread yuryx

Hi all!

Can anyone help me with following problem:
I place russian text into attributes in my tags (for example: ).
And I see unicode encoding text in the attribute in output HTML :(
Any way for solve this problem?

Thanx.
Yury.



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




R: Multiple map:resource calls

2002-07-31 Thread Lorenzo De Sio

Hi Vadim,

I tried several possibilities, and I found a few points regarding my webapp
(I'm sure they're not C2 issues:-)):

1) A resource which contains no serializer stops the pipeline, returning no
output.

Such a sitemap fragment:

[...]




[...]




[...]

simply returns me a 404. If I add a  at the end of the
resource, it returns output again.
The problem is that the serializer, as you reminded me, really prevents any
further processing.
So it seems like:

a) A resource needs a serializer;
b) A serializer prevents any further processing;

=> In any matcher there can be only one , and it
must be the last stage of the processing.

I'm sure I'm wrong. :-) But please help me find why!

2)


> Temporary work-around could be:
> 
>   
> 
>   
>   
> 
>   
>   
> 

Just for curiosity, I tried the suggested workaround, but without the
 (which, as said, stops further processing). I
found that the nested matchers are not evaluated in the context of their
"father", but in the same context: that is, the nested  must be changed to . A working
example is:


[...]   







[...]



Thanks,


L.




-Messaggio originale-
Da: Vadim Gritsenko [mailto:[EMAIL PROTECTED]]
Inviato: martedì 30 luglio 2002 14.46
A: [EMAIL PROTECTED]
Oggetto: RE: Multiple map:resource calls


> From: Lorenzo De Sio [mailto:[EMAIL PROTECTED]]
> 
> Hi all,
> 
> it seems to me like it is not possible to perform multiple  resource="xxx"/> calls in a single matcher.
> 
> Fragments from my sitemap:
> 
> [...]
> 
>  
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>   
>  
> 
> [...]
> 
>   
> 
>   [...]
> 
>   

BTW, this (second call to resource) will never be executed because of
 in first call to resource):

>   
>   
>   
>   
> 
> [...]
> 
> Both resources work, if used only one at a time. But, as soon as I try
to
> use both of them in a single matcher, I get the following exception:
> 
>   duplicate definition of variable methodName in method
matchN10092
> [...] duplicate definition of variable argTypes in method matchN10092
[...]
> duplicate definition of variable argValues in method matchN10092 [...]
> 
> which is obvious, if we look at the generated sitemap.java:
> 
>   map = new HashMap(1);
> 
>   String methodName = "resource_" + substitute(listOfMaps,
> "crea_form_dati");
>   listOfMaps.add(map);
>   this.dumpParameters(listOfMaps);
>   Class[] argTypes = new Class[] {StreamPipeline.class,
> EventPipeline.class, List.class, Environment.class, String.class,
> Boolean.TYPE};
>   Object[] argValues = new Object[] {pipeline, eventPipeline,
> listOfMaps, environment, cocoon_view, new Boolean(internalRequest)};
>   if (true) return invokeMethod(methodName, argTypes, argValues);
> 
>map = new HashMap(1);
> 
>   String methodName = "resource_" + substitute(listOfMaps,
> "aspetto_finale");
>   listOfMaps.add(map);
>   this.dumpParameters(listOfMaps);
>   Class[] argTypes = new Class[] {StreamPipeline.class,
> EventPipeline.class, List.class, Environment.class, String.class,
> Boolean.TYPE};
>   Object[] argValues = new Object[] {pipeline, eventPipeline,
> listOfMaps, environment, cocoon_view, new Boolean(internalRequest)};
>   if (true) return invokeMethod(methodName, argTypes, argValues);
> 
> 
> Any hints? Am I doing wrong in trying to call two resources in a
matcher?
> Are there any correct alternatives?

Congratulations, you found a bug!
Temporary work-around could be:



  

  
  

  
  



Vadim


> 
> Thanks in advance to anyone,
> 
> L.


-
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: esql - oracle stored procedure returns resultset

2002-07-31 Thread Frank Taffelt

- Original Message -
From: "Christian Haul" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 30, 2002 7:42 PM
Subject: Re: esql - oracle stored procedure returns resultset


> I'm certain that others do use oracle sps the way described. Actually,
> the esql sp support started that way...

it would be nice, if other oracle sp users can confirm this and even better
send a small
example how they do it.

thanks in advance
Frank Taffelt


-
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: pb with http request

2002-07-31 Thread cyril vidal



OK thanks!
  It was because of  spurious whitespaces  before the xml declaration.
 It runs well now...;-)

Cyril.
> - Original Message -
> From: "Joerg Heinicke" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Wednesday, July 31, 2002 3:15 AM
> Subject: Re: pb with http request
>
>
> > This has nothing to do with the example, it's a common error message,
> > when having the Xril.ML declaration not as the absolutely first thing in
> the
> > XML file. There must not be any whitespaces or other characters in front
> > of the XML declaration and it has to be in the form as at
> > http://www.w3.org/TR/REC-xml#sec-prolog-dtd. Watch for case-sensitivity
> > too. Have a look in all the related files to fix the bug.
> >
> > cyril vidal wrote:
> > > Hy,
> > >
> > > I just was trying to run the example wrotten by Steve Punk in "Getting
> > > started with Cocoon 2"
http://www.xml.com/lpt/a/2002/07/10/cocoon2.html
> > >
> > > More precisely, the last example that calculates a factorial from a
> > > numeric value submitted via HTTP POST.
> > >
> > > Here's the sitemap:
> > >
> > > http://apache.org/cocoon/sitemap/1.0";>
> >
> > 
> >
> > > 
> > >
> > >
> > > and here's the file mystylesheet.xsl that I've copied in integrality
> > > from the original source:
> > >
> > >
> > > 
> >
> > This one seems to be ok, but I can't see whether there are any
> > whitespaces in the file of course.
> >
> > >
> > > 
> > >
> > > 
> > >
> > >  >
> > 
> >
> > > 
> > >
> > >
> > >
> > > When I run this by pointing my browser to
> http://localhost/mypage?input=5
> > >
> > > I receive the following error message:
> > >
> > > *description* _org.apache.cocoon.ProcessingException: Exception in
> > > creating Transform Handler: org.xml.sax.SAXParseException: The XML
> > > declaration may only appear at the very beginning of the document._
> > >
> > > _I _don't understand why this occurs. Can you help me please?
> > >
> > > Thanks in advance,
> > >
> > > Cyril Vidal
> > > Email: [EMAIL PROTECTED] 
> > > Web: http://www.planetexml.com
> >
> > Regards,
> >
> > Joerg
> >
> >
> > -
> > 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: Action - DatabaseSelectAction and XSP + ESQL

2002-07-31 Thread Richard

Thanks.

- Original Message -
From: "Christian Haul" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>; "Richard" <[EMAIL PROTECTED]>
Sent: Wednesday, July 31, 2002 4:00 PM
Subject: Re: Action - DatabaseSelectAction and XSP + ESQL


> On 31.Jul.2002 -- 03:48 PM, Richard wrote:
> > Hi Guys
> >
> > Between Action - DatabaseSelectAction and XSP + ESQL
> >
> > Which is better?
>
> They target different use cases. To output the values, esql is easier
> and leaner. You might want to consider the SQLTransformer as well. If
> you use XSP, I would still recommend esql. If XSP is not needed, the
> transformer approach is 'better'. Action + transformer is also
> possible, but IMO unecessarily complex.
>
> > Which is easier to code?
>
> Since you would need to code the output in XSP anyways, esql.
>
> > How am I suppose to get the results on the Action -
DatabaseSelectAction?
>
> They are stored in request attributes (see javadocs / docs for names).
>
> 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. 

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




Re: Action - DatabaseSelectAction and XSP + ESQL

2002-07-31 Thread Christian Haul

On 31.Jul.2002 -- 03:48 PM, Richard wrote:
> Hi Guys
> 
> Between Action - DatabaseSelectAction and XSP + ESQL 
> 
> Which is better?

They target different use cases. To output the values, esql is easier
and leaner. You might want to consider the SQLTransformer as well. If
you use XSP, I would still recommend esql. If XSP is not needed, the
transformer approach is 'better'. Action + transformer is also
possible, but IMO unecessarily complex.

> Which is easier to code?

Since you would need to code the output in XSP anyways, esql.

> How am I suppose to get the results on the Action - DatabaseSelectAction?

They are stored in request attributes (see javadocs / docs for names).

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. 

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




Action - DatabaseSelectAction and XSP + ESQL

2002-07-31 Thread Richard



Hi Guys
 

Between Action - DatabaseSelectAction and XSP + 
ESQL 
 
Which is better?
 
Which is easier to code?
 
How am I suppose to get the results on the Action - 
DatabaseSelectAction?
 
Thanks
 
Richard