Knitting and XML

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.

Originally published on Anyway, my other blog.

Leave a Reply

Your email address will not be published.