You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Yury Mikhienko <yu...@mobicomk.donpac.ru> on 2003/03/17 14:14:55 UTC

xerces version in j2sdk_1.4.1

Hi all!

Does anyone know the xerces version in j2sdk_1.4.1 ?
And also: can I set  another xerces for using (if I use java1.4)?

-- 
 
Best regards,
Yury Mikhienko.
IT engineer, ZAO "Mobicom-Kavkaz"

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: WritableSource output Cocoon 2.0.4

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
On Tuesday, March 18, 2003, at 11:14 AM, Upayavira wrote:

>>> The sourceWritingTransformer in 2.1 is quite different to the one in
>>> 2.0.4. I don't know whether it is 'back-compatible',
>>
>> Unfortunately it is not back compatible.
>
> Are you aware why not?

Because when the modifications made to SWT in 2.1 by various people 
were unified in the code, various parts of 2.0.n's infrastructure 
supporting those changes were not in place.

regards Jeremy


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: WritableSource output Cocoon 2.0.4

Posted by Upayavira <uv...@upaya.co.uk>.
> > The sourceWritingTransformer in 2.1 is quite different to the one in
> > 2.0.4. I don't know whether it is 'back-compatible',
> 
> Unfortunately it is not back compatible.

Are you aware why not?

Upayavira


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: WritableSource output Cocoon 2.0.4

Posted by Jeremy Quinn <je...@media.demon.co.uk>.
On Tuesday, March 18, 2003, at 12:27 AM, Upayavira wrote:

>> Well, right now the way I have it setup is pretty simple,  I have an
>> xsp page that generates an email message(I made up some simili-MIME
>> xml tags) then this goes thru an XSL file that transforms the output
>> into a mime complient mail message, this is the input my MailSource
>> receives, it implements a OutputStream and what I do is simply send
>> the message when the close() method of the OutputStream is called,
>> here is the source:
>
> The sourceWritingTransformer in 2.1 is quite different to the one in 
> 2.0.4. I don't
> know whether it is 'back-compatible',

Unfortunately it is not back compatible.

regards Jeremy


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: WritableSource output Cocoon 2.0.4

Posted by Eric di Domenico <li...@cafebotero.com>.
I think I will download the source to 2.1 and see if I can integrate it.

Thanks for the help!

> The sourceWritingTransformer in 2.1 is quite different to the one in 
> 2.0.4. I don't
> know whether it is 'back-compatible', or whether you'd have to upgrade 
> your app
> to 2.1. You could at least give it a go. From looking at the code, I 
> see lots of
> message="some kind of text "+ pe, where pe is a processingException, 
> which
> means that your exception text will make it into the ougoing SAX 
> stream, which is
> what you want.
>
> Alternatively, hack the 2.0.4 SourceWritingTransformer to do what you 
> want.
>
> Hope that doesn't cause too many headaches!
>
> Regards, Upayavira
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: WritableSource output Cocoon 2.0.4

Posted by Upayavira <uv...@upaya.co.uk>.
> Well, right now the way I have it setup is pretty simple,  I have an
> xsp page that generates an email message(I made up some simili-MIME
> xml tags) then this goes thru an XSL file that transforms the output
> into a mime complient mail message, this is the input my MailSource
> receives, it implements a OutputStream and what I do is simply send
> the message when the close() method of the OutputStream is called,
> here is the source:

The sourceWritingTransformer in 2.1 is quite different to the one in 2.0.4. I don't 
know whether it is 'back-compatible', or whether you'd have to upgrade your app 
to 2.1. You could at least give it a go. From looking at the code, I see lots of 
message="some kind of text "+ pe, where pe is a processingException, which 
means that your exception text will make it into the ougoing SAX stream, which is 
what you want.

Alternatively, hack the 2.0.4 SourceWritingTransformer to do what you want. 

Hope that doesn't cause too many headaches!

Regards, Upayavira

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: WritableSource output Cocoon 2.0.4

Posted by Eric di Domenico <li...@cafebotero.com>.
Well, right now the way I have it setup is pretty simple,  I have an 
xsp page that generates an email message(I made up some simili-MIME xml 
tags) then this goes thru an XSL file that transforms the output into a 
mime complient mail message, this is the input my MailSource receives, 
it implements a OutputStream and what I do is simply send the message 
when the close() method of the OutputStream is called, here is the 
source:

Right now, my problem is that if the email fails I know it has failed, 
but the only way for me to know why os to look at the logs.....

