XSLT

Ric fhj52ads at yahoo.com
Sat Aug 9 07:04:39 CEST 2003


--- Matthew Weier OPhinney <matthew-lists at weierophinney.net> wrote:
> I think all he's trying to say is to do a: 
> 
>     rename('path/to/.xfce4rc', 'path/to/.xfce4rc.bak');
> 
> and then have your script write its xml to 'path/to/.xfce4rc'. I'm
> assuming that since you're able to generate the XML from your
> xfce3rc, you *should* be able to write it -- the method may be wierd
tho',

Yea, that's no problem:

perl txt2XML -f xfce3to4_rules.xml xfce3rcINPUTfile >OUTPUT.xml

Using
perl txt2XML -f xfce3to4_rules.xml xfce3rcINPUTfile 
will write to stdout.

> wierd tho' depending on the modules you're using.
> -- 
> Matthew Weier O'Phinney
> http://weierophinney.net/matthew/
> _______________________________________________


The
OUTPUT.xml -> filter -> xfce4rc
                     ^^^^^
is the problem.

xsltproc can do that(filter) with a xslt stylesheet but I do not know,
yet, how much xsltproc can do to massage the existing XML.  Items like
"SmallPanelIcons" have to be replaced with "1" so  if-then, case, etc.
tools are needed.

Since this is 2B a CLI program, the user s/b able to just

./xfce3to4

and end up with a xfce4rc file that can be used. 
xfce3to4 will read/parse the ~/.xfce3rc file process it to XML,
transform it to xfce4rc format and write the file in the current dir as
 xfce4rc.xfce3to4.  The whole process should not take more than about
5/10 seconds, a considerable improvement over the hour(s) to do it
manually. :)

I'd like for it to work with any XFce version 3 xfce3rc file but not
sure how much the formats changed over the years.  I'd hate to have to
find and extract xfce3rc default files from every version to find
out...



=====
Have A Great Day!

Ric
***
Mondale knew this was gonna be a bad day when he called 
Dial-a-Prayer and the taped message answered him by name.
 -- Bob Hope, 1903-2003

__________________________________
Do you Yahoo!?
Yahoo! SiteBuilder - Free, easy-to-use web site design software
http://sitebuilder.yahoo.com



More information about the Xfce4-dev mailing list