Re: 2.6 patterns: let's try variations on the XML syntax

Subject: Re: 2.6 patterns: let's try variations on the XML syntax
From: Paul Prescod <papresco@xxxxxxxxxxxxxxxx>
Date: Mon, 31 Aug 1998 20:03:45 -0500
Scott Lawton wrote:
> 
> Especially given that tags in the "action" area (e.g. <HTML><HEAD>...) are
> literal, I think it would be really nice for tags in the match part to be
> literal.

Simple patterns are simple in either syntax. Complex patterns would be not
only verbose in "literal" syntax, but actually misleading. Given, for
instance, alternation, the structure of the actual match would be
radically different from the structure of the pattern.
 
> Also, patterns like "book[excerpt]/author[attribute(degree)]" have hidden
> information; it's not at all clear that excerpt and author are siblings.

It's not at all clear unless you learn the language. Then it is clear.
 
> Finally, patterns-as-XML is easier in the following sense: they can be
> edited directly by all XML tools.  Isn't that a big win?

No. The patterns described in the XML spec. can also be edited in all XML
tools.

What you mean is that standard XML editors can help you with the structure
of the pattern. Unfortunately, the help they give you would be essentially
pathetic. An XML editor is a far, far way away from a real query builder.
The editor will not help you to manage the complexity of what you are
trying to accomplish -- that's the real problem, not the trivialities of
the syntax. In my mind, the anti-"string pattern" crowd is wasting its
effort on a minor issue. The real question is whether the underlying
concepts are powerful enough and simple enough to accomplish what we need
them to.

 Paul Prescod  - http://itrc.uwaterloo.ca/~papresco

Everything I touch turns into Python.


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread