Knitting and XML

Eve’s XML and knit­ting ana­logy got me thinking.

You can think of a writ­ten knit­ting pat­tern as being the schema, with a set of instruc­tions, just like the schem­a’s con­tent mod­el. Then each knit­ted item you make that con­forms to that knit­ting pat­tern is like the doc­u­ment instance that con­forms to the schema. Schem­as can be restrict­ive or allow lots of instance struc­ture vari­ations, as can knit­ting pat­terns. And, to tie it into my pre­vi­ous post on knit­ting and copy­right, a schema can be copy­righted (and often is). The ana­logy does have a few prob­lems when you start try­ing to fig­ure out the rela­tion­ship of the set of tags in a doc­u­ment instance and the con­tent with­in those tags; if you think of the knit and purl stitches as being the ele­ments, then the yarn would be the con­tent. Except for, yarn can­’t really be ori­gin­al in the same way as the con­tent in an XML doc­u­ment can be. Some people may dis­agree when it comes to hand-painted yarns, of course.

4 thoughts on “Knitting and XML

  1. When I was at the Uni­ver­sity of Queens­land, one of the math­em­at­ics pro­fess­ors did quite well out of codi­fy­ing the struc­ture of tartans using group the­ory. This turns out to be pretty import­ant for tartan man­u­fac­tur­ers, 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 mil­lion miles away from knit­ting, albeit that tartans do have a rather more rigid structure.
    Cheers, Tony.

  2. Group the­ory as a com­pressed way of stor­ing tartan pat­terns makes total sense, come to think of it, giv­en all the sym­met­ries with­in them. And tartan pat­terns are just a spe­cial case of reg­u­lar loomed fab­ric, which, of course, were already con­trolled by punched-card “schem­as” (thanks to Jacquard et al.) more than 200 years ago.

    Some­what relatedly, I just saw a TV show that showed how to use crochet and simple weav­ing to make a unique plaid pat­tern to com­mem­or­ate birth­days and such. You base the pat­tern on the date of the event. It’s sort of like invent­ing your own clan tartan (gasp), and it comes a little closer to using yarn as inter­est­ing “con­tent” among all those tags.

Leave a Reply to Eve M. Cancel reply

Your email address will not be published. Required fields are marked *