loge.hixie.ch

Hixie's Natural Log

2006-06-29 20:20 UTC How to make namespaces in XML easier

I was thinking this morning about a possible extension to the Namespaces in XML spec that might make life easier for authors.

<html xmlns="import svg xbl html">
 ...
 <body>
  ...
  <svg>
   <rect .../>
  </svg>
 </body>
</html>

That is, add a new feature: the default namespace URI, if it starts with the string "import" followed by a space, is a space-separated list of keywords representing namespaces from which to look up each element. So in the example above, the "html" element is in the HTML namespace, the "body" element is too, the "svg" element is in the SVG namespace, and the "rect" element is in the SVG namespace. UAs would have a hardcoded list (given in the spec for this feature) of which element names are in which namespace, to make this possible. That way authors don't have to remember namespace URIs and they don't have to deal with namespace prefixes. Clashes would be solved by picking the first namespace in the author's list. Unknown elements would end up either in the last namespace specified, or the "" non-namespace, whichever way it was defined.

Alternatively we could have xmlns="web document", maybe, which would simply have the same effect but with a hard-coded list of namespaces and element names, so the authors don't even have to remember which languages to import. That would be less flexible, but the flexibility might not be needed.

The problem with this is how to introduce new element names; there'd be a long lag before people could start using them. That would be a reason to pick the namespace most likely to get new names as the default. Note that this wouldn't clash with existing usage of xmlns since you can't have a space in a valid namespace URI today.

2006-06-25 23:23 UTC Yosemite (and stuff)

I love how Microsoft announce all their news long before they actually do whatever it is they announced. "Our next operating system will rock! In three years. Maybe four." "Our browser is going to be amazing! It will ship next year." "Our search engine will be better than the competition! In six months." (That last one is especially funny to me since they keep saying it every six months, as far as I can tell.) But I'm especially amused by the latest one: "Our CEO will quit! In two years."

Can't fault them for consistency.

My parents came to visit so we went to see Yosemite. On the way we stopped at the self-proclaimed oldest saloon in California.

Yosemite is a mountainous area. It's hard to explain the sheer scale of some of the cliffs in and around Yosemite valley; photographs don't do it justice.

Yosemite has cute wildlife (as well as insects). We didn't see any bears or mountain lions, but we did see lots of birds, squirrels, and deers.

And of course, trees.

I'm getting to really like Amazon. I'm a little scared by quite how easy they make spending money. I've got to learn not to use Free Super Saver Shipping, though, it's far too slow. Either that, or I need to start buying stuff more often, so that I have a steady stream of packages arriving. The problem is that buying online doesn't give me the instant satisfaction of buying in a shop. Although... iTunes even beats shops, you get the stuff Right Then, without having to even get dressed. Er, I mean, without having to go to a shop. Right.

Pingbacks: 1

2006-06-12 02:43 UTC Ranting on the Caltrain

On Friday I saw Cars, the best movie of the year. (Pixar only release one movie per year, so it's easy to say which the best movie of the year is.) Stupendous. The sheer amount of detail in every shot is awe-inspiring. The story was unoriginal, as stories go, but that's the only criticism I could level at the movie. The story's execution was flawless, building the viewer's attachment to the characters as it unfolded to a marvelous finish; the acting was convincing; the music underscored every beat, making me want to use words like "themes" and "woven" and "tremendous" in ways that I am not familiar with.

I've said this before. There are teams that know Quality, and there is the majority of us, who don't. If everything was built the way Pixar builds movies... but no, most people contend themselves with doing a half-assed job.

On Saturday, after deciding with Kerz that we would make significant changes to our layout again — building the layout is by far the most fun part of having a layout at all — I took the train down to Maciej's party.

Some people argue that from Mountain View to San Francisco, you go "up", not "down". I beg to differ. Mountain View is where I am based, and therefore it's the top of the world, and therefore everywhere is "down" from Mountain View, and you always go back "up" to Mountain View. That's just how to is.

Many hours later the party wound down to a very metaphysical philosophical discussion in which is was posited that any statement stating facts about God(s) is trivially true, and wherein was asked the question "can an internally inconsistent system ever be useful?". (If you start with the assumption that 1=2, can you draw any useful conclusions?)

On Sunday I went to see San Francisco Opera's performance of Puccini's Madama Butterfly. It was a beautiful performance. The set, in particular, was stunning. I'm running out of suitably positive adjectives and therefore will avoid commenting on the music and the singers and the surprisingly expressive use of lighting, but they were all great too. (I ran into Steve Zilles during the intermission.)

I am often asked why I don't live in the city (meaning, San Francisco). I love San Francisco, but I couldn't live there. It's too noisy, dirty, wide; the roads are a mess; there are too many hills. Cities in the US (and I'm basing this on a ridiculously small sample, but bear with me) really seem to have a problem finding the aforementioned Quality. Trash bags piled high on the streets, dilapidated buildings standing next to art houses, graffiti in abundance, road surfaces which have more in common with Radiator Springs' high street after our hero ripped through it than with the smooth surface of freshly laid asphalt; overcommercialisation; rampant poverty: all of these "features" which would cause a European city's population to rise in uproar are accepted by American populations as if they were normal.