public class MailSource extends AbstractStreamWriteableSource 
implements WriteableSource  {

	public MailSource( ComponentManager manager ) {
		super(manager);
	}
	
	public InputStream getInputStream() {
		return null;
	}
	
	public OutputStream getOutputStream() {
		return new MessageBuffer();
	}	
	
	public String getSystemId() {
		return "Email Source";
	}

	class MessageBuffer extends ByteArrayOutputStream {
		public void close() throws IOException {
			super.close();
			try {
				Properties props = new Properties();
				props.put( "mail.transport.protocol", "smtp" );
				props.put( "mail.smtp.host", "localhost" );
				Session mailSession = Session.getInstance( props, null );
				MimeMessage mimeMessage = new MimeMessage( mailSession, new 
ByteArrayInputStream( toByteArray() ) );
				Transport.send( mimeMessage );
			} catch ( Exception e ) {
				getLogger().error("Error sending email", e );
				throw new IOException( "Unable to send email" );
			}
		}
	}
}

If you have any ideas!(even if it involves changing the way I am 
thinking of doing this)

Ciao

Eric

> What happens if your source just throws something like a 
> ProcessingException when
> it comes across an error. How does the SourceWritingTransformer handle 
> that?
>
> Regards, Upayavira
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: WritableSource output Cocoon 2.0.4

Posted by Upayavira <uv...@upaya.co.uk>.
> Not exacly,
> 
> That is fine, what I would like is to be able to change the result I
> get from the SourceWritingTransformer.
> 
> For exemple, if the email cannot be sent because of a bad address, I
> would like to be able to insert, in the resulting XML, my own error
> message...(something that I can later pass thru XSLT and tell the user
> the address was bad instead of just a message saying the source got an
> error" Failed to cancel")

What happens if your source just throws something like a ProcessingException when 
it comes across an error. How does the SourceWritingTransformer handle that?

Regards, Upayavira


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: WritableSource output Cocoon 2.0.4

Posted by Eric di Domenico <li...@cafebotero.com>.
Not exacly,

That is fine, what I would like is to be able to change the result I 
get from the SourceWritingTransformer.

For exemple, if the email cannot be sent because of a bad address, I 
would like to be able to insert, in the resulting XML, my own error 
message...(something that I can later pass thru XSLT and tell the user 
the address was bad instead of just a message saying the source got an 
error" Failed to cancel")

The error messages seem to be hard coded in the 
SourceWritingTransformer and I was wondering if there is another way I 
am not aware of to change this.

Eric
On Lundi, mars 17, 2003, at 15:22 America/Montreal, Upayavira wrote:

>> I have implemented a basic Email WritableSource.
>>
>> Is there a way for me to add information to the outputted page?
>
> Do you mean that, once the source has been written to, you want to 
> present
> something back to the browser? If so, you just do an XSLT 
> transformation on the
> output of your SourceWritingTransformer stage, to return HTML for the 
> user.
>
> Have I understood you correctly?
>
> Regards, Upayavira
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org
>


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: WritableSource output Cocoon 2.0.4

Posted by Upayavira <uv...@upaya.co.uk>.
> I have implemented a basic Email WritableSource.
> 
> Is there a way for me to add information to the outputted page?

Do you mean that, once the source has been written to, you want to present 
something back to the browser? If so, you just do an XSLT transformation on the 
output of your SourceWritingTransformer stage, to return HTML for the user.

Have I understood you correctly?

Regards, Upayavira


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: xerces version in j2sdk_1.4.1

Posted by Yury Mikhienko <yu...@mobicomk.donpac.ru>.
On Mon, 17 Mar 2003 10:07:51 -0800
Charles Yates <ce...@stanford.edu> wrote:

> Yury Mikhienko wrote:
> 
> >Hi all!
> >
> >Does anyone know the xerces version in j2sdk_1.4.1 ?
> >
> j2sdk_1.4.1 does not use xerces.
> 
> >And also: can I set  another xerces for using (if I use java1.4)?
> >
> http://java.sun.com/xml/jaxp/faq.html
> 
> 

Good point! Thank you!

-- 
 
Best regards,
Yury Mikhienko.
IT engineer, ZAO "Mobicom-Kavkaz"

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


WritableSource output Cocoon 2.0.4

Posted by Eric di Domenico <li...@cafebotero.com>.
Hello,

I have implemented a basic Email WritableSource.

Is there a way for me to add information to the outputted page?

Thank you

Ciao

Eric


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Re: xerces version in j2sdk_1.4.1

Posted by Charles Yates <ce...@stanford.edu>.
Yury Mikhienko wrote:

>Hi all!
>
>Does anyone know the xerces version in j2sdk_1.4.1 ?
>
j2sdk_1.4.1 does not use xerces.

>And also: can I set  another xerces for using (if I use java1.4)?
>
http://java.sun.com/xml/jaxp/faq.html




---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org