Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Why You Should Use XHTML

michael posted more than 10 years ago | from the life-not-complicated-enough-apparently dept.

Programming 657

Da_Slayer writes "The w3's HTML group has released the 6th public working draft for XHTML 2.0. XHTML 2 is a general-purpose markup language designed for representing documents for a wide range of purposes across the Web. Meaning it is to be used for document structuring which is why it does not have presentation elements. The draft is located at w3's website. Also they have a FAQ about why you should use XHTML over HTML. It goes into specifics about embedding MathML, SVG, etc... and has links to tools and resources to help convert existing html documents to xhtml. One of those resources is a document on XML events and its advantages over the onclick style of event handling."

Sorry! There are no comments related to the filter you selected.

File this in the Irony category (3, Insightful)

Anonymous Coward | more than 10 years ago | (#9781841)

Slashdot isn't even valid regular HTML, let alone XHTML, and they're running a story on why we should be using XHTML? I'd laugh if it weren't so sad.

Re:File this in the Irony category (2, Informative)

smartalecvt (748879) | more than 10 years ago | (#9781981)

There were two good articles on alistapart.com [alistapart.com] about bringing /. up to code.

one [alistapart.com] and two [alistapart.com]

Inertia is an ugly thing.

Re:File this in the Irony category (1)

dustinbarbour (721795) | more than 10 years ago | (#9782237)

So the first article was written back in November of 2003 nd we still don't have an XHTML version of Slashdot? WTF? The work was already done for you!

Re:File this in the Irony category (1)

Saeed al-Sahaf (665390) | more than 10 years ago | (#9781992)

Slashdot isn't even valid regular HTML, let alone XHTML, and they're running a story on...

...blaw, blaw, blaw...

Really, what does the state of Slashcode have to do with running a story on the needs and status of XHTML? Anything at all? Not really.

Re:File this in the Irony category (0)

Anonymous Coward | more than 10 years ago | (#9782033)

They're running a story on why you should use XHTML while completely ignoring the advice themselves. They're supposed to be a site for geeks and tech and everything, but they're using broken code from 1998.

Re:File this in the Irony category (3, Informative)

critter_hunter (568942) | more than 10 years ago | (#9782200)

Rob mentionned in his journal [slashdot.org] not too long ago that he had redesigned his page [cmdrtaco.net] using HTML+CSS and that he would like to someday do the same for Slashdot.

Re:File this in the Irony category (-1, Troll)

Anonymous Coward | more than 10 years ago | (#9782230)

wow -- he sounds pretty behind the times
i'm afraid to look at his site
what does he have, like those marquee tags, maybe even a marquee nested in a blink?

Re:File this in the Irony category (0)

Anonymous Coward | more than 10 years ago | (#9782102)

In Soviet Russia mileage varies YOU!

XHTML and XML?? (3, Funny)

ViolentGreen (704134) | more than 10 years ago | (#9781847)

Can someone please explain the differences between XHTML an XML?

Re:XHTML and XML?? (2, Informative)

Ambrose (16701) | more than 10 years ago | (#9781891)

XHTML is HTML redone in XML. So XHTML is an XML "language", like MathML, SVG, etc.

Re:XHTML and XML?? (1, Informative)

gregarican (694358) | more than 10 years ago | (#9781900)

XML is a data definition language. XHTML is not.

Re:XHTML and XML?? (5, Informative)

typhoonius (611834) | more than 10 years ago | (#9781929)

XML is a metalanguage; that is, it's a mark-up language for writing other mark-up languages. XHTML is one such language. It's basically plain old HTML but with XML's stricter rules. I like it because it discourages sloppy coding (sort of like preferring Java over Perl).

Other XML languages include SVG (for vector graphics), WML (for simple web pages designed for cell phones; never really took off), and RSS (for news feeds).

Re:XHTML and XML?? (3, Informative)

volteface (798935) | more than 10 years ago | (#9781930)

While HTML is an implementation of SGML (Standard Generalized Markup Language), XHTML is an implementation of XML (Extensible Markup Language, which is a subset of SGML used for describing different types data).

Basically as long as HTML follows the syntax structure of SGML correctly it is considered valid, but XHTML must follow the rules of XML correctly in order to be valid.

Re:XHTML and XML?? (4, Interesting)

pete-classic (75983) | more than 10 years ago | (#9782002)

Good answer ;-)

The grandparent might also interested in the following:

XHTML is implemented in XML. So XHTML is to XML as OpenOffice.org's writer format is to XML. (Or as HTML is to SGML, or as this post is to English.)

People often say somthing is XML when it is really implemented in XML. Using that (misleading) terminology XHTML is XML.

-Peter

Re:XHTML and XML?? (0)

Anonymous Coward | more than 10 years ago | (#9781955)

XHTML is a subset of XML, that is, XHTML is HTML with XML's rules. All tags have to be closed, attribute values quoted, those sorts of things...

Re:XHTML and XML?? (5, Informative)

Kentamanos (320208) | more than 10 years ago | (#9781958)

XML is a pretty generic set of format rules. There are LOTS of various formats that are implemented in XML (SVG, XHTML, XSLT for some popular examples).

XHTML applies the rules of XML to HTML. For instance you can have one root node, you have to close all tags, attributes have to have single or double quotes around their values, etc.

Writing something that parses XHTML is a LOT simpler than writing something that parses HTML. It's also easier to confirm you've written it properly (using schemas for instance, which are also written in XML :)).

Are You Reading This, Editors? (-1, Troll)

Anonymous Coward | more than 10 years ago | (#9781850)

Please, for god's sake, clean up your own HTML code!

It is sloppy, ugly, and isn't valid!

Re:Are You Reading This, Editors? (0)

Anonymous Coward | more than 10 years ago | (#9781916)

Haha, like the editors actually read Slashdot anymore.

GNAA Announces Project to Port Slashcode to ASP.NE (-1, Troll)

Anonymous Coward | more than 10 years ago | (#9781852)


GNAA Announces Project to Port Slashcode to ASP.NET

Fremont, California - In a surprise announcement, GNAA has announced a truce and alliance with the popular news for trolls website Slashdot [slashdot.org] .

GNAA member godspeed broke the news at an early-evening press conference, announcing that GNAA would cease trolling the website, and will instead work with the current Slashdot staff on porting the Slashcode to ASP.NET, to be run under IIS.

"We've had our difference with Slashdot in the past," godspeed began, "but with recent slowdowns in performance on the website, they have finally realized that Opensource is indeed dead, and it's time to move on and replace their antiquated codebase with something that will meet the modern day's needs. We're pleased to be given the opportunity to work with the Slashdot staff on making this port. Of course, the new code will not be opensourced, an NDA will be signed in blood by all who see it and if you release it, the penalty... well, you've seen what happened to Nick Berg, Paul Johnson, and the others. Major changes to be implemented include the removal of goatse link evasion, major overhauls to the karma system, and the replacement of pinkpages with LastMeasure [lastmeasure.com] ,"

At this point godspeed turned the podium over to fellow GNAA member goat-see and stormed out of the room. goat-see offered to take any questions the audiencemembers have. When asked why there were no Slashdot representatives at the conference, he was quick to reply "You can speak to CowboyNeal outside after we're through here, we couldn't get that motherfucker in here without widening the doorframes. Next question?," eliciting a hearty chuckle from the audience. When asked the reason for the sudden change in relations with Slashdot, goat-see paused to think for a moment, before answering "Our historical differences were meant to hilight the flaws in the Slashdot system. As soon as the staff realized what an impacted shitpile their site was and the need to update it, we were the first to volunteer to assist in the migration. We look forward to seeing the hight performace of ASP.NET pages with a MS SQL backend as much as any other nigger out there."

bare, a GNAA member sitting in the audience, stood up and confirmed this announcement with a hearty "LOL." goat-see concluded the conference at that point, saying "If you have any further questions, please direct them to new GNAA member Wil Wheaton [mailto] , now let's all go outside and poke that fat fuck CowboyNeal with sticks."


About GNAA:
GNAA (GAY NIGGER ASSOCIATION OF AMERICA) is the first organization which gathers GAY NIGGERS from all over America and abroad for one common goal - being GAY NIGGERS.

Are you GAY [klerck.org] ?
Are you a NIGGER [mugshots.org] ?
Are you a GAY NIGGER [gay-sex-access.com] ?

If you answered "Yes" to all of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!
Join GNAA (GAY NIGGER ASSOCIATION OF AMERICA) today, and enjoy all the benefits of being a full-time GNAA member.
GNAA (GAY NIGGER ASSOCIATION OF AMERICA) is the fastest-growing GAY NIGGER community with THOUSANDS of members all over United States of America and the World! You, too, can be a part of GNAA if you join today!

Why not? It's quick and easy - only 3 simple steps!
  • First, you have to obtain a copy of GAYNIGGERS FROM OUTER SPACE THE MOVIE [imdb.com] and watch it. You can download the movie [idge.net] (~130mb) using BitTorrent.
  • Second, you need to succeed in posting a GNAA First Post [wikipedia.org] on slashdot.org [slashdot.org] , a popular "news for trolls" website.
  • Third, you need to join the official GNAA irc channel #GNAA on irc.gnaa.us, and apply for membership.
Talk to one of the ops or any of the other members in the channel to sign up today! Upon submitting your application, you will be required to submit links to your successful First Post, and you will be tested on your knowledge of GAYNIGGERS FROM OUTER SPACE.

If you are having trouble locating #GNAA, the official GAY NIGGER ASSOCIATION OF AMERICA irc channel, you might be on a wrong irc network. The correct network is NiggerNET, and you can connect to irc.gnaa.us as our official server. Follow this link [irc] if you are using an irc client such as mIRC.
clicking here.

Re:GNAA Announces Project to Port Slashcode to ASP (-1, Troll)

Anonymous Coward | more than 10 years ago | (#9781886)

STFU and die.

fp (-1, Troll)

Anonymous Coward | more than 10 years ago | (#9781853)

FP

First P (-1, Troll)

Anonymous Coward | more than 10 years ago | (#9781856)

Post First

XHTML approval (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#9781857)

ALL YOUR XML ARE BELONG TO ME

You have to wonder... (4, Interesting)

Dozix007 (690662) | more than 10 years ago | (#9781858)

You have to wonder if Microsoft will be implimenting this new standard in IE. I have done some webdevelopment and have really noticed that they rarely impliment any of the standards in there browser. Not to mention that they are on the board that approves these standards :P

Re:You have to wonder... (1)

yummy1991 (546737) | more than 10 years ago | (#9782222)

They really rarely ever implement ANYTHING in their browser.

Re:You have to wonder... (1)

CaptainJeff (731782) | more than 10 years ago | (#9782241)

Well, they already support XHTML 1.1, which was current when the latest version of IE hit the street...so, my money is on yes.

on slashdot? (4, Insightful)

einstein (10761) | more than 10 years ago | (#9781870)

anyone else amused that this article was posted on slashdot? a site who's HTML is so bad they've blocked validator? I'm amused.

Re:on slashdot? (5, Insightful)

LincolnQ (648660) | more than 10 years ago | (#9781960)

Yes. It is starting to really bug me. They could save a lot of bandwidth [alistapart.com] and make their page far more viewable with stylesheets if they moved the code into proper CSS and XHTML.

Grr.

Re:on slashdot? (5, Informative)

MP3Chuck (652277) | more than 10 years ago | (#9782067)

You weren't kidding when you said "a lot" ... damn!

For those who didn't RTFA the parent post had, it restructures /. with XHTML and CSS. Bottom line:
* Savings per day without caching the CSS files: ~3.15 GB bandwidth
* Savings per day with caching the CSS files: ~14 GB bandwidth

And the traffic figure they used was from June 2000. Do the math.

Re:on slashdot? (1, Informative)

Anonymous Coward | more than 10 years ago | (#9782103)

Not to mention additional savings they could accomplish by using properly compressed PNG files. Also, valid HTML/XHTML tends to compress better (and they do use mod_gzip).

The CmdrTaco Response (0, Flamebait)

goldspider (445116) | more than 10 years ago | (#9782125)

I'm always abused by the standard CmdrTaco response to calls to improve the Slashcode:

"Feel free to submit patches back to us if you come up with anything useful."

In other words:

"This clusterfuck is roping us a comfortable enough income from ad revenue that it's not worth our time to deliver a better product to you, our customers. If you want a better site, YOU do the work!"

Re:The CmdrTaco Response (1)

ceswiedler (165311) | more than 10 years ago | (#9782255)

Do you really care whether Slashdot is implemented with CSS? The savings mentioned would be for OSDN, Slashdot's parent. Apparently they don't care enough about the potential savings to make the change, and while that may be a bad business decision, unless you're an investor in OSDN I really don't see why you should care.

It isn't like a puppy is killed every time a GB of OSDN bandwidth is wasted.

Re:on slashdot? (1, Insightful)

Anonymous Coward | more than 10 years ago | (#9782126)

It's supposed to be "cool" the way they do that. You know, dumb jokes about the spelling and grammar on the site, repeat stories, etc. -- that's how you know they aren't "mainstream".

PLUS (1)

PhysicsGenius (565228) | more than 10 years ago | (#9782172)

All this talk about embedding MathML is useless unless sites people actually post on (90% of which are based on slashcode or scoop) serve XML, which none of them do.

Re:on slashdot? (1)

Matt Perry (793115) | more than 10 years ago | (#9782263)

It's already been done [alistapart.com] . The Slashdot admins should just ask if they can use the code

Funny quote (5, Informative)

slashdevslashtty (712925) | more than 10 years ago | (#9781871)

Which browsers accept the media type application/xhtml+xml? Browsers known to us include all Mozilla-based browsers, such as Mozilla, Netscape 5 and higher, Galeon and Firefox, as well as Opera, Amaya, Camino, Chimera, DocZilla, iCab, Safari, and all browsers on mobile phones that accept WAP2. In fact, any modern browser. Most accept XHTML documents as application/xml as well. See the XHTML Media-type test for details. Does Microsoft Internet Explorer accept the media type application/xhtml+xml? No.

A model XHTML site check by the W3C (-1, Troll)

LittleLebowskiUrbanA (619114) | more than 10 years ago | (#9781873)

Re:A model XHTML site check by the W3C (-1, Troll)

LittleLebowskiUrbanA (619114) | more than 10 years ago | (#9781903)

Dumbass mods. It is checked by the W3C and certified. Not a troll.

Re:A model XHTML site check by the W3C (0)

Anonymous Coward | more than 10 years ago | (#9781954)

I wouldn't cry fowl about being modded as a troll when you post offensive web pages and say "see how W3C clean it is?"

Re:A model XHTML site check by the W3C (0)

Anonymous Coward | more than 10 years ago | (#9782017)

Offensive? I (and the First Amendment) call that free political speech. It's no secret that moderators' respect for free speech rights ends at valid dissent.

Because HTML is ancient... (2, Funny)

gnuman99 (746007) | more than 10 years ago | (#9781882)

Maybe we should use XHTML because HTML is ancient and broken? Furtheremore, CSS must be pushed to replace most of the format specifications. XHTML+CSS actually simplify the rules by which browsers format text.

No, XHMTL is broken (3, Interesting)

AuMatar (183847) | more than 10 years ago | (#9782037)

You forget the original purpose of HTML. HTML's purpose, and the reason it grew so quikly, was to be an easily understood markup language that could be used by less technical people. The reason so many people were able to make their own homepages and grow the web like they did was that HTML could be easily learned.

Now we have XHTML and CSS. Neither of these are easy to learn. Neither of them is easy to use. Less technical people are incapable of using either. This is great for job security for webmasters, but for the growtrh of the next and for the internet as a medium of free and easy communication its horrible. XHTML is broken as an HTML replacesment because it does not meet the original purpose of HTML- to be something that anyone can easily learn and use.

Re:No, XHMTL is broken (0)

Anonymous Coward | more than 10 years ago | (#9782082)

How is XHTML hard to learn? XHTML 1 isn't really much different from valid HTML 4.01.

Re:No, XHMTL is broken (2, Informative)

AuMatar (183847) | more than 10 years ago | (#9782176)

For me, you, or anyone reading slashdot, it probably isn't. Remember, this is the average Joe we're talking about. Ok, perhaps the slightly above average. The XHTML spec is far more complicated than HTML was. CSS and stylesheets is something they just don't understand, they don't get the idea of separating content from presentation (in fact to many of them, the two are equivalent), and they don't understand the idea of abstraction that they represent.

HTML 4 was worse for the average guy than previous incarnations, but XHTML is terrible for them.

Re:No, XHMTL is broken (0)

Anonymous Coward | more than 10 years ago | (#9782212)

I still don't see that. The major changes invovle end certain tags with a / (br, img, etc) and using lowercase tags. Using CSS is still optional.

Re:Because HTML is ancient... (0)

Anonymous Coward | more than 10 years ago | (#9782041)

Yet the most fundamental promise of the web, conveying ideas and information, can be done quite effectively in HTML versions 3 and 4. The only thing even mildly intriguing about the new technologies is MathML, since plopping in pngs of latex equations is a pain in the ass.

I'm not going to learn some johny-come-lately technology just because a bunch of computer gurus find it more ascetically pleasing and logically consistent. I have better things to do with my time (wisecrack about posting on slashdot here).

Before you go harping about the magical world of people browsing on PDAs and 12x4 character resolution cellphones, its again something I simply don't care about. If it works under lynx, then its handicapped-friendly enough for me (cellphone browsers being nothing more than crippled cousins of real browsers).

Is this really going to happen? (4, Interesting)

Defiler (1693) | more than 10 years ago | (#9781888)

I've been using XHTML for some time, but only in the modes that safely fall back to HTML for browsers that don't "speak" XHTML.
I have to wonder if 2.0 is going to catch on. Internet Explorer isn't likely to support it any time soon, and nobody wants to code two versions of every web application.
Still, good FAQ on that site. I learned some details that had been hazy.

W3C useless (1, Insightful)

Anonymous Coward | more than 10 years ago | (#9781894)

lately the W3C is useless and isn't able to produce anything useful. Schema is still horribly limited and doesn't really fit the needs of OOP. Schema should allow a complex type to extend or implement an external class/interface. It can be optional and not required. The current schema sucks. I won't bother with the other specs. Many of them are just as bad, or the specs are so poorly written it's a bitch to understand. XSLT/XPath is a good example of really poorly written specs.

Re:W3C useless (2, Insightful)

rwiseman63 (648243) | more than 10 years ago | (#9782114)

I agree that most W3C specs are horribly written, but your comment that Schema doesn't fit the needs of OOP is just stupid. First of all, XML is not Object-Oriented, so there is no need for an XML validation language (i.e. Schema) to include built-in OO capabilities. On the other hand, XML could be used to implement an Object-Oriented language, and I am 100% sure that you could write a Schema to validate this language.

Mozilla composer (3, Insightful)

Danathar (267989) | more than 10 years ago | (#9781901)

It would be nice if Mozilla composer could save in XHTML....I'd gladly use it if more editors would save in XHTML format.

Re:Mozilla composer (0)

Anonymous Coward | more than 10 years ago | (#9781947)

vim supports xhtml just fine ;)

/. should lead the way (5, Interesting)

pohl (872) | more than 10 years ago | (#9781904)

With all the time we spend hearing about alternatives to IE around here, you would think that slashdot would be compliant to at least some W3C standard. If /. were some tiny hobby weblog this would be forgivable, but /. could use the size of it's audience to actually lead. Why not do it?

Re:/. should lead the way (2, Informative)

CHaN_316 (696929) | more than 10 years ago | (#9782153)

There was an article on slashdot a while ago about retooling slashdot with XHTML [slashdot.org] . A pretty good read that summarizes the benefits of XHTML/CSS. The cost savings pretty interesting too:


*Savings per day without caching the CSS files: ~3.15 GB bandwidth
* Savings per day with caching the CSS files: ~14 GB bandwidth

Most Slashdot visitors would have the CSS file cached, so we could ballpark the daily savings at ~10 GB bandwidth. A high volume of bandwidth from an ISP could be anywhere from $1 - $5 cost per GB of transfer, but let's calculate it at $1 per GB for an entire year. For this example, the total yearly savings for Slashdot would be: $3,650 USD!

Re:/. should lead the way (1)

Bob The Cowboy (308954) | more than 10 years ago | (#9782205)

not to sound like an /. fanboy, but I think its safe to say that at least part of the problem is that /. isn't some tiny hobby weblog. We're not talking an index page with a few intersite links. You've got an entire Website programmed in perl with probably close to a million regular visitors. The vocal majority of which will criticize nearly anything put in front of them. Slashcode is open source. If converting it is so easy, why hasn't it been done by now? But you've got a 3 digit userID. You should know all that.

If it were me, I'd either do it quietly with no announcments til the day I planned on releasing it, or just not do it at all, and enjoy my evenings knowing that even if I were trying, I'd still get flamed for some little mistake.

Bill

Why You Should Use XHTML 2.0 ???? (4, Informative)

stonebeat.org (562495) | more than 10 years ago | (#9781910)

XHTML 2.0 almost forces you to seperate "content" from "presentation". Which is a good thing.

Something better would be to use pure XML for creating content and then let the browser apply a CSS to present the content.
See Mozilla + CSS + XML = Structured + Formatted Content [xml-dev.com] for more info.

Re:Why You Should Use XHTML 2.0 ???? (3, Interesting)

JimDabell (42870) | more than 10 years ago | (#9782020)

Something better would be to use pure XML for creating content and then let the browser apply a CSS to present the content.

No, that would be very much worse. The whole point of a publically specified XML application like XHTML is that everybody understand what the element types mean. If you go around inventing your own element types, nobody will no what you mean. Google understands <h1> as being more important than normal text. It won't understand <my-fancy-heading> in the same way.

Re:Why You Should Use XHTML 2.0 ???? (1)

AuMatar (183847) | more than 10 years ago | (#9782060)

Its a good thing for giant websites and businesses. Its needlessly complex for small websites. And its something that non-technical people won't understand at all. As I posted in another thread- the point of HTML was to be an easy to use markup language for the masses, so anyone could make a webpage. XHTML is beyond most non-programmer's capabilities.

So Slow ... (2, Interesting)

johnhennessy (94737) | more than 10 years ago | (#9781917)

(Before I'm completely slaughtered for complaining about performance, a disclaimer: I haven't done strict benchmarks)

Is it my imagination or are XSLT transforms very slow. I know this will depend on what engine you use to transform, but during the course of designing a website for a friend I tried several Java based transforms to go from XML to an XHTML page.

Why are these operations so slow - I thought XML (and therefore XHTML) was supposed to be straight forward and easy to parse.

In my limited experience XHTMLs benefits seem to be "weakened" by parsers/transformers that are still a bit away from maturity (speed-wise).

(Hint: if anyone knows a lean, mean transformer nows the time...)

XML on web sites sucks (3, Informative)

laird (2705) | more than 10 years ago | (#9782028)

Nope, you're right.

I'll go out on a limb and say that using XML as the document format for web site production is a terrible idea. XML is a great data exchange language between systems, but it's insanely inefficient for use within a single system. All of XML's positive attributes (self documenting, robust, extensible, supports encodings, validation, use XSLT to do transforms between arbitrary XML representations of data, etc.) are all important between loosely coupled systems. But those issues don't occur within a single system, and the overhead of using XML is immense. It's orders of magnitude faster to query a datbase directly than to parse XML, transform, etc.

Re:XML on web sites sucks (4, Insightful)

Kentamanos (320208) | more than 10 years ago | (#9782070)

You guys are both essentially complaining about the speed of XSLT transforms. While XHTML makes "HTML" a valid XSLT target target document (in other words, it makes HTML XML compliant), nobody is forcing you to use XSLT.

XHTML is still completely valid on its own. It's a HELL of a lot easier to validate for one thing. Ever looked at the sourcecode to HTML validators?

Re:XML on web sites sucks (1)

duffbeer703 (177751) | more than 10 years ago | (#9782182)

As the other poster said, your complaint mostly applies to the XSLT transform engines.

But keep in mind that the industry heavyweights who back these standards are all in the business of selling you hardware.

IBM, Sun, etc see a slow app as an opportunity to sell computers. If you can lower the cost to produce applications significantly by using XML, you can afford to buy more computers from IBM, HP, Dell, Sunc, etc.

Re:So Slow ... (0)

Anonymous Coward | more than 10 years ago | (#9782038)

I think you know this, but just in case:

You don't HAVE to use XSLT to to do XHTML.

You could parse the XML yourself (or start with it straight from the data layer as non XML) and generate the XML yourself.

Re:So Slow ... (1)

Zaiff Urgulbunger (591514) | more than 10 years ago | (#9782141)

MSXML is fast!

If that isn't suitable for religious, other reasons, then I believe that Saxon is now fairly fast provided you can keep it in memory; being Java based, start up times can be a bit pants.

Beyond that, you might need to take care with how you write you XSL as this can impact performance, and also your XSLT transformer might provide a way to store "compiled" XSLT's (MSXML does).

I dont know... (2, Interesting)

boomgopher (627124) | more than 10 years ago | (#9781925)

I dif XML and all, but things like replacing <img> tags with stuff like:

<p src="map.png"><span src="map.gif">Exit from station...</span></p>

seems a bit too... anal? or purist/academic at best.

I suppose it's a moot point if MS/Macromedia/Adobe comes out with a great XHTML2.0 WYSIWYG editor, then 95% of the developers out there wouldn't even care...

Re:I dont know... (1)

slungsolow (722380) | more than 10 years ago | (#9781952)

It would be nice to be able to throw in some formated alternate text that isn't limited in length. Accessibility standards are a pain in the ass now a days, so the more you can add to an image the better.

IMG is valid in XHTML (1)

TrentL (761772) | more than 10 years ago | (#9782045)

The IMG tag is perfectly acceptable [w3schools.com] in XHTML.

Re:IMG is valid in XHTML (1)

slungsolow (722380) | more than 10 years ago | (#9782117)

The new spec gets rid of the img tag in all doc types except for transitional.

Re:I dont know... (2, Insightful)

renderhead (206057) | more than 10 years ago | (#9782239)

This is only a problem for pre-existing code and for people who already know HTML. If I were teaching a brand new user to write markup, this method makes just as much sense as the img tag, if not more.

I've given people introductory "crash courses" in HTML before, and they often go something like this: "A tag is used to format content. Except for the img tag. That one IS content. And you should always close your tags. Except the img tag. It stands alone because it's an object not a formatting tag."

Not terribly confusing, but it is inconsistent that tags in HTML represent formatting in some cases and content in others. This new method makes more sense to me, especially coming from a CSS-heavy background.

Re:I dont know... (1)

JimDabell (42870) | more than 10 years ago | (#9782251)

The examples you gave are not equivalent. The equivalent of:
<img src="foo.png" alt="foo" />
...is:
<p src="foo.png">foo</p>

The complicated example you gave is merely an example of how you can provide multiple fallbacks.

Standards work now (2, Insightful)

cubicledrone (681598) | more than 10 years ago | (#9781935)

The reason most HTML is not valid is because browsers have generally not supported CSS completely, which makes it necessary to replace DIVs with tables, add huge browser functions to Javascripts, etc.

Now, Safari, Mozilla and Opera support about 98% of CSS-1 and parts of CSS-2, so it becomes possible to actually develop a working web site without spending 10 hours of testing and debugging (yes, debugging HTML) for every one hour of actual development.

Re:Standards work now (1)

arkanes (521690) | more than 10 years ago | (#9782198)

It'd help if the CSS box model wasn't almost totally useless and broken, too. To say nothing of it's support on browsers (ie, minimal and varying between implementations), which makes it even more useless in reality than it is in theory.

Ah yes, SVG and MathML. (0)

Anonymous Coward | more than 10 years ago | (#9781940)

Do ANY web browsers support those out of the box yet?

It's always the way. (5, Informative)

caluml (551744) | more than 10 years ago | (#9781969)

From the FAQ:
Which browsers accept the media type application/xhtml+xml?

Browsers known to us include all Mozilla-based browsers, such as Mozilla, Netscape 5 and higher, Galeon and Firefox, as well as Opera, Amaya, Camino, Chimera, DocZilla, iCab, Safari, and all browsers on mobile phones that accept WAP2. In fact, any modern browser. Most accept XHTML documents as application/xml as well. See the XHTML Media-type test for details.

Does Microsoft Internet Explorer accept the media type application/xhtml+xml?

No. However, there is a trick that allows you to serve XHTML1.0 documents to Internet Explorer as application/xml.

Include at the top of your document the line in bold here:

<?xml version="1.0" encoding="iso-8859-1"?>
<?xml-stylesheet type="text/xsl" href="copy.xsl"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transition al.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>

where copy.xsl is a file that contains the following:

<stylesheet version="1.0"
xmlns="http://www.w3.org/1999/XSL/Transform">
&am p;n bsp; <template match="/">
<copy-of select="."/>
</template>
</stylesheet>

Note that this file must be on the same site as the document referring to it.

Ugh (2, Insightful)

jandrese (485) | more than 10 years ago | (#9781972)

Man, do you remember when writing a webpage by hand was easy? Back in 1996 or so when just about anybody with a text editor and a link to that excellent Netscape HTML manual [netscape.com] could write a decent page without spending hours poring over obtuse documentation [w3.org] ?

Now you have to figure out what Doctype to set, learn CSS, enter some sort of weird workaround for IE, etc... Worse, HTML used to be fairly forgiving for the author so Newbies could get a decent page without spending hours and hours trying to figure out why their page is coming up blank or trying to figure out why the validator is complaining at them. (I really hate when it says stuff like: Illegal use of <B>. And I'm left scratching my head as to why it is illegal.). It's no wonder newbies choose instead to write their webpage in Word and use the horrible "export to HTML" feature.

Re:Ugh (1)

slungsolow (722380) | more than 10 years ago | (#9782018)

XHTML is still pretty easy to remember (and learn). Its the same tags as HTML, except it requires a stricter syntax.

XHTML and CSS could be taught to middle school/junior high students. Its no harder to grasp than BASIC was 15-20 years ago.

Re:Ugh (1)

kfg (145172) | more than 10 years ago | (#9782110)

Its no harder to grasp than BASIC was 15-20 years ago.

The fact that you are equating a markup language with a programing language is part of the problem.

KFG

Re:Ugh (1)

slungsolow (722380) | more than 10 years ago | (#9782140)

I never said that XHTML is the same as BASIC. I only said that its as easy to learn. Don't read into things so much. Things are sometimes more innocent then they look.

Re:Ugh (3, Insightful)

Ambrose (16701) | more than 10 years ago | (#9782055)

It is because HTML is so lax that we have the browser support nightmare we're in today. I would trade making it harder for the average newb to make a web page for consistent (or at least predictable) rendering across browsers.

Not to mention accessibility. The vast majority of sites out there are all but completely useless to the blind, or those who require very large print, or who are browsing on PDAs, cellphones, or other small devices.

The new standards are a Good Thing, and if that means gramma can't hand-code her photo gallery page (and you know, there are a lot of grammas out there that do that know) I'm not going to lose any sleep over it.

Re:Ugh (2, Insightful)

jandrese (485) | more than 10 years ago | (#9782177)

My big point was that the original web standards were pretty egalitarian, with just about anybody with a good (or not so good idea) able to toss up a halfway decent looking page. Nowadays the standards are becoming rather elitist, and unless you're already a master of XML and know the W3C's technical jargon well enough to read their documentation, you stand little chance of just picking up XHTML from reading the documentation.

I know the pages won't be very accessable, but the kind of people who need this are the kind of people for whom accessability is not a huge issue (these people never set ALT tags for instance). Unfortunatly, is is also these people who really made the web explode in the early days by filling the WWW with an enormous assortment of information and services. Nowadays it seems that far fewer people are creating novel services or information stores. Unusual webpages are getting harder and harder to find, and most of the content added is in the form of Blogs, which are annoyingly transitory.

I guess I've ranted enough on this for now.

Re:Ugh (3, Insightful)

JohnnyCannuk (19863) | more than 10 years ago | (#9782088)

Do you remember that web pages in 1996 look like shit?

Do remember that web development these days cannot rely on simple static text?

Do you realize that with HTML/XHTML editing tools around these days, it doesn't matter?

Right tool for the job, my friend. A text editor is for writing static text. HTML/XHTML tools are used for making web pages and interfaces.

Just because there's "doc types and CSS" out there doesn't mean you have to use them - go ahead and write crappy looking pages in notepad, just becasue you can. But if you are going to do proper, standard, stylish web development that is a good experience for the user, you may need to know some of this stuff.

Clearly you aren't a web developer.

Re:Ugh (3, Insightful)

BlaKnail (545030) | more than 10 years ago | (#9782093)

"Worse, HTML used to be fairly forgiving for the author so Newbies could get a decent page without spending hours and hours trying to figure out why their page is coming up blank or trying to figure out why the validator is complaining at them."

HTML being forgiving is a bad thing. Sure, it's easier for the average person to crank out a homepage, but without strict standards, we ended up with a myriad of browser incompatibilities and mountains of sloppy coding that can't be parsed correctly.

XML and XHTML really are a godsend.

Re:Ugh (1)

pjt33 (739471) | more than 10 years ago | (#9782105)

I learnt basic HTML in 1996 from a three-page magazine article, learnt a bit more (tables, lists, etc) from an NCSA tutorial, that's all I use nowadays. I'm not going to bother learning any of these new-fangled standards until the average browser won't support HTML 3.

Re:Ugh (4, Interesting)

Kentamanos (320208) | more than 10 years ago | (#9782121)

I would argue learning XHTML is easier than HTML since the rules are a LOT more straightforward.

XML vs. XHTML vs. HTML (2, Informative)

diagnosis (38691) | more than 10 years ago | (#9781984)

A quick summary of XML, and XHTML vs. HTML:

XHTML is the next iteration of HTML. It is more formal and more strict, and (hopefully) more consistent. From http://www.w3schools.com/xhtml/xhtml_html.asp:

XHTML vs. HTML:
  • XHTML elements must be properly nested
  • XHTML documents must be well-formed
  • Tag names must be in lowercase
  • All XHTML elements must be closed

XML:
XML is not really parallel to XHTML/HTML. It is more useful for defining data containers and storing data. It is another step along the path to separating content from presentation.

From from http://www.ucc.ie/xml/#acro:
"XML is actually a `metalanguage' --a language for describing other languages--which lets you design your own customized markup languages for limitless different types of documents."

---------------------
Dr. Movie Movie: DrMovieMovie.com [drmoviemovie.com]
Tomorrow's media behemoth -- today's independent voice.

Re:XML vs. XHTML vs. HTML (2, Informative)

volteface (798935) | more than 10 years ago | (#9782111)

"XML is not really parallel to XHTML/HTML. It is more useful for defining data containers and storing data."
Not sure this is not entirely true. Technically, a strictly conforming XHTML document is an XML document. If you think of an XHTML document like a hierarchy (which is in fact what it is in the Document Object Model), it becomes clear that a website is made up of data and data containers. This is my interpretation of it at least.

You are right that HTML and XML are really not parallel, though, other than they share the same SGML syntax.

But can it resist commercialization? (4, Insightful)

kindbud (90044) | more than 10 years ago | (#9782016)

Meaning it is to be used for document structuring which is why it does not have presentation elements.

That's what they said about HTML in 1992. Look what happened to it when it got popular: bastardized so badly with presentation elements that it lost almost all of its structuring features. Remember <fig>? It was obsoleted before it even made it out of draft status because commercial browser vendors (*cough* Netscape *cough*) pushed <img align> on everyone instead, because it was quick and easy. That's just one example. Who's to say this new XHTML won't be spoiled the same way? We could say "Use HTML if precise control over layout is needed" but back in the HTML days, we were saying "use PDF if precise control is needed" and we were ignored, and HTML was destroyed so badly that XHTML is now needed to fill the role HTML had to abandon.

What's to prevent lather/rinse/repeat?

Re:But can it resist commercialization? (1)

slungsolow (722380) | more than 10 years ago | (#9782065)

Who's to say this new XHTML won't be spoiled the same way?
The wc3 is completely independent of all browser development (except amaya). Their whole purpose is to create a standard language that isn't special to one browser. Netscape and IE did kind of get out of control for a while with their proprietary tags.

What IE and Netscape did is comparable to a customer telling the 5 star chef what to use as ingredients. Its ass backwards.

What's to prevent lather/rinse/repeat? Nothing. (2, Insightful)

Animats (122034) | more than 10 years ago | (#9782169)

We've now come full circle. First there was SGML, which is a "general purpose markup language for representing documents". Then HTML. Then XML. Now, XHTML, which is a "general purpose markup language for representing documents". What's wrong with this picture.

"Structured documents" for public distribution usually don't work. The problem is that the costs of tagging are incurred by different people than those who benefit from it. Unless you have some enforcement agency that makes people tag their data, it doesn't happen. Even then, the data quality tends to be terrible. The SEC used to require financial statements in a rigid SGML form, in the EX.27 schedule of 10K and 10Q filings. Companies hated that. Not only did they get the numbers wrong, they hated having to express their numbers "uncreatively".

There are ways it might happen. If Google said that "You must tag all "buyable things" in this format, or you don't get into our index", we'd see it happen. That's how a few big retailers forced manufacturers to bar code, two decades ago.

Re:What's to prevent lather/rinse/repeat? Nothing. (1)

slungsolow (722380) | more than 10 years ago | (#9782203)

If Google said that "You must tag all "buyable things" in this format, or you don't get into our index", we'd see it happen.

Putting your documents into well marked-up documents like XML and XHTML actually makes it easier for search engines (and other user agents as it says in the FAQ [w3.org] linked on in the /. article.) to get to your content.

XHTML is great... for me to poop on (-1, Troll)

Anonymous Coward | more than 10 years ago | (#9782080)

Here are its advantages:

1) If you have even the slightest syntax error, your page won't show up at all

2) document.write() wont work. Time to rewrite all those scripts!

3) attributes have to be quoted and in lowercase. Great, more fucking busywork redoing all the attributes on your site. All those uppercase attributes were what was fucking up the web! Everybody was complaining about them non-stop! Thank god XHTML came along and saved us all.

I'm not making any of this up.

XHTML is a joke, invented by the insane to be used by the stupid...

The only format stupider than XHTML is XML itself.

Re:XHTML is great... for me to poop on (-1, Offtopic)

Anonymous Coward | more than 10 years ago | (#9782158)

Easily the most clueless post I have ever read on slashdot...

WYSIWYG Implementation (4, Insightful)

beejay54 (781673) | more than 10 years ago | (#9782100)

I think that so long as the WYSIWYG community keeps implementing these standards into their applications, web developers will follow suit. The latest version of Dreamweaver codes excellent XHTML and almost forces designers/developers to use CSS to incorperate presentation elements out of the box. For those who code 100% manually XHTML is an easy thing to tackle. The big issue it seems is that, like many web developers out there, I am getting quite sick of the frustration in multiple browser support. While it may be the most popular browser, IE is quite possibly one of the worst for supporting standards. I don't mind Microsoft trying to develop their own web standards so long as they are 'implementable' in other browsers/systems, but that never happens.

Most web developers don't need it (4, Insightful)

JimDabell (42870) | more than 10 years ago | (#9782112)

The only version of XHTML that is suitable for transmission as text/html is XHTML 1.0 following Appendix C. XHTML transmitted in this fashion doesn't have any of the benefits of mixed namespaces, stricter parsing, etc.

You get these benefits when you serve XHTML as application/xhtml+xml, and your visitors use browsers that support those features (such visitors are extremely rare - SVG isn't even in main Mozilla builds yet). But many legacy user-agents require text/html. Search engines would probably be the most important ones.

So unless you are willing to set up content-negotiation, sending different document types to different browsers, and unless you have a niche market that use browsers that understand these new features, you really aren't going to get anything from XHTML. Not for a few years, anyway.

extra quotes (2, Funny)

hey (83763) | more than 10 years ago | (#9782179)

Regular HTML:

<img src=logo.gif width=10 height=10>

XHTML:

<img src="logo.gif" width="10" height="10">

I hate those extra quotes. Why is this progress!?

XHTML/CSS is picking up steam... (3, Interesting)

Saeger (456549) | more than 10 years ago | (#9782197)

I've been "coding" to XHTML transitional for a few years now, and have noticed recently that a lot of the sites being created or redesigned now are also opting for it rather than the old HTML401.

There's really not much to it:

  • All tags are lowercase, which is easier to type anyway
  • All attributes have to be "quoted" for sanity
  • All tags have to be terminated, like this lists </li> which makes the browsers job of rendering much easier since it doesn't have to play the guessing game. This is especially handy on lowend devices like PDAs.
  • All the old bandwidth-wasting presentation elements (like <FONT>) are now CSS presentation ATTRIBUTES of any element by using id= class= and style=

Firefox's WebDeveloper extension [mozdev.org] makes XHTML/CSS validation (among other funcs) so easy that there's no excuse to be lazy about it.

--

why you should NOT use XHTML (1)

Phantom of the Opera (1867) | more than 10 years ago | (#9782248)



Why should you not encourage XHTML?
  • Unreadability : XML is
    often touted as a 'human readable' data format.
    Did you ever take a peek at it recently? Its completely cluttered and unreadable.
  • Use of special editors. Writing out XHTML by hand is going to be a pain, even for very simple content. Writers will be forced to use crazy tools just to say 'hello world'.

    Yes, this will allow web designers to handle special cases that rarely come up.

make it strict!!! (1)

eille-la (600064) | more than 10 years ago | (#9782256)

Why the hell should the browsers accept a messed-up page?
Think about a C compiler who could be as error tolerant as a web browser is for the html. This would result as a huge ridiculous lost of performances, pure counter-optimization!

If you are not enough skilled to learn a language as simple as x(html) can be, then use any of the wysiwyg apps out there. This will at least generate valid markup.

Microsoft was usefull to bring personal computers into the home of everybody, but now it is fucking slowing down how the web and the computer technology could evoluate. We already know it, but IE and Frontpage is the worst thing happening these days to the default end users.

XHTML limits functionality (0)

Anonymous Coward | more than 10 years ago | (#9782258)

I remember developing one application in XHTML, only to find that it has no support for the javascript OnLoad page event which completely broke what I was trying to do. I was forced to go back to strict HTML for my application to work. I probably won't be using XHTML until it's compatible with all the DHTML elements I can currently use.
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?