From mboxrd@z Thu Jan 1 00:00:00 1970 Date: Thu, 13 Mar 2008 15:58:31 +0100 From: Enrico Weigelt To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu> Message-ID: <20080313145830.GB24834@nibiru.local> References: <20080311170105.GA28200@nibiru.local> <32d987d50803111012u5c91384ale2ef958e0558cbf5@mail.gmail.com> <20080312213636.GB28200@nibiru.local> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20080312213636.GB28200@nibiru.local> User-Agent: Mutt/1.4.1i Subject: [9fans] CSS parser for abaco [WAS: abaco @ plan9port] Topicbox-Message-UUID: 77590788-ead3-11e9-9d60-3106f5b1d025 Hi folks, as abaco doesn't yet have CSS support, I intend to write some tiny CSS parser/loader. If we represent the CSS contents as an tree structure, we basicly have these node types: * media type: container for holding media-specific data. per default we're operating in "all". to make it simplier, the parse could be told to only honor one specific type. * @import: tells us to include another file it could be either resolved within the parsing process by an call-back or simply added to the output tree * per-object: has one and more object addresses (eg. via ID, classname or even some path) and contains a list of properties. for make it simpler, we can "flatten" multiple addresses by inserting an copy per single address * object properties: are just name+value pairs of (almost) arbitrary strings. some of the values could be also parsed and split into several other properties (eg. some url() statement could be replaced by an addittional *-url property). While parsing this way into a list of property lists isn't that challenge, there are still some open questions, eg. should most of the properties representing specific type of data (eg. borders and padding) be split off to the finest granilarity and maybe also identified by an integer ID instead of the name or does this belong to the client (-> renderer) ? cu -- --------------------------------------------------------------------- Enrico Weigelt == metux IT service - http://www.metux.de/ --------------------------------------------------------------------- Please visit the OpenSource QM Taskforce: http://wiki.metux.de/public/OpenSource_QM_Taskforce Patches / Fixes for a lot dozens of packages in dozens of versions: http://patches.metux.de/ ---------------------------------------------------------------------