Just Started XSL

B

Bluuuuuue Rajah

I just started reading the XSL chapter in my XML book, and I was struck by
the similarity in the general concept to the old Cobol Report Writer. I
used to criticize Cobol, because it was so much more fashionable to be a
Fortran programmer, but now I'm not so sure.

I sure wish XML had mathematical data types and pixel adressability for
display. I've got some good project ideas, and I can't do them, because
they're scientific programming and display projects. :(
 
L

Lew

Bluuuuuue said:
I sure wish XML had mathematical data types and pixel adressability for
display.  I've got some good project ideas, and I can't do them, because
they're scientific programming and display projects.  :(

The first part of your wish, "mathematical" data types, has been
granted long since.
<http://w3schools.com/schema/schema_dtypes_numeric.asp>

The other part, "pixel addressability", makes no sense whatsoever.
What could such a thing mean in the context of XML?

How exactly do being scientific programming or display projects
interfere with your ability to do them?
 
A

Andy Dingley

I just started reading the XSL chapter in my XML book, and I was struck by
the similarity in the general concept to the old Cobol Report Writer.  

Then you need a better XSLT tutorial.

There are any number of "templating" languages around: simplistic
JSP / classic ASP, Apache Velocity, DSSSL (&deity; preserve us), <*-
language> Report Writer, even the Access report tool. You have a
blank "document" which you can populate with "fields" and "labels"
that are either dynamic or static content, sourced by some predicate
expression. Maybe you get switch statements to control behaviours of
larger sections. The overall structure of the document is pretty
procedural though - "lumps" of content are in sequence, and the output
follows the sequence of the source.

XSLT isn't really one of these though. It _can_ be used in that way,
most commonly it is used that way, but that's not regarded as
particularly good XSLT style or as using XSLT's best features.

XSLT has a powerful pattern matching feature that allows templates to
be applied to describable pieces of content, but without hard-coding
the sequence in which these are expected to be encountered in the
input document. If your input is a SQL query resultset, then this
ordering is trivial and obvious so you hardly need this feature. If
your input is any arbitrary tree-structured XML (the market that XSLT
addresses) then you need something smarter than a traditional report
writer.

If you write "old school" XSLT in a purely procedural style, you're
missing out. In particular, you'll write XSLT that works, but it only
works for a narrower range of inputs than it needs to. This makes your
final product less robust against change. For more discussion of
this, try searching for "pull and push model" coding styles in XSLT.
 
H

Harlan Messinger

Bluuuuuue said:
I just started reading the XSL chapter in my XML book, and I was struck by
the similarity in the general concept to the old Cobol Report Writer. I
used to criticize Cobol, because it was so much more fashionable to be a
Fortran programmer, but now I'm not so sure.

I sure wish XML had mathematical data types and pixel adressability

XML is a method of storing and transmitting data. What would pixels have
to do with it?
for
display. I've got some good project ideas, and I can't do them, because
they're scientific programming and display projects. :(

Neither XML nor XSL is a programming language. What would you say to
someone who is unhappy that he can't use the copying machine--even
though it has drawers and generates heat--to bake a pizza?
 
A

Andy Dingley

Neither XML nor XSL is a programming language.

Whilst XML is used to represent several programming languages
(including XSLT), I'd agree with you that it isn't itself. However
XSLT certainly is.
What would you say to
someone who is unhappy that he can't use the copying machine--even
though it has drawers and generates heat--to bake a pizza?

"You're not trying hard enough"

Page 42, the Dilbert Cookbook. Alongside how to cook noodles in a
coffee maker.
 
H

Harlan Messinger

Andy said:
Whilst XML is used to represent several programming languages
(including XSLT), I'd agree with you that it isn't itself. However
XSLT certainly is.

Well, for certain values of "programming language". I don't really see
it as one, despite the control structures. Perhaps another way to state
my objection is that XSL is by design a *limited-domain* programming
language, and the corresponding analogy would be to expect to bake a
pizza in a rice steamer.
 
D

David Lamb

Andy said:
If you write "old school" XSLT in a purely procedural style, you're
missing out.

A sad commentary on current practice: I seem to recall a JavaLobby
article recently (say, within 6 mths) where somebody basically said XSLT
is dying out, and good riddance, because it requires people to learn a
"functional" mindset and procedural is all people are willing to use.
 
B

Bluuuuuue Rajah

Well, for certain values of "programming language". I don't really see
it as one, despite the control structures. Perhaps another way to
state my objection is that XSL is by design a *limited-domain*
programming language, and the corresponding analogy would be to expect
to bake a pizza in a rice steamer.

Sure it is. The commands are ELEMENT, ATTLIST, ENTITY, NOTATION and a
couple of more that I don't feel like looking up.
 
B

Bluuuuuue Rajah

The first part of your wish, "mathematical" data types, has been
granted long since.
<http://w3schools.com/schema/schema_dtypes_numeric.asp>

The other part, "pixel addressability", makes no sense whatsoever.
What could such a thing mean in the context of XML?

How exactly do being scientific programming or display projects
interfere with your ability to do them?

Scientific programming is useless without the ability to plot your
output data.
 
L

Lew

Scientific programming is useless without the ability to plot your
output data.

OK. The next question is what that has to do with XML. XML is a data
format.

XSL is a means of transforming XML data from one format to another.
It is not a general-purpose programming environment.

Neither one prevents you from doing scientific programming. Neither
one is intended for programming.

It's like complaining you can't use a rice steamer to bake a pizza.
If you don't like that simile, it's like complaining that you can't
cut wood with a hammer. You can't view a web page with a number 2
pencil, either. You can't breathe 50 feet under water with a
snorkel. I won't hear you if you answer this post through a
megaphone.
 
