# Monday, April 12, 2004

I just got asked a question at work that reminded me how many people still don't quite "get" XML.  And I still find it surprising.  We've now had a good 6-7 years of XML being fairly present, and 3-4 years of it being pretty ubiquitous.  And yet...

Once upon a time I wrote (and taught) a class on XML for a variety of customers, and when I think about the experience now, I think the hardest thing to get across to people is how to visualize the InfoSet.  It's not flat.  XML looks flat when you see it on a page (not flat in an ISAM way, there is hierarchy, but flat in a 2D kind of way), but the InfoSet isn't.  As soon as you introduce things like namespaces and ID/IDREFS, the InfoSet itself is really this big n-dimensional think that's hard to get your head around.  If you look at the XPath spec, it should provide a big clue.  It talks about navigating InfoSets in terms of axes.  That's exactly what they are.  Namespaces are a separate axis.  They come right out of the screen at your face.  It's not flat

And that's not even counting what happens when schema gets into the picture.  The shape of a "Post Schema Validation InfoSet" may have very little to do with that the XML looks like on the page.  That's why Binary XML shouldn't be scary to anyone.  It's just another way of serializing the InfoSet, not the XML.  Think about the thing that the XML becomes being serialized in a different manner, not the XML itself.  "Binary XML" in and of itself sounds pretty silly, since the whole point is that XML is text.  But "Binary Serialized PSVI" doesn't sound so silly, and may have some distinct advantages. 

OK, in rereading that I realize it may make sense to nobody but me, but given the self-indulgent nature of blogging I don't really care.  :-)  If I can help just one person see the InfoSet and not the flat XML, I'll sleep that much better at night.

XML
Comments are closed.