RE: Multi-grouping with keys (back of book index)
> I have a question.. How do you as XSLT language designer > decide, which attributes (covering the whole XSLT/XPath > language) will be attribute value template, and which not? As > a XSLT programmer, what rule of thumb should I follow, that > which attributes are attribute value templates, and which not? Well, it's a committee decision, and that means you don't always achieve consistency. Firstly, select and test attributes are always XPath expressions; attributes whose value is an XPath expression or a match pattern are never AVTs. Secondly, attributes of top-level elements (declarations) are never AVTs. There's no absolute reason for that but it was true in 1.0 and we've kept it that way. Thirdly, attributes that contain the name of objects defined in the stylesheet are usually not AVTs. Examples, xsl:call-template/@name, xsl:apply-templates/@mode. But there are exceptions, for example xsl:result-document/@format. Attributes that affect type checking, for example @as, @type, @validation, are not AVTs; similarly other attributes where it's likely that the information will be useful at compile time, or where it doesn't make sense to change it at run time, for example tunnel=yes|no, required=yes|no. But there's no absolute logic to it, for example disable-output-escaping=yes|no could have been an AVT, but isn't. Michael Kay http://www.saxonica.com/
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format