B

Bluuuuuue Rajah

OK. The next question is what that has to do with XML. XML is a data
format.

And so is a table of numbers, like -8.67382946*10^15, with attached
names of the parameters they describe.
XSL is a means of transforming XML data from one format to another.
It is not a general-purpose programming environment.

A scientific graph *is* a data format, and the whole idea behind XML is
to be a lot more general purpose than what came before.
Neither one prevents you from doing scientific programming. Neither
one is intended for programming.

If XSL isn't pixel addressible, you can't do scientific graphics with
it. Without graphics, scientific programming is a waste of time.
It's like complaining you can't use a rice steamer to bake a pizza.
If you don't like that simile, it's like complaining that you can't
cut wood with a hammer. You can't view a web page with a number 2
pencil, either. You can't breathe 50 feet under water with a
snorkel.

All right. So you admit that XML and XSL are too limited for scientific
programming and data display, even with schemas to represent the
floating point data. A snorkle is insufficient, and I need an aqualung.
You said it, not me.
I won't hear you if you answer this post through a megaphone.

Like I didn't already know. Talking to you is like talking to a wall.
 
B

Bluuuuuue Rajah

You are mistaken. Those are declaration identifiers, of a markup
language (SGML, the Standard Generalized Markup Language, or XML, the
Extensible Markup Language, a subset of SGML, respectively).

<http://en.wikipedia.org/wiki/Markup_language>

And, as I already wrote you via PM, all of this is off-topic here
(where "here" applies to every newsgroup that you cross-posted to; can
you not read NG names?)

If you don't like it, then don't read it.
 
A

Arved Sandstrom

Bluuuuuue said:
Scientific programming is useless without the ability to plot your
output data.

So choose one of the tens of thousands of plotting libraries, in dozens
of different languages, that are available.

_If_ your original data is in XML, you might use XSLT (not XSL) to
transform it some to a more useful form, at which point you'll use an
appropriate programming language to actually do your math or science on
the data, and pass the output to the plotting routines.

AHS
 
L

Lew

Lew wrote in
Bluuuuuue said:
And so is a table of numbers, like -8.67382946*10^15, with attached
names of the parameters they describe.

True, and you can't do scientific programming with that table of numbers,
either, nor is it pixel addressable.

Lew:
Bluuuuuue Rajah:
A scientific graph *is* a data format, and the whole idea behind XML is
to be a lot more general purpose than what came before.

But a scientific graph is not a programming language, and neither is XML.

Lew:
Bluuuuuue Rajah:
If XSL isn't pixel addressible [sic], you can't do scientific graphics with
it. Without graphics, scientific programming is a waste of time.

True. Therefore don't try to do scientific programming with XSL. That isn't
its purpose anyway. You can't complain if something fails to do something
it's not designed to do.

Lew:
Bluuuuuue Rajah:
All right. So you admit that XML and XSL are too limited for scientific
programming and data display, even with schemas to represent the

I never said they were suitable. What I did say, and others have as well, is
that they were never meant to be, so there's no reason to complain about it
either.
floating point data. A snorkle is insufficient, and I need an aqualung.
You said it, not me.

But you keep complaining about it, just as if you thought it was a bad thing
that you can't use a snorkel to do deep diving.

Lew:
Bluuuuuue Rajah:
Like I didn't already know. Talking to you is like talking to a wall.

I'm simply presenting facts. That you don't like the facts is your problem,
not mine.

You should follow Arved Sandstrom's advice:
So choose one of the tens of thousands of plotting libraries,
in dozens of different languages, that are available.

_If_ your original data is in XML, you might use XSLT (not XSL)
to transform it some to a more useful form, at which point you'll
use an appropriate programming language to actually do your math
or science on the data, and pass the output to the plotting routines.

We're trying to help you here.
 
L

Lew

Thomas 'PointedEars' Lahn in
Bluuuuuue said:
If you don't like it, then don't read it.

When you come to a group asking for help, as you did here, it is wise to be
friendly and conform at least minimally to the standards of the group. "When
in Rome..." Otherwise you run a serious risk of being labeled a mere troll
and not getting the help you wish for. Being snarky will not help you.
 
B

Bluuuuuue Rajah

Lew said:
Lew wrote in



True, and you can't do scientific programming with that table of
numbers, either, nor is it pixel addressable.

I'm not going to post a table of made-up, floating-point numbers here,
and it would take only two simple mathematical operations, and one other
floating point number, to make the number I posted into something that
**is** pixel addressable.
Lew:
Bluuuuuue Rajah:
A scientific graph *is* a data format, and the whole idea behind XML
is to be a lot more general purpose than what came before.

But a scientific graph is not a programming language, and neither is
XML.

Lew:
Bluuuuuue Rajah:
If XSL isn't pixel addressible [sic], you can't do scientific
graphics with it. Without graphics, scientific programming is a
waste of time.

True. Therefore don't try to do scientific programming with XSL.
That isn't its purpose anyway. You can't complain if something fails
to do something it's not designed to do.

Now that I'm almost finished reading my XML text, I need to invent a
project that will require three pages (or so) of code, to finish
training myself in the language. My idea was to write a numerical
integrator, matrix invertor and/or a curve plotting routine. XML's
liitations have killed every single one of my ideas, so perhaps you can
see why I'm unhappy with it.
 
B

Bluuuuuue Rajah

So choose one of the tens of thousands of plotting libraries, in
dozens of different languages, that are available.

That won't help me teach myself XML.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top