Also, San Francisco is cold. The sweater, which I had brought with me in case I went into an air-conditioned building, was my only source of insulation when I realised my 13°C mistake.

If I could comfortably afford it, I'd consider getting a second flat in the city to spend weekends, because it's true that there are more things going on in the city than elsewhere in the bay. But in the meantime, my home is where it's warm.

Although... I'm starting to like the reckless and near-suicidal adrenalin-pumping action adventure that is cycling in SF. You need omniscient awareness of the road and pavement and traffic and pedestrians; you need to be one with your bike, flying through gears as you alternately fly down through green lights and then screech to a halt at a red one, turn a bend and go up a sharp hill for a few blocks before suddenly finding yourself at the dizzying top of a descent that, weaving between parked cars and bii stopped at odd angles, you are about to negotiate.

The WHATWG list has been ablaze with talk of mathematics markup. I have not been taking part in the discussion much. I pointed out that reinventing mathematics markup is a bad idea when so many solutions have already been invented; I suggested that the idea that you could render the majority of mathematics using just CSS was probably a little optimistic; I explained that we could merge MathML into text/html HTML if we wanted to reuse MathML, which would probably be the easiest solution since MathML is already set up to work with the DOM and CSS and XML and namespaces; and I suggested some things we could do to make MathML markup simpler if we wanted to make it easier to author without sacrificing compatibility with MathML — but the other participants in the discussion mostly disagreed, it seems (sometimes emphatically, and not all in the same direction). I'm not sure where to go with this. There is no clear consensus as to what we should add to HTML5, if anything.

My current main focus with the XHTML5 spec right now is aligning it with the developments at the W3C, most notably Maciej's Window object specification. This is proving interesting, because it's not clear exactly how the two specs should mesh.

2006-06-10 05:45 UTC The wait begins again...

Only 385 days to go.

2006-05-26 21:21 UTC Late Spring 2006 Travelog: Part 12 (Homecoming)

A day late, but I'm coming home at last.

Incidentally, I'm posting this from aboard an Airbus A340-600, which is the first plane I've been on where the toilets have their own deck. It's a nice configuration. I mean, we're packed in like sardines back here in "Economy", but relative to other 11 hour flights, this isn't too bad.

The latency on this connection is pretty impressive too, it's below 900ms to Wilhelm's box in Trondheim (where I have my IRC client running) and about 1.5s to hixie.ch (which is in LA, and is where I have pine running). This is actually better than I had when blogging from Håkon's boat.

I think I've now been online from every major kind of transportation — while walking, while cycling (well, while on my bike, the bike was stationary), while in a car, while on a train, while in a boat, while on a plane. Am I missing anything? I haven't yet been online from a bus, though I've been in a bus with a wireless router, so there wasn't really a good reason for me not to have gone online.

I hear this weekend is a three day weekend. I sure hope Burrito Real isn't closed. Otherwise, what will I eat???