[XSL-LIST Mailing List Archive Home] [By Thread] [By Date]

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

Subject: Re: [xsl] Things that make you go Hmmmm!
From: Ihe Onwuka <ihe.onwuka@xxxxxxxxx>
Date: Sat, 29 Mar 2014 14:08:15 +0000

 xsl:copy-of select=$foo where $foo is a sequence of variables
representing functions is allowed. What does it do?

I strongly believe in the orthogonality of design principle
articulated by Michael yesterday.

Functional programming is based on functions as first class values. A
function can appear anywhere that any other atomic value can appear.
Whether it is on the end of a print statement, as the object of a
return statement, as a member of a sequence, in a comparison. You
don't stop and say well I don't see what sense it would make for min
or gt to compare two functions or a function so I won't allow it.

You can look at copy and copy-of and see differences or you can look
at copy and copy-of and see similarities. One approach accommodates
one viewpoint another approach accommodates both.

My starting point for a language design would be to strive for
identical content models for things that can reasonably be said to be
of the same genre. To me the fact that they do different things is
their whole raison d'etre i.e if they didn't do different things there
would be no need for one of them. That is not a  charter for tightly
tailoring the content model for that construct to the use cases you
can envisage today.

So I would not obsess over what X would do if the y part of it's
content model were invoked for the same reason that functional
programming languages do not baulk at being asked to do a relational
comparison between two functions.

Thats the big picture of my view and for every specific instance that
you bring up that is the flavour of the answer you are going to get so
I'm not going to respond ad-infinitum (take that to mean any more).

I think the tightly tailored content model viewpoint would make for a
horribly complicated language that would mandate continued references
to the manual/specification. If XSLT is all you do that might be
acceptable and for anybody that spends or needs to spend an
appreciable amount of time doing something else it's not.

On Sat, Mar 29, 2014 at 1:22 PM, Andrew Welch <andrew.j.welch@xxxxxxxxx> wrote:
> On 29 March 2014 12:42, Ihe Onwuka <ihe.onwuka@xxxxxxxxx> 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.
>> I'd make them the same.
> So if you made them the same, I'm guessing you would allow children in
> xsl:copy-of rather than make xsl:copy empty - is that right?  If so,
> what would the child nodes in xsl:copy-of do?
> --
> Andrew Welch
> http://andrewjwelch.com

Current Thread