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

RE: [xsl] Kleene Operators


Subject: RE: [xsl] Kleene Operators
From: "Michael Kay" <mike@xxxxxxxxxxxx>
Date: Mon, 1 Mar 2010 09:00:57 -0000

> I am lucky to have an adjunct teaching job at RIT teaching
> xml and xsl and started to think about the questions they
> might ask me about why do we use *,+,?  and wondered if there
> was some really good answer rather than the operators result
> in a closed set. I like the construct and would not imagine I
> would have something better or different to offer.

Firstly, I'm surprised that you desribe these operators as coming out of set
theory. I thought they were all to do with the structure of sequences. But
I'm not really sure what the boundaries of "set theory" are supposed to
be...

Fundamentally, if you take the view that the only interesting numbers are
zero, one, and infinity, then the interesting cardinality bounds on finite
sequences are

  (0, 0)
  (0, 1)
  (0, infinity)
  (1, 1)
  (1, infinity)

giving five ranges which one might denote as X:, X?, X*, X9, X+. In the
Kleene system, the (0, 0) case is not provided for presumably because it is
only of theoretical interest, and the (1, 1) case doesn't get a symbol
because it's the default. But I've been using X: and X9 internally.

When you say "the operators result in a closed set", I'm wondering exactly
what you you have in mind? I guess there's an intersection operator whereby
X9.X? = X9, X?.X? = X?, X?.X* = X?, X?.X+ = X9; and a union operator whereby
X?|X+ = X*, etc. But if you include X:, then X:.X+ doesn't have an
intersection within the group: X: represents the set of empty sequences, X+
the set of non-empty sequences, and their intersection is the empty set,
which isn't part of the group.

Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay


Current Thread
Keywords