You are not logged in.

#1 2006-12-11 23:23:08

daedalusman
Member
From: CO, USA
Registered: 2006-12-05
Posts: 258

color in xslt?

I was wondering if there is a way to put color into an xslt file? I mean, the output of the file not the file contents. I have this script for conky that gathers weather information from weather.com and I would like to ass color to the output of the script. I can't use conky to colorize it because then the whole output would be colored and I just want to colorize some aspects of the output. Thanks for any help.

Offline

#2 2006-12-11 23:33:03

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: color in xslt?

XSLT is about transforming data - XML data to what ever you want.

You choose how it outputs. If you're outputting as an html file, then you put the appropriate tags/CSS.

What is your output? Raw text? HTML?

Offline

#3 2006-12-11 23:37:54

daedalusman
Member
From: CO, USA
Registered: 2006-12-05
Posts: 258

Re: color in xslt?

arooaroo wrote:

XSLT is about transforming data - XML data to what ever you want.

You choose how it outputs. If you're outputting as an html file, then you put the appropriate tags/CSS.

What is your output? Raw text? HTML?

It outputs text.

Offline

#4 2006-12-12 13:02:04

arooaroo
Member
From: London, UK
Registered: 2005-01-13
Posts: 1,268
Website

Re: color in xslt?

In that case you need to pick an alternative output format because text is just text.

If you were printing directly to a console, then it's possible to add escape sequences which can add colour. These strings won't appear in the output, but it's ultimately a kind of markup.

You need to decided what formats are available for you.

Offline

#5 2006-12-12 21:36:30

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: color in xslt?

If you decide about mark up console codes, visit
man console_codes
and search for Graphics Rendition.

E.g. try in your console
echo -e 'I am e[31;1mrede[m! and I am e[34;1mbluee[m!'

Offline

#6 2006-12-12 22:19:18

cmp
Member
Registered: 2005-01-03
Posts: 350

Re: color in xslt?

I think he should just use the conky color escapes.

Offline

#7 2006-12-13 09:02:23

ezzetabi
Member
Registered: 2006-08-27
Posts: 947

Re: color in xslt?

sorry for the stupid question, what the conky color escapes are?

Offline

#8 2006-12-13 20:20:21

daedalusman
Member
From: CO, USA
Registered: 2006-12-05
Posts: 258

Re: color in xslt?

cmp wrote:

I think he should just use the conky color escapes.

This sounds like a great idea, I will give it a try later on and report back on whether it works or not. Thanks for the replies.

Offline

Board footer

Powered by FluxBB