Thread Links Date Links
Thread Prev Thread Next Thread Index Date Prev Date Next Date Index

Re: CG: Semantics, XML, and XQuery



John F. Sowa wrote:

> ...
>
> Since XSLT is a functional language, I wouldn't use
> a Python-like syntax, but something more like ML
> or Scheme.

...

> The result would be a tree-to-tree transformation
> language that is semantically identical to XSLT,
> but far more compact and readable.


Hmm, I'm in two minds over this. XSLT mixes transformations and
templating - the former could certainly be just as good (if not
considerably better) in something like Scheme, but XSLT's XML syntax
makes XML templating easier.

<xsl:template match="foo">
    <bar/>
</xsl:template>

or

(template (match "foo")
    ("<bar/>"))

The latter is more readable, but the first can be checked for
well-fomredness before the stylesheet is run. Not an easy call.

> I would also recommend a similar "dewebification"
> of RDF and OWL, which have become too bloated and
> verbose because of the attempt to force them into
> XML syntax.


I agree RDF/XML is bloated and verbose, but would suggest that it's
considerably more useful to have a common interchange syntax that is
reasonably familiar to developers and their tools, than to have an
efficient exchange syntax no-one can currently produce or consume.

> Even the human-oriented syntax is far
> more complex than it should be -- mainly because it
> was designed for a one-to-one mapping to XML form.


I'm  not sure that's the case - Turtle [2] (a spec-clean descendant of
N3 [1])  follows the RDF model, not XML. In any case, if both syntaxes
are expressing the data faithfully then there should be a 1-1 mapping.
(IIRC, this isn't quite so because there are valid graphs that can't be
expressed in RDF/XML).

> By the way, if anybody complains that getting rid
> of the dependence on XML would require a separate
> plug-in for each syntax, my response is simple:  the
> time to download and install a plug-in is a one-time
> charge that is far less than the time to download
> every bloated XSLT style sheet (or RDF specification,
> OWL specification, etc., etc.).


Download time isn't really a problem - gzip (immediately available on
most web servers) can drastically reduce bloat, and hardware is
improving all the time. On the other hand, to get a new syntax widely
adopted would require a major feat of social engineering. I think it's
easier just to accept that XML isn't perfect, but at least it's out
there. Which leaves time for more interesting problems above the syntax ;-)

Cheers,
Danny.

[1] http://www.w3.org/DesignIssues/Notation3.html
[2] http://www.ilrt.bris.ac.uk/discovery/2004/01/turtle/

--

Raw
http://dannyayers.com