Re: [xsl] Things that make you go Hmmmm!

Subject: Re: [xsl] Things that make you go Hmmmm!
From: David Carlisle <davidc@xxxxxxxxx>
Date: Sat, 29 Mar 2014 13:13:39 +0000
On 29/03/2014 12:42, Ihe Onwuka wrote:
On Sat, Mar 29, 2014 at 11:57 AM, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:
On Fri, Mar 28, 2014 at 4:48 PM, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:
I was surprised that the content models of xsl:copy and xsl:copy-of
were different (by dint of the select attribute) in the first place.

They are still different, no? shallow vs deep.

On 28 March 2014 17:50, Ihe Onwuka <ihe.onwuka@xxxxxxxxx> wrote:
I'm not sure what point you are making.

That the content models are still different (not just the select attribute).



The only other difference I see is that xsl:copy has a use-attribute-set attribute and the xsl:copy-of doesn't.

But xsl:copy takes content, and xsl:copy-of is an empty element (as has been stated several times before) Why do you consider their content models remotely similar?




I'd make them the same.

Why? and in what way, what would element content of xsl:copy-of do??



As to my point. For the same reasons I would expect the content models
of xsl:next-match, xsl:apply-templates and xsl:apply-imports to be the
same.

What would the xsl:sort child of xsl:next-match or xsl:apply-imports do?



What does xsl:value-of a null string do?

It generates a text node with value a an empty string. In most circumstances that text node is then discarded when adding nodes to a parent node.



What is the advantage  of restricting a language constructs content
model to the use-cases you can foresee today. What is the disadvantage
of doing that?


If you allow things you (or at least the language designer) has to say what they mean. What would you want element content of xsl:copy-of to mean?


David

Current Thread