[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

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: Scott Lawton <scott@xxxxxxxxxxxxxxxxxxx>
Date: Tue, 25 Aug 1998 10:33:17 -0400
scott lawton
>Scott Lawton wrote:
>>
>> Please don't stop halfway.  Complaints about the syntax being verbose are
>> opportunities for articulating the benefits of XML.

Paul Prescod replied:
>I've been working with SGML and XML for several years now, and I hear this
>mantra repeated every so often. Nobody has yet agreed to take it to its
>limit, however.

First, let me say that I quite value your perspective (based on reading
various list archives over the past few months).  XML needs to address a
much wider audience than SGML; let's see if we can combine the wisdom of
the "old dogs" with the needs of the "new dogs" (if you'll pardon the
analogy).

So, in the spirit of constructive discussion:


>Should we abandon Java and other programming languages
>that do not use XML syntax?

Well, XSL did express programming constructs in XML; something that (to me)
is much more awkward than expressing a template match in XML.  I don't find
it all that readable (compared to traditional syntax) -- but I shrugged off
the extra effort since I agree with the goal of expressing in XML.

For example, compare

<xsl:define-macro name="numbered-block">
  <xsl:macro-arg name="format" default="1. "/>
  <xsl:number format="{arg(format)}"/>
  <fo:block/>
    <xsl:contents/>
  </fo:block>
</xsl:define-macro>

to one's favorite variation of:

define numbered-block(contents, format: "1. ")
  <xsl:number format="{arg(format)}"/>
  <fo:block/>
    {arg(contents)}
  </fo:block>
end

In addition to being recognizable as a macro/subroutine/function/procedure,
that also has the advantage of showing that "contents" is essentially a
parameter/argument.

Up next: invoking macros, for-each, choose/when, etc.

But, what's the goal?  To pick the best syntax for macros, programming
constructs and template match, or to express as much of XSL in XML as is
reasonable?


>XML already goes incredibly far in using
>XSL for everything. Pushing it into the pattern is a bad idea not only
>because of the verbosity, but because the verbosity and character set
>problems will prevent the language from being used in other contexts, such
>as in queries from attribute values in XML documents or in query
>languages meant to be typed on a command line or from a programming
>language (like SQL).

Quick reaction: if a separate working group is formed to create a query
language, it should define a set of requirements, outline its scope, and
tackle the problem.  Maybe that's a good idea; I don't know enough about
the big picture to comment.  But in the absence of that, I think it's best
to apply the considerable expertise of the working group (and others) to
come up a good XML syntax.

Scott



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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.