On Thu, 02 Mar 2006 10:40:45 -0500 "A. Costa" <[EMAIL PROTECTED]> wrote:
> On Thu, 2 Mar 2006 13:15:51 +0100 > Ricardo Mones <[EMAIL PROTECTED]> wrote: > > > I think you can better try xsltproc and a simple XSLT stylesheet. > > Attached an example of a addressbook XML to XHTML conversion I did > > time ago. Doing it for generating text will be probably easier, there > > is a lot of XSLT tutorials out there if you have doubts. > > Thanks very much for the help, but I don't know how to run the script, > or what it outputs. Naturally it probably would be a good thing if I > were to learn XML. Yet a solution to a wishlist bug that requires users > to learn a whole new language (or a variant) seems difficult. > Nothing against XML though. What's desired is a no-brainer solution... > e.g. "upgrade, right click there, and pick the new convert/translate > option". I think an option could be added to invoke xsltproc with a predefined XSLT sheet (or selecting one from a predefined set), but I don't know if upstream is willing to accept such dependency on an external program. > That being said, some observations on the attached XML. A trial run: > > % xsltproc /tmp/sylpheed-addrbook-to-xhtml.xsl ; echo $? [...] > Copyright 2005-2006 by Ricardo Mones <[EMAIL PROTECTED]> > ^ > cannot parse /tmp/sylpheed-addrbook-to-xhtml.xsl > 4 Yep, I happily added the license and copyright without escaping the content from the XML parser. The version attached with this mail should work much better ;-) (also fixed a bug which prevented the result to validate XHTML-Strict :) > ...that didn't work. Well maybe the man page for 'xsltproc' will > help; its syntax: [...] > ...bit of Swiss Army Knife there. I'll take a guess and try passing > the data as FILE. First I need a file. Here are some: > > % ls ./.sylpheed/ [...] > addrbook-000001.xml folderlist.xml.bak templates/ > addrbook-000002.xml imapcache/ tmp/ > addrbook-000002.xml.bak menurc uidl/ Try with one of the addrbook-00000X.xml files, these contain the addressbook contacts. For example: xsltproc sylpheed-addrbook-to-xhtml.xsl .sylpheed-2.0/addrbook-000001.xml > common.html regards, -- Ricardo Mones.
sylpheed-addrbook-to-xhtml.xsl
Description: application/xml

