the iCite net > news / blog > a permalink

news and thoughts on and around the development of the iCite net
by Jay Fienberg

Query symbols meaning: all, and all not empty

posted: Dec 17, 2004 9:41:55 PM

For sub-project 1 (code-name: kickitch — I finally got sick of not having a simpler way to refer to it in these blog posts!), I am working with datasets that are represented in different formats, including XML and tabular ones. A big difference between XML and tables is that XML is sparse (missing or n/a data is not represented by a placeholder), whereas tabular formats are dense (missing or n/a data is represented by default or null values).

So, in the query syntax I'm developing, I was planning on using the asterisk (*) to mean "include all fields". But, for XML formats, I need to account for two variants: #1 - include all elements even if they are empty and not required, and, #2 - include all that are non-empty or not otherwise required.

As an example, <generator> is an optional field in the channel section of an RSS 2.0 XML file. I have a value of "blojsom" in this blog's current RSS 2.0 file.

If I didn't have a generator value, the typical RSS/XML way to express this would be to leave out the <generator> tag altogether. In contrast, I would store a default value in a tabular representation (and someone else might store a NULL were it a SQL table—not me, but it's one option).

Because what I'm doing, I hope, will be generating different contexts for using XML formats like (but, not exactly) RSS, I can imagine cases where one would want to include empty tags rather than leave them out entirely.

Anyway, I'm thinking of using ** for #1 (all, show empties) and * for #2 (all, don't show empties unless they're required). Tabular formats won't distinguish between * and **, but XML formats will.

Let me know if you think ** is bad for some reason. I couldn't remember other programming contexts where ** was used, but I'm sure there are some—hope my use won't cause confusion. I wanted to use a single symbol, but ** made more sense (visually / semantically) than others that I experimented with.

permalink | comments {0} · trackbacks {0}

also available as: rss · rss2 · rdf · atom

Comments and Tracbacks

Note: All comments and trackbacks are moderated. Spam is deleted. Other comments are approved as promptly as possible.

Note: Older posts no longer accept new comments or trackbacks.

« prev post
We at the Seattle weblog meetup

» next post
Tracking blog post comments with del.icio.us

blog newsfeeds

brief content:

 XML  ·  RSS  ·  RDF  ·  Atom 


full content:

 XML  ·  RSS  ·  RDF  ·  Atom 


blog archive

2006:
jan · feb · mar · apr
may · jun · jul · aug 
sep · oct · nov · dec
		
2005:
jan · feb · mar · apr
may · jun · jul · aug
sep · oct · nov · dec

2004:
jan · feb · mar · apr
may · jun · jul · aug
sep · oct · nov · dec

2003:
may · jun · jul · aug
sep · oct · nov · dec

first post: 
April 30, 2003

highlight views:
Spammers' Choice
		

Jay elsewhere online
Jay Fienberg - the official home page

Wrong Notes - the music blog of the Ear Reverends

Fine & Full, aka, a fine and full burger

Sociomobilepoetextologia (moblog, currently inactive due to lack of proper mobile)

to enjoy roll
sites I like to read when I start from here

· Anastasia Fuller
· Andy Baio
· Biz Stone
· Boris Mann
· Bre Pettis
· Chris Dent
· Danny Ayers
· Dare Obasanjo
· David Czarnecki
· David Weinberger
· Don Park
· Evan Williams
· Greg Narain
· Jason Kottke
· Jim Benson
· Lucas Gonze
· Marc Canter
· Matt May
· Matt Mullenweg
· Michal Migurski
· Nancy White
· Rebecca Blood
· Reg Cheramy
· Richard MacManus
· Sam Ruby
· Shelley Powers
· Tim Bray
· danah boyd


powered by blojsom


Entries by blojsim