Re: [xsl] Kleene Operators

Subject: Re: [xsl] Kleene Operators
From: Terry Badger <terry_badger@xxxxxxxxx>
Date: Sun, 28 Feb 2010 17:38:20 -0800 (PST)
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.

----- Original
Message ----
From: G. Ken Holman <gkholman@xxxxxxxxxxxxxxxxxxxx>
Sent: Sun, February 28, 2010 2:58:58 PM
Subject: Re: [xsl] Kleene Operators

At 2010-02-28 11:48 -0800, Terry Badger
> I have been using Michael Kay's XSLT book and see that the regex, XSL
and DTD occurrence operators are defined in set theory. I wonder how important
this is when we use them. I guess my question is: does something very useful
happen as the result of using these operators in XML activities that would not
have happened had we used something else?

When I teach XSLT and XQuery set
theory comes into play a lot, of course mostly when talking about the XPathy
operators union, intersect and except.  I find the use of "union" is
extensive, the use of "except" common and the use of "intersect" rare in my
work.  In the class exercises I expect students to make use of "union" and

Kleene operators are familiar to the programmers who attend the
class.  Cardinality is well known to database people.

I'm not sure where your
question is coming from regarding "importance" ... aren't all of these
concepts critically important to working with information of any kind?  If we
weren't using the already-familiar notation of Kleene operators, wouldn't
something else be more confusing?

This was a lesson I learned almost two
decades ago when I was on the project team developing the Near and Far
graphical DTD editing tool:  being a graphical interface we implemented icons
for each of the Kleene operators and found ourselves having to teach users
something new for what they already understood.  It was a drawback to use
something other than what was already in use.

I'm curious what compelled you
to ask the question ... can you think of a better way to express these
concepts and you think the industry made a mistake leveraging what is already
there?  I don't mean that question in a negative sense as it may sound ... I'm
really trying to understand what triggered the question.

I hope this helps.
. . . . . . . . . . . . . Ken

XSLT/XQuery training:      after 2010-03-15/19
XSLT/XQuery training:        San Carlos,
California 2010-04-26/30
Principles of XSLT for XQuery Writers: San
Francisco,CA 2010-05-03
XSLT/XQuery training:                Ottawa, Canada
XSLT/XQuery/UBL/Code List training: Trondheim,Norway
Vote for your XML training:
Crane Softwrights Ltd.
G. Ken Holman               
Male Cancer Awareness Nov'07
Legal business disclaimers:

Current Thread