OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

 


 

   RE: [xml-dev] XML should NOT be a new programming language

[ Lists Home | Date Index | Thread Index ]
  • To: "Niels Peter Strandberg" <nielspeter@npstrandberg.com>,<xml-dev@lists.xml.org>
  • Subject: RE: [xml-dev] XML should NOT be a new programming language
  • From: "Dare Obasanjo" <dareo@microsoft.com>
  • Date: Sat, 2 Mar 2002 11:31:58 -0800
  • Thread-index: AcHB/dODOIvT93SUQHKD3KT8WRIpdQAH8N/Q
  • Thread-topic: [xml-dev] XML should NOT be a new programming language


> -----Original Message-----
> From: Niels Peter Strandberg [mailto:nielspeter@npstrandberg.com] 
> Sent: Saturday, March 02, 2002 7:23 AM
> To: xml-dev@lists.xml.org
> Subject: [xml-dev] XML should NOT be a new programming language
> 
> 
> Why do we use XML to validate, manipulate, transform etc. other XML 
> documents, fragments?

Because learning one set of syntax and [some] semantics is better than
learning umpteen different ones for every little thing one wants to do
with XML. 

> I want to do my work in Java or another language, not a XML 
> "language" 
> like XSLT, XML Schema etc. The XML "languages" contains a lot 
> of noise 
> and duplicated information. Just try build a fairly large XSL 
> stylesheet, an it will fast be hard to read. My favorite IDE do not 
> support manipulating XML documents.

The fact that your favorite IDE does not support manipulating XML
documents is not an indictment of XML based technologies but instead is
an indication that you have made a poor IDE choice if you intend to do
any serious work involving XML. 

> We have Java, C++ etc. We have if-else, while, switch etc. We can do 
> classes, compile ......... We don't we use them??

Nothing stops you or anyone else for that matter from writing classes
for processing XML documents and exposing these APIs independently of
XML based technologies. 

> To me XML should be a part of my chosen programming language. No only 
> files on a network or filesystem.
> 
> I want XML in Java! Why not like this:
> 
> 
> Stylesheet style = {
> 
>          <XSL:STYLESHEET {
>                  [xmlns.xsl = "http://www.w3.org/1999/XSL/Transform";]
>                  [version = "1.0"]
> 
>                  // Book
>                  <XSL:TEMPLATES {
>                          [match = "Book"]
>                          <HTML {
>                                  <HEAD {
>                                          <TITLE {
>                                                  
> name.equals("") ? "Hej, 
> Guest!" : "Hej, " + name +"!";
>                                          }
>                                  }
>                                  <BODY {
>                                          <CENTER {
>                                                  <XSL:TEMPLATES 
> { [select="title"] }
>                                          }
>                                                  <XSL:TEMPLATES 
> { [select="chapter"] }
>                                                  <XSL:TEMPLATES 
> { [select="appendix"] }
>                                  }
>                          }
>                  }
>          }
> } // stylesheet
> 
> 
> I use Apples Project Builder, and the indenting works 
> perfectly, for the 
> code above!
> 
> Niels Peter

So exactly what has the above crufty non-XML syntax bought you exactly
besides syntactic shortcuts that could be gained by using variables or
functions to dynamically build your stylesheets? 

Anyway these ideas are not new and a number of languages such as YATL[0]
and Xduce[1] have been developed with the express purpose of processing
XML in non-XML syntax. I personally do not think that the integration of
XML into programming languages is a good idea since XML technologies are
currently not mature enough to do something as drastic as altering
programming languages to integrate them. Also I've not yet seen a
proposal for an XML integrated language that claims to support all of
what I consider the important aspects of XML (infoset, namespaces, the
DTD related stuff from XML 1.0, out of band info like comments & PIs). 

Quite frankly, almost all the things people claim they need XML
integrated into a programming language for can be handled with a well
designed function library instead of complicating programming languages
with XML-hype-bandwagon-jumping induced cruft and complexity. 

[0] http://citeseer.nj.nec.com/cluet00yatl.html
[1] http://citeseer.nj.nec.com/279930.html 

-- 
THINGS TO DO IF I BECOME AN EVIL OVERLORD #51
If one of my dungeon guards begins expressing concern over the
conditions 
in the beautiful princess' cell, I will immediately transfer him to a
less 
people-oriented position.





 

News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS