W3C home > Mailing lists > Public > www-rdf-interest@w3.org > November 2002

Mozilla XUL <-> Squish thing workie (fwd)

From: Dan Brickley <danbri@w3.org>
Date: Sun, 3 Nov 2002 14:20:28 -0500 (EST)
To: <mozilla-rdf@mozilla.org>, <www-rdf-interest@w3.org>
Message-ID: <Pine.LNX.4.30.0211031412130.12319-100000@tux.w3.org>

A quick work-in-progress from a recent plane flight...

Idea is to make a little Ruby library for generating XUL templates given
an RDF query in one of the various RDF query languages (Squish in this

I don't expect this to make much sense to people who're not familiar with
either Mozilla XUL templates or Squish/rdfdb/rdql/dql approaches to RDF

But you never know, so I thought I'd send forward my quick scribbles to
these lists... If it doesn't make sense, forget your saw this message. I
don't expect to get time to hack much more on this in next few weeks, so
shipping what I've done makes sense.

Basic idea is to show how Mozilla is in effect an RDF query
implementation, and to explore interop between that effort and other work
in the RDF/SemWeb developer community...


see also: http://www.mozilla.org/docs/xul/xulnotes/template-bindings.html
for b/g on Mozilla's XUL Template system.

---------- Forwarded message ----------
Date: Sun, 3 Nov 2002 14:09:58 -0500 (EST)
From: Dan Brickley <danbri@w3.org>
To: libby.miller@bris.ac.uk, eric@w3.org, Damian Steer <D.M.Steer@lse.ac.uk>
Cc: www-archive@w3.org
Subject: Mozilla XUL <-> Squish thing workie
Resent-Date: Sun, 3 Nov 2002 14:10:04 -0500 (EST)
Resent-From: www-archive@w3.org


squish2xul.rb > _simple.xul

...generates XUL that Mozilla's happy with and displays in a pretty table

Code snippet below. Is almost useful, except I don't explain anywhere the
role that several things play w.r.t. XUL (see comments in code).


  query = SquishQuery.new().parseFromText <<EOQ
   SELECT ?uri, ?bugs, ?bug,
   WHERE	(b::bugs ?uri ?bugs)
  		(rdfs::member ?bugs ?bug)
		(b::id ?bug ?id)
		(b::component ?bug ?component)
		(rss::title ?bug ?rsst)
 USING 	 	b FOR http://www.bugzilla.org/rdf#
	rss FOR http://purl.org/rss/1.0/
 	rdfs FOR http://www.w3.org/2000/01/rdf-schema#


  xul = XULData.new
  xul.src_data = 'http://bugzilla.mozilla.org/duplicates.cgi' #what is

  xul.columns = [
              {'id'=>'id', 'label'=>'ID'},
              {'id'=>'component', 'label'=>'Component Name'},
              {'id'=>'rsst', 'label'=>'Title'},
  xul.itemvar='?bug' 		# what do these do?

  top = xul.wrapper
  tree = xul.toXULTree query
  window = top + tree + "\n</window>\n\n"
Received on Sunday, 3 November 2002 14:20:30 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:07:43 UTC