xml+css

| | Comments (0)

xmlwebserv.gif
以前很迷 XML 相关的技术,还在 Java 周报投稿过一篇关于 [Apache Cocoon] 的文章,因而获得 JavaTwo 免费入场券,不过我已经四年没有从事 server-side 的技术开发,大概也忘光了。

下午跟 robben 爬山回来,想到答应 Purple 要处理一个 XML 的小问题。之前的 blog [Beautiful Solitude] 提到 Purple 与她的 blog,正如「回响」所及,现在已经「消失」了,不过因特网神奇之处,在于数据是共享的,所以我从 [Liferea] 的 cache 中找出旧的备份,但是真正的麻烦才开始。用 XML tree viewer 看了之后,发现 cache 虽然是 XML format (valid),但是其 data source 的表示方式让我晕倒:依据 [Liferea] 的设计逻辑,原始的 RSS 经过订阅后,会撷取个别 item,并转换成 non-XML data stream,然后喂给 Gecko (Mozilla / Firefox) 或 gtkhtml2 作显示,所以呢,我们要的「牛肉」根本不在 XML nodes 中。
所以呢,刚刚顺便复习 libxml2 & regex Programming,动手写一个 ugly C code 来作暴力转换,写到一半发现,其实可以善用 XML + CSS 来处理,于是,现在的版本:[Beautiful Solitude] (beautiful-solitude.xml),这是用最小的修改 (删除两行 XML) 的方式来作,当然,真正解决问题的方式,应该是透过 XHTML 来作,不过看来暴力转换就是必要的 (code 也写好,但是看起来颇乱),感觉很不优雅 :(

Reference: [XML: Presentation with CSS]

Leave a comment

About this Entry

This page contains a single entry by CcChen published on November 28, 2005 11:33 PM.

阅图新秀ALSee was the previous entry in this blog.

Mobile ESPN 手机服务 is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.

Google Ads