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 ]

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

The fact that some people do want to describe elements of their data handling using an XML syntax, as far as I know, doesn't prohibit you from doing it in any other way, with the loops and conditions of your favourite programming language. Only problem, of course, is that then you have to do all the work yourself, while standards based syntaxes and processing gives you lots of stuff free.

In fact, XML is NOT used to validate, manipulate and transform other XML documents. As my esteemed colleague Jim Gabriel recently wrote in an article for XML Journal, there IS no such thing as an XML application. That work is done by parsers, XSLT processors and other applications written in languages such as Java, C++, etc. The XML is just used to tell them what to do.

This is way more powerful and maintainable than embedding transformations in code - do you want to be forced to recompile your code and re-release a new application next time either your input or output format changes or your transformation rules change? And the advantage of describing it in XML is that the same set of instructions can be understood regardless of the programming language - try using your little snippet of code below in a C application and see what happens. Embedding this aspect of the work in programming languages means reinventing the same wheel for everybody's favourite language.

The fact that IDEs do not yet adequately support this doesn't make it a bad idea, it just means the IDEs need a bit more time to catch up. Perhaps you could develop and release your own?

John Anderson
CTO Barbadosoft
The XML Management Company
+31 (0)20 750 7582 / +31 (0)6 65 347 448 / www.barbadosoft.com

-----Original Message-----
From: Niels Peter Strandberg [mailto:nielspeter@npstrandberg.com]
Sent: 02 March 2002 16:23
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?

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.

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

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 {
{ [select="title"] }
{ [select="chapter"] }
{ [select="appendix"] }
} // stylesheet

I use Apples Project Builder, and the indenting works perfectly, for the
code above!

Niels Peter

The xml-dev list is sponsored by XML.org <http://www.xml.org>, an
initiative of OASIS <http://www.oasis-open.org>

The list archives are at http://lists.xml.org/archives/xml-dev/

To subscribe or unsubscribe from this list use the subscription
manager: <http://lists.xml.org/ob/adm.pl>

The information transmitted by this e-mail message is intended solely for the use of the person to whom or entity to which it is addressed. The message may contain information that is privileged and confidential.  Disclosure, dissemination, distribution, review, retransmission to, other use of or taking any action in reliance upon this information by anyone other than the intended recipient is prohibited. If you are not the intended recipient, please do not disseminate, distribute or copy this communication, by e-mail or otherwise. Instead, please notify us immediately by return e-mail (including the original message with your reply) and then delete and discard all copies of the message.

Although we have taken precautions to minimize the risk of transmitting viruses we nevertheless advise you to carry out your own virus checks on any attachment to this message. We accept no liability for any loss or damage caused by viruses.


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

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