9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Enrico Weigelt <weigelt@metux.de>
To: Fans of the OS Plan 9 from Bell Labs <9fans@cse.psu.edu>
Subject: [9fans] CSS parser for abaco [WAS: abaco @ plan9port]
Date: Thu, 13 Mar 2008 15:58:31 +0100	[thread overview]
Message-ID: <20080313145830.GB24834@nibiru.local> (raw)
In-Reply-To: <20080312213636.GB28200@nibiru.local>


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/
---------------------------------------------------------------------


  parent reply	other threads:[~2008-03-13 14:58 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-08  3:00 [9fans] Hi and, plan9-native abaco sources? Sean Caron
2008-03-08  3:46 ` Pietro Gagliardi
2008-03-08  4:16 ` Iruata Souza
2008-03-10 11:38   ` Vinícius de Figueiredo Silva
2008-03-11 17:01     ` [9fans] abaco @ plan9port [WAS: Hi and, plan9-native abaco sources?] Enrico Weigelt
2008-03-11 17:12       ` Federico G. Benavento
2008-03-12 21:36         ` Enrico Weigelt
2008-03-13 14:33           ` [9fans] plan9 font service [WAS: abaco @ plan9port] Enrico Weigelt
2008-03-13 15:13             ` Federico G. Benavento
2008-03-13 14:58           ` Enrico Weigelt [this message]
2008-03-13 20:30             ` [9fans] CSS parser for abaco " Iruata Souza

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080313145830.GB24834@nibiru.local \
    --to=weigelt@metux.de \
    --cc=9fans@cse.psu.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).