Eve’s XML and knitting analogy got me thinking.
You can think of a written knitting pattern as being the schema, with a set of instructions, just like the schema’s content model. Then each knitted item you make that conforms to that knitting pattern is like the document instance that conforms to the schema. Schemas can be restrictive or allow lots of instance structure variations, as can knitting patterns. And, to tie it into my previous post on knitting and copyright, a schema can be copyrighted (and often is). The analogy does have a few problems when you start trying to figure out the relationship of the set of tags in a document instance and the content within those tags; if you think of the knit and purl stitches as being the elements, then the yarn would be the content. Except for, yarn can’t really be original in the same way as the content in an XML document can be. Some people may disagree when it comes to hand-painted yarns, of course.
When I was at the University of Queensland, one of the mathematics professors did quite well out of codifying the structure of tartans using group theory. This turns out to be pretty important for tartan manufacturers, who need to be able to store the details of a tartan so a new batch can be made at a later date when required. I guess that isn’t a million miles away from knitting, albeit that tartans do have a rather more rigid structure.
Group theory as a compressed way of storing tartan patterns makes total sense, come to think of it, given all the symmetries within them. And tartan patterns are just a special case of regular loomed fabric, which, of course, were already controlled by punched-card “schemas” (thanks to Jacquard et al.) more than 200 years ago.
Somewhat relatedly, I just saw a TV show that showed how to use crochet and simple weaving to make a unique plaid pattern to commemorate birthdays and such. You base the pattern on the date of the event. It’s sort of like inventing your own clan tartan (gasp), and it comes a little closer to using yarn as interesting “content” among all those tags.
Check out http://www.knitml.com, a knitting markup language using xml.
@Matt: yup, knitml is interesting.