|
Well - at least for the example you've submitted I don't see your squawk:
<div/> is most likely an error, and at best, pointless (<br> works better and is clearer and has no closing '/'). How would XHTML handle this better? One's opinion enters in upon what better means.
<img ...> has no end tag - but this makes sense: one is not supposed to have any content potential between tags of the image type (were they allowed). One sure way of preventing this is to flag the closing tag as invalid.
Now - eliminating the internal closing tag for (i.e., no <img ... /> - I can see a good argument for that as the closing tag is a good flag that this is, indeed, the end, of a self closing element.
Remember . . . above all . . . it's for the internet. Is it really worth being any more rigorous when you consider what will be done with it?
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "As far as we know, our computer has never had an undetected error." - Weisert | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
W∴ Balboos wrote: Remember . . . above all . . . it's for the internet. Is it really worth being any more rigorous when you consider what will be done with it?
Do you really want your pr0n to break in mid-image?
|
|
|
|
|
In addition
The tag <script src="myscript.js" /> also looks pretty valid to me. But it isn't.
You have to write the tag with a seperate closing tag <script src="myscript.js"></script> even if the content is empty...
Consistency is obviously an unknown word in HTML...
|
|
|
|
|
Well, HTML5 != XHTML.
|
|
|
|
|
Is XHTML still a thing?
.-.
|o,o|
,| _\=/_ .-""-.
||/_/_\_\ /[] _ _\
|_/|(_)|\\ _|_o_LII|_
\._. |\_/|"` |_| ==== |_|
|_|_| ||" || ||
|-|-| ||LI o ||
|_|_| ||'----'||
/_/ \_\ /__| |__\
|
|
|
|
|
Lloyd Atkinson wrote: Is XHTML still a thing?
HTML5/CSS3 is the latest and greatest for now.
XHTML is so yesterday.
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|
Lloyd Atkinson wrote: Is XHTML still a thing?
There's an interesting read on wikipedia[^].
The standard known as XHTML5 is currently developed as XML serialization of HTML5 spec
Doesn't look like there's much interest in adopting it though.
Marc
|
|
|
|
|
Now, you have to persuade the DSL to write the HTML for you.
Veni, vidi, vici.
|
|
|
|
|
CPallini wrote: Now, you have to persuade the DSL to write the HTML for you.
I'm well on my way.
Marc
|
|
|
|
|
The ones you mention are just the tip of the iceberg. Unfortunately HTML5 is great for this - since it unifies the browser's error handling. Before HTML5, errors have been handled by all browsers differently.
|
|
|
|
|
Florian Rappl wrote: The ones you mention are just the tip of the iceberg.
So I'm noticing. Well, I'll fix them in the HTML generator as I encounter them.
Marc
|
|
|
|
|
It will be hard to fix them all, as most HTML rules depend on the context. If you think parsing HTML is easy - it is not. There are crazy rules - especially for tables. And don't get even started on foreign elements...
Additionally you just mentioned <img> , but the specification also explicitly provides information on <image> - which is crazy. There is a huge number of other edge cases, but I think the foster parenting + formatting reconstruction are among the hardest.
|
|
|
|
|
Generating HTML is still a lot easier than parsing it.
In theory, a proper HTML5 and/or javascript generator could help us break free of the current web standards, without sacrificing browser or platform compatibility. I've thought about building something like that a few times, and I've got a few ideas how to go about it, but nothing concrete yet. If I find the time I'll make a public workspace for it, and throw my hat in the ring.
|
|
|
|
|
Do it. I support you 100%. I would love to have something more programmy for working with HTML, CSS, and JavaScript. They're ridiculous and the syntax is unnecessarily complicated. *Le Sigh* If only those languages was more like C++ or C# or Java.
|
|
|
|
|
|
I know that this is a really old thread, and it's possible that you may have already finished your DSL , but you should know that you've been reinventing the wheel here.
Try HAML[^] (there are ports for languages[^] other than Ruby too)
There are other similar things out there too, but HAML is by far the most well-known.
|
|
|
|
|
Moshe Katz wrote: I know that this is a really old thread, and it's possible that you may have already finished your DSL , but you should know that you've been reinventing the wheel here.
Except that HAML and others, like Slim, are still implemented in a separate file, just like HTML. What I'm hoping to achieve is a set of re-usable blocks, HTML, CSS, Javascript, etc., that is implemented in code and can be glued together for the desired rendering. HAML isn't really a DSL, it's just a different syntax.
Marc
|
|
|
|
|
Image of the original here[^] (no, I don't work for The Ladders, and they're clearly licensed the image from www.leonardo3.net, but I did get this email from The Ladders.)
I think I'll write my next resume in this style. Here's the translation.
"Most Illustrious Lord, Having now sufficiently considered the specimens of all those who proclaim themselves skilled contrivers of instruments of war, and that the invention and operation of the said instruments are nothing different from those in common use: I shall endeavor, without prejudice to any one else, to explain myself to your Excellency, showing your Lordship my secret, and then offering them to your best pleasure and approbation to work with effect at opportune moments on all those things which, in part, shall be briefly noted below.
I have a sort of extremely light and strong bridges, adapted to be most easily carried, and with them you may pursue, and at any time flee from the enemy; and others, secure and indestructible by fire and battle, easy and convenient to lift and place. Also methods of burning and destroying those of the enemy.
I know how, when a place is besieged, to take the water out of the trenches, and make endless variety of bridges, and covered ways and ladders, and other machines pertaining to such expeditions.
If, by reason of the height of the banks, or the strength of the place and its position, it is impossible, when besieging a place, to avail oneself of the plan of bombardment, I have methods for destroying every rock or other fortress, even if it were founded on a rock, etc.
Again, I have kinds of mortars; most convenient and easy to carry; and with these I can fling small stones almost resembling a storm; and with the smoke of these cause great terror to the enemy, to his great detriment and confusion.
And if the fight should be at sea I have kinds of many machines most efficient for offense and defense; and vessels which will resist the attack of the largest guns and powder and fumes.
I have means by secret and tortuous mines and ways, made without noise, to reach a designated spot, even if it were needed to pass under a trench or a river.
I will make covered chariots, safe and unattackable, which, entering among the enemy with their artillery, there is no body of men so great but they would break them. And behind these, infantry could follow quite unhurt and without any hindrance.
In case of need I will make big guns, mortars, and light ordnance of fine and useful forms, out of the common type.
Where the operation of bombardment might fail, I would contrive catapults, mangonels, trabocchi, and other machines of marvellous efficacy and not in common use. And in short, according to the variety of cases, I can contrive various and endless means of offense and defense.
In times of peace I believe I can give perfect satisfaction and to the equal of any other in architecture and the composition of buildings public and private; and in guiding water from one place to another.
I can carry out sculpture in marble, bronze, or clay, and also I can do in painting whatever may be done, as well as any other, be he who he may.
Again, the bronze horse may be taken in hand, which is to be to the immortal glory and eternal honor of the prince your father of happy memory, and of the illustrious house of Sforza.
And if any of the above-named things seem to anyone to be impossible or not feasible, I am most ready to make the experiment in your park, or in whatever place may please your Excellency - to whom I comment myself with the utmost humility, etc."
|
|
|
|
|
Wow, some good advice for my own motivation letter herein.
~RaGE();
I think words like 'destiny' are a way of trying to find order where none exists. - Christian Graus
Entropy isn't what it used to.
|
|
|
|
|
Reads like a BillWoodruff post.
It was broke, so I fixed it.
|
|
|
|
|
S Houghtelin wrote: Reads like a BillWoodruff post.
Indeed it does!
Marc
|
|
|
|
|
Not so flowery as Leonardo's humble submission, but many moons ago (perhaps another lifetime), I wrote a research proposal on using "Active Nitrogen" as a reagent. The primary references were from Lord Raleigh and I much enjoyed the literary freedom of his time as compared to the dry language requirement of such work in my time.
"There appears to be no advantage in increasing the number of turns to the maximum, and close winding was inconvenient, because the coil showed a tendency to spark over . . ."
One may still maintain scientifically rigor whilst maintaining a personality within one's writings.
"The difference between genius and stupidity is that genius has its limits." - Albert Einstein | "As far as we know, our computer has never had an undetected error." - Weisert | "If you are searching for perfection in others, then you seek disappointment. If you are seek perfection in yourself, then you will find failure." - Balboos HaGadol Mar 2010 |
|
|
|
|
|
W∴ Balboos wrote: One may still maintain scientifically rigor whilst maintaining a personality within one's writings.
My gf is starting here master's degree in psychology and has to write papers in the "APA approved style." While I can appreciate that there is a uniformity to the style, it really seems to squash one's personality, and I find that to be rather sad.
I also find the use of the term "we" (particularly when it's written by one person!!!) to be a joke.
Marc
|
|
|
|
|
Well, in our neck of the woods the term "we" for a single person is reserved for members of the royal family.
Considering the fact that they are a joke anyway your observation is correct.
Mind you, the way they generally behave suggests they may very well be aliens in disguise.
|
|
|
|
|
Marc Clifton wrote: My gf is starting here master's degree in psychology ... "APA approved style." ... it really seems to squash one's personality, and I find that to be rather sad.
It is her chosen profession so let her decide if it "squash one's personality,".
The report of my death was an exaggeration - Mark Twain
Simply Elegant Designs JimmyRopes Designs
I'm on-line therefore I am.
JimmyRopes
|
|
|
|
|