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 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 |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: 2.6 patterns: let's try variati, Paul Prescod | Thread | Re: 2.6 patterns: let's try variati, Paul Prescod |
Re: 2.6 patterns: let's try variati, Henry S. Thompson | Date | Re: New/old pattern syntax, why can, James Tauber |
Month |