Can Either of These be Legal HTML?

  • Thread starter OccasionalFlyer
  • Start date
O

OccasionalFlyer

I'm trying to work with some HTML generated by a Middleware tool and
frankly, both look illegal to me. Assuming (perhaps a dangerous thing
to do) that the tool is creating something valid, what would these two
lines mean?

I know what the "individuals.CS..." is. That's what's called a profile
field by the tool I'm using, and it would resolve to a value a user
typed in previously, if the user has been at this page beforehand.
Otherwise, the value would be empty. It's what's around this field
that I don't get.

<OPTION {Individuals.CS-Appl Academic.Program_1_Nm Default:SELECTED}
VALUE="1">Choose A Program</OPTION>

I can't find any evidnece that you can put a variable in an OPTION
tag, nor that you can surround anything in a form element with {}.

Then there's this one:

<OPTION <pstag:profile default="SELECTED" pmatch="1"
value="Individuals.CS-Appl Academic.Admit_Type" poutput="SELECTED" />
VALUE="1"><Choose Admit Type></OPTION>

This has too many <> pairs I think, and I don't get the ps:tag with
parameters syntax at all. Plus, you can't have two VALUE fields in an
option element.

Do either of these make sense? Thanks.

Ken
 
H

Harlan Messinger

Guy said:
Two bits of good advice:

[1] Don't guess whether your HTML is legal.
Test it. [ http://validator.w3.org/ ]

[2] When asking questions in alt.html, provide a URL
to an entire page, not just a small snippet of HTML.
Why does he need a URL to an entire page to ask if a particular
construction is proper HTML? He isn't asking why his page doesn't work.
He isn't even claiming to have a page.
 
A

Andy Dingley

I'm trying to work with some HTML generated by a Middleware tool

Don't use HTML through middleware. This really is the place where XML
& XHTML start to make sense instead.

Most XML-claiming middleware tools use 3rd party XML tools (DOMs,
parsers) and so they always work with reliably well-formed XML. It
just works - of the things that go wrong, XML encoding isn't one.
(Although

There are almost no middleware tools that use HTML is an SGML-aware
manner. Those that try are almost all handling it as strings, with
code written per-tool, and they're unstable and prone to subtle
errors. It's a snake-pit. When you find a bug, it's just as likely to
be because the low-level SGML encoding has gone weird (as here), as it
is to be a useful or interesting appication-level problem.

Remember that the last (NB _last_) step of a web publishing process
should often be to transform internal XML/XHTML into HTML 4.01 for
best publishing compatibility.

If you _must_ handle HTML internally, it's usually best to do this
Do either of these make sense?

No. They aren't valid HTML, because they're not even well-formed SGML.
Errors at this level are a real pain to work with - you can't run a
sensible parser over the content as it will just reject it, and you
don't want to get involved in regex-level string-snipping to deal with
it yourself (that way lies madness).

It's impossible to comment further without knowing more context, but
this generally makes me abandon that middleware product as being too
broken for worthwhile use.
 
J

Jukka K. Korpela

Scripsit Harlan Messinger:
Why does he need a URL to an entire page to ask if a particular
construction is proper HTML?

People who understand HTML (as well as the ways in which people learn
HTML, or - more often - fail to learn HTML) know the reason(s). People
who don't should just believe what experts say.
 
O

OccasionalFlyer

Scripsit Harlan Messinger:


People who understand HTML (as well as the ways in which people learn
HTML, or - more often - fail to learn HTML) know the reason(s). People
who don't should just believe what experts say.

If I had a working page that existed in some place that you could see
it, I would. I did not want to go into the gory details but here
goes, since you've raised this issue in this way. My university (I am
a programmer on staff, not a student) has purchased a boatload of
PeopleSoft modules. One of them is CRM. CRM has a "Document Designer"
that produces primitive HTML, if you are willing to live with a page
that contains no branding or style of any kind. We are still at the
development stage with this product. I don't even have a "working"
web page for people here to see, as I'm working through other issues
of having this new, humungous product that won't even let you see what
it is doing with form parameters. The only way to add branding, a
stylesheet, etc. to the "page" is to export it and modify it in an
editor outside of CRM. So I exported it and brought it up in Firefox
just to see what it looked like now. I saw really weird junk in the
two fileds I posted HTML for. I knew that whatever was there was
probably not legal, but since I'm much more comfortable in Java (not
JavaScript) than HTML, I wanted to be sure that there wasn't something
I've been unable to find out about the OPTION element or about using
some product-specific tag inside of an HTML element, e.g., ps:tag,
before I rewrite the HTML the way I think it needs to be. If you
really want all the HTML for the page I can provide that, but it won't
be very useful I expect.

