get value to standard out when writing to file.

M

Mikael Petterson

Hi,

I am using xsl to create a number of java files. If I discover a certain
information in my input file (xml) I must report it to the user similair to
" Error reported when creating class "AAA". However when I am generating I
use redirect to write to files.
This means that my error message will go in the java file. Not so good. User
will get no info which class is going wrong.
I was thinking of using the
<xsl:message terminate="yes">
Error: creating class .....
</xsl:message>
But I cannot (or I do not lknow) get my class value into the message-tag. I
need to pinpoint
my class otherwise it is no use to the user.

Any hints are greatly appreciated!!!

BR

//Mikael
 
B

Boudewijn Dijkstra

Mikael Petterson said:
Hi,

I am using xsl to create a number of java files. If I discover a certain
information in my input file (xml) I must report it to the user similair to
" Error reported when creating class "AAA". However when I am generating I
use redirect to write to files.
This means that my error message will go in the java file.

Use System.err for errors, not System.out.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,743
Messages
2,569,477
Members
44,898
Latest member
BlairH7607

Latest Threads

Top