I've never really understood why we consider <graduation date="2012-03-31"/> as less generic than <event type="graduation" date="2012-03-21"/> There seems to be some very deep-rooted feeling that element and attribute names are "fixed" while attribute values are "variable". Perhaps our schema technology encourages this thinking, or perhaps it is languages like XPath, but the fact is that we don't really believe and trust in the "X" in "XML". I've argued in favour of user-defined axes for many years but I've found it hard to get the idea taken seriously. Though I've never taken it quite this far as to allow the "node-test" part of the step to be interpreted in a user-defined way. Substitution groups can be great for handling this kind of content: where in schema-aware XPath, schema-element(event) selects graduation elements because they are part of the substitution group. I've seen little take-up of that, however. Michael Kay Saxonica |