I have decided to dust off my XSL and see if I could transform a
phpsysinfo XML file into an OPML file.
I came up with the attached stylesheet; I tried it on a single linux
machine, I have no idea how the stylesheet behaves on other
architectures. The output looks ok on an SB3 or an SBC. 
Localization should be possible; I use a lookup table in the
stylesheet, but it's a bit shoddy since this is a flat table (meaning I
didn't care to differentiate <RAM><Free>x %</Free></RAM> from
<Partition><Free>x %</Free></Partition>, and it shows a bit.)

I tried to plug this into the InfoBrowserAddons API. Call me stuffy,
but I don't understand how to send back an opml file and not some
indescript array structure. Feel free to integrate if you can.

For now you can run something like "xsltproc -o phpsysinfo.opml
stylesheet.xsl my_phpsysinfo_xml_php.xml" and get the opml file
relevant (?) to your machine.

About the 3 files below: phpsysinfo_xml_php.xml is a status file taken
from my machine, phpsysinfo.opml is the generated result,
stylesheet.xsl has the transform rules.


+-------------------------------------------------------------------+
|Filename: phpsysinfo_xml_php.xml.gz                                |
|Download: http://forums.slimdevices.com/attachment.php?attachmentid=6956|
+-------------------------------------------------------------------+

-- 
epoch1970
------------------------------------------------------------------------
epoch1970's Profile: http://forums.slimdevices.com/member.php?userid=16711
View this thread: http://forums.slimdevices.com/showthread.php?t=48521

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to