AW: XMLForm and Table output

2002-12-01 Thread Kirchhoff, Lars
thanks Ivelin,

but now I'm right in front of a new problem, how to print out the document
using 
cocoon? I couldn't find a generator that gets the input right from a stream?
Do I have to write my own generator? If yes, can you point me to some
documentation
about this, because I couldn't found it.

thanks Lars

> -Ursprüngliche Nachricht-
> Von: Ivelin Ivanov [mailto:[EMAIL PROTECTED]]
> Gesendet: Sonntag, 1. Dezember 2002 00:03
> An: [EMAIL PROTECTED]
> Betreff: Re: XMLForm and Table output
> 
> 
> Yes. You are on the right track.
> Why don't you print the XML document once it is created to see what it
> actually contains.
> I suspect this might be a simple mistake due to misuse of the 
> API. It is not
> very convenient.
> Actually if you plan writing a lot of DOM code, you may want 
> to look at JDOM
> or some of the O/R mapping frameworks.
> 
> 
> Ivelin
> 
> 
> 
> - Original Message -
> From: "Kirchhoff, Lars" <[EMAIL PROTECTED]>
> To: "Cocoon-Users (E-Mail)" <[EMAIL PROTECTED]>
> Sent: Thursday, November 28, 2002 4:49 AM
> Subject: XMLForm and Table output
> 
> 
> > Hi,
> >
> > it's me again and I hope I'm still getting answers and not 
> starting to
> > bother you all
> > with all my questions.
> > I've tried to create an application which simple should get 
> some user data
> > from a
> > database, by simply enter the name. So my first form is 
> just a text field
> > where the name
> > can be inserted. If the name is found all data will be 
> shown. so far so
> > good. But now
> > I would like to built something more. Because I do not look 
> at the exact
> > name in the
> > database it could be possible to get more then one entry. I 
> now want to
> > create a page,
> > where all possible names are shown and some more additional 
> information
> > about them.
> > So what I would like to have should be looking like this:
> >   --
> >   | name   | address   | city | zip|
> >   --
> >   | name1  | address1  | city1| zip1   |
> >   | name2  | address2  | city2| zip2   |
> >   | name3  | address3  | city3| zip3   |
> >   | ...| ...   | ...  | ...|
> >
> > where the user has the possibility to click on the a name 
> to get the full
> > detail.
> > So what I thought is to write a method which get me the 
> data from the
> > database and
> > put this in a DOM Nodes. I thought this would enable me to 
> use them in the
> > 
> > statement, but unfortunately it didn't worked out so far.
> >
> > Here is the code I used to create the DOM Nodes:
> > 
> --
> 
> --
> > ---
> >// 
> >// Use DOM nodes to store values
> >// 
> >DOMImplementation impl;
> >
> >try {
> > DocumentBuilderFactory factory =
> > DocumentBuilderFactory.newInstance();
> > factory.setNamespaceAware( false );
> > factory.setValidating( false );
> > DocumentBuilder builder = factory.newDocumentBuilder();
> > impl = builder.getDOMImplementation();
> >}
> >catch ( Exception e ) {
> > throw new RuntimeException( "Failed to initialize DOM factory. Root
> > cause: \n" + e );
> >}
> >
> >// 
> >// Use DOM nodes to store values
> >// 
> >   Document doc = impl.createDocument( null, "Users", null );
> >   Node root = doc.getDocumentElement();
> >   Node custname = null;
> >   Node address = null;
> >   Node zip = null;
> >   Node city = null;
> >   Node user = null;
> > Text text;
> >
> > try {
> > Class.forName( "org.postgresql.Driver" );
> > Connection con =
> > DriverManager.getConnection( DB_URL, DB_USER, DB_PASS );
> > Statement stmt = con.createStatement();
> > String update = "select custname, busname,
> > address, city, state, zip, pobox, pocode from customer 
> where custname like
> > '%" + name + "%'";
> > ResultSet rs = stmt.executeQuery( update
> > );
> >
> > while ( rs.next() ) {
> > user = doc.createElement( "user" );
> > root.appendChild( user );
> >
> > custname = doc.createElement( "custname" );
> >
> > text = doc.createTextNode( rs.getString(
> > "custname" ) );
> > custname.appendChild( text );
> > user.appendChild( custname );
> >
> > address = doc.createElement( "address" );
> >
> > text = doc.createTextNode( rs.getString(
> > "address" ) );
> > address.appendChild( text );
> > user.appendChild( address );
> >
> > zip = doc.createElement( "zip" );
> >
> > text = doc.createTextNode( rs.getString( "zip" )
> > );
> > zip.appendChild( text );
> > user.appendChild( zip );
> >
> > city = doc.createElement( "city" );
> >
> > text = doc.createTextNode( rs.getString( "city" )
> > );
> > city.appendChild( text 

Re: Including static images into SVG files

2002-12-01 Thread Derek Hohls



Ok, point taken and noted.  
 
I think I will have to maintain the server part of the  
address in a separate file and do an 'include' in 
the processing file - this way it should make the
maintainance easier (even if not intuitively obvious!)>>> 
[EMAIL PROTECTED] 01/12/2002 11:19:22 >>>But AFAIK this is the 
only working solution. Both Batik and FOP only work with absolute 
paths.JoergDerek Hohls wrote:> Unfortunately this is not 
a real solution:> in the example I used 'myserver' - on my> 
development machine this would be 'localhost:8080'> whereas on the 
production machine it would be> something 'joe.domain.com' ... I do not 
think that 'localhost' would> work the same in both situations...  
the same holds true for a file > path - the setup on the UNIX machine 
is> *definitely* different from mine - ideally I > am looking for 
a Cocoon-related solution.> > Thanks> Derek> 
[EMAIL PROTECTED] 12/01/02 08:33 AM 
>>> -Original Message-> From: 
Derek Hohls [mailto:[EMAIL PROTECTED]]> > 
>>I need to include and display a static image >>(its a 
logo) on all the SVG images I produce;>>the only syntax I have managed 
to get to work is:> > > http://myserver/path/logo.jpg 
/>  > (plus height, width)> > 
>>Unfortunately this requires an absolute URL >>address - if 
I drop the http://myserver/>>then it 
simply does not work - is there a >>Cocoon "substitute" (protocol?) I 
can use>>to get the image processed correctly, *regardless* 
>>of what machine the app. is loaded on??> > > 
Try "localhost" instead of "myserver". > > You can also use a file 
url (so long as the path is absolute). > > Cheers> > 
Con-Please 
check that your question  has not already been answered in theFAQ 
before posting. To 
unsubscribe, e-mail: 
<[EMAIL PROTECTED]>For additional commands, 
e-mail:   
<[EMAIL PROTECTED]>


Problem in 2.1 CVS

2002-12-01 Thread Antonio Gallardo
I have an application that works fine with the CVS 2.1 version from 24-Nov.

But currently there are many problems. If I come back to the 22-Nov
version everything works fine.

The problem is mainly related to things about user authentication and
session as I reported yesterday.

I will stay at the trying to use again the new version.

What happened? The with the new version the file reader send me bugs.

I am using Tomcat, 4.1.12, Java 1.4.1_01 and Postgresql 7.2. with Red Hat 8.0

I also saw that there is a problem with the datasource interface. I needed
to update a database log and some registers was not updated. With the "old
version" from 24-Nov Everythings works ok.

Regards,


Antonio Gallardo.



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




Fw: Portal Coplets - Access

2002-12-01 Thread Richard Reyes




   
Hi 
Guys,
 
Any 
comments...
 
Or the portal is 
suppose to work like this?
 
Thanks
 




   
  - Original Message - 
  From: Richard Reyes 
  
  To: cocoon-users 
  Sent: Friday, November 29, 2002 3:10 PM
  Subject: Portal Coplets - Access
  
  Hi 
  Guys,Is there a way to not let a specific Roles ( or Usergroups like 
  guest oradmin ) to access all available coplets?Well, except for 
  declarings it like the admin coplet..         
     
  false   
  true   
  false    
     
  Administration   
      
  true    
  max     
  Configurations:Windows 2000 Advance 
  Serverj2sdk1.4.0_03Apache 
  Tomcat/4.1.12-LE-jdk14ThanksRichard


Re: Transformer

2002-12-01 Thread Joerg Heinicke
Does this mean, that you want to select another XSL file used for
transformation depending on the input document? Why don't you use an
XSL, which includes the other XSL files and so the different matching 
templates? Or use modes in the stylesheets like J. Pietschmann provided 
at 
http://www.mail-archive.com/cocoon-users@xml.apache.org/msg21224.html. 
Otherwise you must use an action, which chooses the
correct transformer.

Joerg

[EMAIL PROTECTED] wrote:
> I want to change the XSL file of a transformer according a element of the
> input XML. There is any way to do this?
>
> Thanks
>
> Lautaro



-
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: Including static images into SVG files

2002-12-01 Thread Joerg Heinicke
But AFAIK this is the only working solution. Both Batik and FOP only 
work with absolute paths.

Joerg

Derek Hohls wrote:
Unfortunately this is not a real solution:
in the example I used 'myserver' - on my
development machine this would be 'localhost:8080'
whereas on the production machine it would be
something 'joe.domain.com' ... I do not think that 'localhost' would
work the same in both situations...  the same holds true for a file 
path - the setup on the UNIX machine is
*definitely* different from mine - ideally I 
am looking for a Cocoon-related solution.

Thanks
Derek

[EMAIL PROTECTED] 12/01/02 08:33 AM >>>



-Original Message-
From: Derek Hohls [mailto:[EMAIL PROTECTED]]



I need to include and display a static image 
(its a logo) on all the SVG images I produce;
the only syntax I have managed to get to work is:


http://myserver/path/logo.jpg />  
(plus height, width)


Unfortunately this requires an absolute URL 
address - if I drop the http://myserver/
then it simply does not work - is there a 
Cocoon "substitute" (protocol?) I can use
to get the image processed correctly, *regardless* 
of what machine the app. is loaded on??


Try "localhost" instead of "myserver". 

You can also use a file url (so long as the path is absolute). 

Cheers

Con


-
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: Including static images into SVG files

2002-12-01 Thread Derek Hohls
Unfortunately this is not a real solution:
in the example I used 'myserver' - on my
development machine this would be 'localhost:8080'
whereas on the production machine it would be
something 'joe.domain.com' ... I do not think that 'localhost' would
work the same in both situations...  the same holds true for a file 
path - the setup on the UNIX machine is
*definitely* different from mine - ideally I 
am looking for a Cocoon-related solution.

Thanks
Derek

D Hohls
CSIR Environmentek
PO Box 17001
Kwa-Zulu Natal
South Africa
4013


>>> [EMAIL PROTECTED] 12/01/02 08:33 AM >>>
-Original Message-
From: Derek Hohls [mailto:[EMAIL PROTECTED]]

>I need to include and display a static image 
>(its a logo) on all the SVG images I produce;
>the only syntax I have managed to get to work is:

http://myserver/path/logo.jpg />  
(plus height, width)

>Unfortunately this requires an absolute URL 
>address - if I drop the http://myserver/
>then it simply does not work - is there a 
>Cocoon "substitute" (protocol?) I can use
>to get the image processed correctly, *regardless* 
>of what machine the app. is loaded on??

Try "localhost" instead of "myserver". 

You can also use a file url (so long as the path is absolute). 

Cheers

Con

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




util:include-file still fails to include in .xsp

2002-12-01 Thread Marko NIINIMAKI

Hmm, I have a feeling this is a bug in cocoon utils:




http://apache.org/xsp";
   xmlns:session="http://apache.org/xsp/session/2.0";
   xmlns:xsp-request="http://apache.org/xsp/request/2.0";
   xmlns:util="http://apache.org/xsp/util";
> 


  
   
  



(foo.txt contains hello)
this compiles but the title tags are empty in parsed output.
This is cocoon 2.0.3. Could someone plase try if it works 
with some other versions.

Yours,
Marko



-
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: [Authentication] - Generate javascript using XSP

2002-12-01 Thread Christoph Gaffga
> Where I can configure for all the pages the
> response.setHeader("Cache-Control", "No-Cache");

I'm using a filter for that:

in my web.xml-file:
  
ModifyRequest

com.triplemind.asp.server.ModifyRequestFilter
  
  
ModifyRequest
Cocoon2
  

And a short Filter-Class:
  package com.triplemind.asp.server;
  import javax.servlet.Filter;
  import javax.servlet.FilterChain;
  import javax.servlet.FilterConfig;
  import javax.servlet.ServletRequest;
  import javax.servlet.ServletResponse;

  public class ModifyRequest implements Filter {
private FilterConfig filterConfig = null;
public ModifyRequest() { }
public void init(FilterConfig filterConfig) {
  this.filterConfig = filterConfig;
}
public void doFilter(ServletRequest request,
 ServletResponse response,
 FilterChain chain) {
  try {
response.setHeader("Cache-Control", "No-Cache");
chain.doFilter(request, response);
  } catch(Exception e) {
e.printStackTrace();
  }
}
public void destroy() { }
  }

hope, that helps.
I put some more features in my ModfiyRequest, to change the Request-URL, and
Cookies and put some more Header-Information, such as Expires-Headers.

Christoph Gaffga
[EMAIL PROTECTED]


- Original Message -
From: "Antonio Gallardo" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, November 30, 2002 8:25 PM
Subject: Re: [Authentication] - Generate javascript using XSP


> Where I can configure for all the pages the
>
> response.setHeader("Cache-Control", "No-Cache");
>
> Can I put it into the header of the HTML in my XSL?
>
> Regards,
>
> Antonio Gallardo
>
> Christoph Gaffga dijo:
> > Hi,
> >
> >> I think that this can be done because the proxy is returning a cached
> >> page from another user. Because the request has the same URI from
> >> every user (as long as I can see). The request URI does not have info
> >> about sessions.
> >
> > If you are behind a proxy maybe you can configure it not to cache urls
> > at http://internalserver:8080/theapp/.
> > Or it helps if you do
> > response.setHeader("Cache-Control", "No-Cache");
> >
> > yours
> > Christoph Gaffga
> > [EMAIL PROTECTED]
> >
> > - Original Message -
> > From: "Antonio Gallardo" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Sent: Saturday, November 30, 2002 9:32 AM
> > Subject: [Authentication] - Generate javascript using XSP
> >
> >
> >> Hi Cococoners!
> >>
> >> I am currently an application that is currently running on a test mode
> >> with a small amount of users (20) in a Intranet environment. With the
> >> following characteristics:
> >>
> >> The application is running behind a proxy.
> >> The app use the authentication framework.
> >> The app have a page called welcome that show the current user.
> >>
> >> I am currently having problem with session management:
> >>
> >> The users told me that sometimes when they are already authenticated
> >> and request the welcome page, the response present another user.
> >>
> >> The page is called with http://internalserver:8080/theapp/welcome
> >>
> >> I think that this can be done because the proxy is returning a cached
> >> page from another user. Because the request has the same URI from
> >> every user (as long as I can see). The request URI does not have info
> >> about sessions. But I read in the book from Carsten and Mathhew on
> >> page 303 (second paragraph from the end):
> >>
> >> "The default is usually to use cookies, because the developer of the
> >> web application does not need to do anything special to use them. ..."
> >>
> >> Please Dont let me wrong. I now that the problem is caused by me. :-D
> >>
> >> The menu of the application is a static Javascript file served with a
> >> reader. This file hs no info about sessions. Now I realized that in
> >> order to "set" a session into the request I need to include a
> >> parameter with the SessionID for every request. I does not include it
> >> before because the quote above.
> >>
> >> With this scenario my questions is:
> >>
> >> How I can ensure that every request URI from the user will have the
> >> SessionID included or use the default cookies?
> >>
> >> For me this is not a trivial question, because:
> >>
> >> I thinked first: "OK, I will generate the menu.js on ther fly using
> >> XSP."
> >>
> >> But after think a while I realized that this issue will fall again in
> >> the same category as the http://internalserver:8080/theapp/welcome
> >> explained above. :-(
> >>
> >> Please tell me what can I do?
> >>
> >> I am currently thinking in calling the menu.js with the sessionID too.
> >>
> >> This will work or there is another easier way to do that?
> >>
> >> Many thanks in advance,
> >>
> >> Antonio Gallardo.
> >>
> >>
> >>
> >>
> >> -
> >> Please check that your question  has not already been answered in the
> >> FAQ before posting. 

Re: Weird Saxon errors

2002-12-01 Thread SAXESS - Hussayn Dabbous
J.Pietschmann wrote:

SAXESS - Hussayn Dabbous wrote:


Your stylesheet produces plain text as output. This seems to be
a problem for cocoon transformers. I don't know, if this behaviour
is a feature, or a bug. (Maybe the developers can tell us ;-) ?



It's a feature. Plain text is not a valid XML document,
therefore it wont be properly transported through the
SAX pipeline to the next component. Not even if the next
component in the pipeline is a text serializer. I'm not
sure whether this is Saxon specific (a text serializer
uses an XSLT processor too), it might work with Xalan.

J.Pietschmann



Indeed i have seen, that it works with xalan.
In fact, because it worked with xalan, i initially
wondered, why saxon complains. But with your explaination
now i wonder, why it works with xalan...

regards, hussayn


-
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: [Authentication] - Generate javascript using XSP

2002-12-01 Thread Antonio Gallardo
Where I can configure for all the pages the

response.setHeader("Cache-Control", "No-Cache");

Can I put it into the header of the HTML in my XSL?

Regards,

Antonio Gallardo

Christoph Gaffga dijo:
> Hi,
>
>> I think that this can be done because the proxy is returning a cached
>> page from another user. Because the request has the same URI from
>> every user (as long as I can see). The request URI does not have info
>> about sessions.
>
> If you are behind a proxy maybe you can configure it not to cache urls
> at http://internalserver:8080/theapp/.
> Or it helps if you do
> response.setHeader("Cache-Control", "No-Cache");
>
> yours
> Christoph Gaffga
> [EMAIL PROTECTED]
>
> - Original Message -
> From: "Antonio Gallardo" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Saturday, November 30, 2002 9:32 AM
> Subject: [Authentication] - Generate javascript using XSP
>
>
>> Hi Cococoners!
>>
>> I am currently an application that is currently running on a test mode
>> with a small amount of users (20) in a Intranet environment. With the
>> following characteristics:
>>
>> The application is running behind a proxy.
>> The app use the authentication framework.
>> The app have a page called welcome that show the current user.
>>
>> I am currently having problem with session management:
>>
>> The users told me that sometimes when they are already authenticated
>> and request the welcome page, the response present another user.
>>
>> The page is called with http://internalserver:8080/theapp/welcome
>>
>> I think that this can be done because the proxy is returning a cached
>> page from another user. Because the request has the same URI from
>> every user (as long as I can see). The request URI does not have info
>> about sessions. But I read in the book from Carsten and Mathhew on
>> page 303 (second paragraph from the end):
>>
>> "The default is usually to use cookies, because the developer of the
>> web application does not need to do anything special to use them. ..."
>>
>> Please Dont let me wrong. I now that the problem is caused by me. :-D
>>
>> The menu of the application is a static Javascript file served with a
>> reader. This file hs no info about sessions. Now I realized that in
>> order to "set" a session into the request I need to include a
>> parameter with the SessionID for every request. I does not include it
>> before because the quote above.
>>
>> With this scenario my questions is:
>>
>> How I can ensure that every request URI from the user will have the
>> SessionID included or use the default cookies?
>>
>> For me this is not a trivial question, because:
>>
>> I thinked first: "OK, I will generate the menu.js on ther fly using
>> XSP."
>>
>> But after think a while I realized that this issue will fall again in
>> the same category as the http://internalserver:8080/theapp/welcome
>> explained above. :-(
>>
>> Please tell me what can I do?
>>
>> I am currently thinking in calling the menu.js with the sessionID too.
>>
>> This will work or there is another easier way to do that?
>>
>> Many thanks in advance,
>>
>> Antonio Gallardo.
>>
>>
>>
>>
>> -
>> 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]>