Ken
 
J

Jukka K. Korpela

Scripsit OccasionalFlyer:
I saw really weird junk in the two fileds I posted HTML for.

It wasn't HTML. That's one of the reasons why URLs rock.

If you look at a _file_ in a publishing or management system, it may
contain HTML tags, but there is no guarantee that it is even meant to be
HTML. Instead, the system is supposed to generate an HTML document from
it by applying some rules. The result might be invalid or otherwise
wrong or poor, but that's a different issue, and we haven't seen even a
glimpse of it.
 
H

Harlan Messinger

Jukka said:
Scripsit Harlan Messinger:


People who understand HTML (as well as the ways in which people learn
HTML, or - more often - fail to learn HTML) know the reason(s). People
who don't should just believe what experts say.

That makes no sense.
 
H

Harlan Messinger

Guy said:
He needs to show the entire page because the parts he didn't
show can determine whether his HTML is correct. If the
first line is

<!DOCTYPE html PUBLIC "-//IETF//DTD HTML 2.0//EN">

the answer as to what is and isn't valid HTML won't
be the same as it would be if the first line was

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">

If someone asked a question about the legality of a particular play in
football/soccer ("Can the goalie do such-and-such?"), if the answer
depends on the league and/or tournament in which a match is being
played, then an appropriate reply would be, "It depends on the league
and/or tournament". "Post a video of an entire match from beginning to
end" would be a pointless reply.
 
D

dorayme

mbstevens said:
<G> -- Speaking of back-collar dudes,
I believe Sirens was filmed in your back yard.


Has an Australian model in it, Elle Macpherson, she is known here as The
Body. I am not sure she can act?

Please post pictures.

You are, of course, referring to Norman Lindsay, our famous artiste. I
know him best from having read aloud (as many times as I could corner a
child - usually my own - to listen to it,) The Magic Pudding, which he
illustrated:

<http://upload.wikimedia.org/wikipedia/en/f/f9/The_Magic_Pudding.jpg>
 
H

Harlan Messinger

Guy said:
When asking for free help from known experts, refusing to give those
experts what they say they need in order to help you may give you a
sense of self rightiousness, but it won't get you any help.

I didn't say anything about refusing to give "known experts" what they
say they need in order to help. I'm talking about experts (whether
genuine or self-styled) who decide to make innocent people jump through
hoops that are unnecessary to answer their particular question because
it makes them feel important. (Are you saying you ARE the kind of person
who would ask the person with the football question for a video of an
entire match?)

I have no need to read this, and I know perfectly well that when the
question being asked by a user is along the lines of "Why won't my page
work?", it's advisable for the user to give a URL for the page instead
of assuming a priori that the problem lies within one tiny snippet of
code that he chooses to paste into his question. This isn't one of those
cases.
 
J

Jukka K. Korpela

Scripsit Harlan Messinger:
That makes no sense.

Nobody expected you to make any sense of it. After all, you haven't had
anythinh to say on HTML for a long time.
 
H

Harlan Messinger

Jukka said:
Scripsit Harlan Messinger:


Nobody expected you to make any sense of it. After all, you haven't had
anythinh to say on HTML for a long time.

You seem to think that compared with everything else in human knowledge,
HTML is some deep and special mystery that involves its own rituals and
calls for its own kabbalistic treatment, and I guess that makes you feel
special, but, hey, guess what? I do know HTML, not as exhaustively as
you do but pretty darn well, I work with it almost every day regardless
of whether I show it off here, I understand the importance of using it
properly ... and I'm not buying your BS. Your remark makes no more sense
with respect to HTML than it does to any other topic.
 
