Re: [xsl] Multi-grouping with keys (back of book index)

Subject: Re: [xsl] Multi-grouping with keys (back of book index)
From: "Mukul Gandhi" <gandhi.mukul@xxxxxxxxx>
Date: Mon, 23 Oct 2006 10:53:42 +0530
Thanks Mike for your reply. It's helpful...

On 10/22/06, Michael Kay <mike@xxxxxxxxxxxx> wrote:
> 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/


--
Regards,
Mukul Gandhi

Current Thread