[
Lists Home |
Date Index |
Thread Index
]
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 {
<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
|