H

Harlan Messinger

Guy said:
The two statements are equivalent. All you did was reword the first
statement to contain an assertion that you know better than the
person who has the answers what he needs in order to answer. You
may very well be correct, but that doesn't matter because you aren't
the one offering free help, and thus your opinions abot what the
person who is offering the free help needs do not matter.

Uh, yeah, I know that if the answer to a particular question (as in the
case of the OP's question) doesn't depend on knowing the document type,
then I know that a person who offers to answer the question doesn't need
to know the document type in order to answer it. In fact, if *you* think
you needed to know the document type in order to answer his question,
then it follows that you really don't know the correct answer to his
question.
Yes! Assuming that I don't know the answer, that someone who
I know to be an expert does know the answer, that the expert
is willing to answer for free,

ROFL. I'm dying to know what "for free" has to do with what information
is required to answer the question. If someone pays you, you suddenly
need less information in order to come up with the same answer? Remarkable.

It's funny--you're discussing this in terms of such things as "the
information we need" and "a URL" and "for free", which all come out of
guides to asking questions on Usenet that I've read before and which, in
the context in which they're used, make sense. I get the impression
you've read all this too, but missynthesized it, and now you're spitting
out these catchphrases like context-independent incantations, not
noticing that they aren't applicable in the situation to which you're
applying them.

For example, there's the "for free" part. Where "for free" comes into it
is when a person asking a question is well advised to realize that he
can't take getting correct information for granted and has no recourse
if he's dissatisfied with the responses. It probably also means that a
person on the answering side who wants to be a jerk, has the right to be
a jerk and the OP has no recourse in that case. Nevertheless, not
getting paid doesn't mean the jerk isn't a jerk.
 
D

dorayme

Guy Macon said:
that the expert
is willing to answer for free

Those who most use the phrase 'for free' in dispensing their services
are often the ones that exact severe non-monetary payments, sometimes
without good reason, often for the sheer pleasure of bullying, often as
a gauche demonstration of their superiority, and almost always to make
sure they get more than the simple pleasure of helping someone for its
own sake.
 
H

Harlan Messinger

wayne said:
Has it occurred to you that if a person is being paid to do a job, the
onus is on that person to work to arrive at the solution, i.e.
specifically ask/find by other methods the data required for a solution?
Without having the necessary data, one can only guess at a solution.

One giving "free information" should not be subjected to extra work.

One who isn't paid shouldn't be subject to having to give a response at
all. Anyone who gives a response in that situation is volunteering. But
if you "volunteer", but act like a jerk while "volunteering", by
subjecting the *questioner* to unnecessary work because of the sense of
power it gives you, then you're a jerk.

Indeed, if there is extra work performed, it should be the OP, whether
by providing the data or learning HTML and finding his/her own solution.

Wow, even if the work is unnecessary or irrelevant to the question? It
must give you such a great sense of power to coerce people into
pointless exercises to get a question answered. Look, if you don't want
to answer, don't answer.
I personally admire those who spend so much of their time providing help
to others.

Even when they're jerks about it?
By providing them with a url up front, less of their time is
needed trying to get the data needed for a correct answer so they can
help others too with that time.

Only in those cases where the URL is relevant.
 
J

Jukka K. Korpela

Scripsit Sherman Pendley:
The OP asked if this is legal HTML:

<OPTION <pstag:profile default="SELECTED" pmatch="1"
value="Individuals.CS-Appl Academic.Admit_Type" poutput="SELECTED" />
VALUE="1"><Choose Admit Type></OPTION>

How much more information does one need to answer the question?

Quite a lot, really. To begin with, what does "legal HTML" _mean_
(generally or to the OP)? Which jurisdiction shall be applied?
It's not legal HTML, and never has been for *any* HTML DTD.

What do DTDs have to do with legality?

Anyway, the following document was "legal HTML" before HTML 2.0 (before
people even nominally considered DTDs in the HTML context):

<TITLE>DEMO</TITLE>
<PLAINTEXT>
<OPTION <pstag:profile default="SELECTED" pmatch="1"
value="Individuals.CS-Appl Academic.Admit_Type" poutput="SELECTED" />
VALUE="1"><Choose Admit Type></OPTION>

And you can check and see that modern browsers still render it the
intended way.

As so often, the OP's question wasn't the one that needed an answer. We
don't know what the real problem is, but we might get closer if we asked
why he wondered whether something is "legal HTML" when it apparently
isn't HTML at all and isn't meant to be treated as HTML.

And, of course, a URL would have been essential too. In fact, if the OP
had considered providing a URL, he might have found the answer without
posting anything...
 
D

dorayme

wayne said:
One giving "free information" should not be subjected to extra work.
Indeed, if there is extra work performed, it should be the OP, whether
by providing the data or learning HTML and finding his/her own solution.

I personally admire those who spend so much of their time providing help
to others. By providing them with a url up front, less of their time is
needed trying to get the data needed for a correct answer so they can
help others too with that time.

Sunday sermon.

Now and then it is interesting when the helper has to try to imagine the
problem of the helpee, it gives breathing room to get off the rails and
do a bit of exploration. You see, it is even nicer for the helper to get
something more out of the exchange than the satisfaction of helping one
individual. And by having to imagine an interesting problem that might
be meant, rather than a ho hum one on the usual railway track, the
helper now and then turns up something more interesting for more people.

A truly imaginative helpee should therefore be a bit obscure in order to
help the helper help the helpee and at the same time help himself or
herself and others to explore ...

Look, I won't describe this process at length except to say that in the
end it will bring us all together like Bob and Carol and Ted and Alice -
except that the names will be more like Korpela, Bergamot, Stuckle and
Newbury; there they will be, all a huggin' and kissin' and letting all
that angst ebb away...
 
D

dorayme

Guy Macon said:
If I am paying someone, I have paid for the right to tell them
"No, I don't agree that you need the information you say you need"
and still get an answer.

When you say, pay a yearly subscription for help, I doubt if there is
anything in the contract that says or implies this. In fact, I would
have thought it was part of a paid contract that the helpee does not say
stuff like this, any more than he pays for the right to blow raspberries
in the face of the poor helper.

It is a common misconception that money and power sanction one to behave
badly. It allows one to do this, but allow and sanction are different.

If you want free help, you need to give the
helper what he says he needs or do without the help.

It depends. On

1. how strange the stranger helper is.
2. how articulate or competent the helpee is
3. how much the helper himself is prepared to go the extra mile to help
others

On this fine Sunday morning, I say to you, life is more complicated than
you imagine. <g>
 
D

dorayme

Guy Macon said:
That is true in some cases, and in such cases your choice is to
pay the price or do without.

There is, however, another class of cases, where the person who
needs the help only *thinks* he knows better than the person
offering the help what the person offering the help needs to
know. If he is such an expert at knowing what is needed to
arrive at the answer, why doesn't he simply answer it himself?
In this second case, your choice is still the same; pay the
price or do without.

Yes, I know this one but it is not quite right. There is a third choice
and you might understand it by reflecting on the surprisingly optimistic
and uplifting expectations we have of others. It is a difficult idea to
grasp I guess.

Perhaps you might start to see it in dramatic cases: a mate has fallen
to a bullet in a battle, he is suffering badly, he asks for impossible
things from you. You oblige as best as you can, no matter how
unreasonable. There is no money involved.

OK, he is a mate, but even if not and merely 'on the same side', the
same thing goes.

OK, he is not even 'on the same side', still the same thing might go, he
appeals to you as a human being.

Starting to get the idea?

No? The idea is that people do look to others for help without having
special obligations to them.

I expect you will simply dismiss these thoughts as being too dramatic.
Pity, because in these thoughts lies a complication at the heart of
human relations that you are missing.
 

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,733
Messages
2,569,440
Members
44,832
Latest member
GlennSmall

Latest Threads

Top