Forum Moderators: open

Message Too Old, No Replies

Xhtml2.0

Working example...

         

MonkeeSage

9:10 am on Sep 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I just stumbled accross this page...
[w3future.com...]

Yup, that's right, a working XHTML2 page! and it works in IE6 and is served as text/xml! The second blurb tells a bit about it.

View the source and look at how clean the markup is, I'm totally impressed! :)

Jordan

Ps. Mods -- I hope this link is OK, I figured it would be since it is not personal or promotional in nature and displays the first working example (that I've seen, at least) of a new technology.

korkus2000

12:55 pm on Sep 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



That is a cool find.

snookie

12:59 pm on Sep 22, 2003 (gmt 0)

10+ Year Member



works fine in everybodys fav: mozilla...

snookie

1:24 pm on Sep 22, 2003 (gmt 0)

10+ Year Member



<h href="http://*.com/*/*.html">*</h>

whats this? an <h>? looks kinda like <a>.

hmm... I see a problem here. who will use this? no one as it isn't good for SEO.

snookie

1:35 pm on Sep 22, 2003 (gmt 0)

10+ Year Member



oh I see.. apparent most elements can reference other docs via the href attribute...

why would you want to do that?

Rincewind

3:02 pm on Sep 22, 2003 (gmt 0)

10+ Year Member



If all elements can reference other docs via the href, would we be able to do
<img src="...gif" href="http://www..." alt=" ">
Instead of
<a href="http://www..."><img src="...gif" alt=" "></a>
?

eduardo

3:05 pm on Sep 22, 2003 (gmt 0)

10+ Year Member



It seems to work because it has the new elements (of xhtml2) declared within the html. Take a look at the source at the top.

I wonder if it works without them.

snookie

3:21 pm on Sep 22, 2003 (gmt 0)

10+ Year Member



Rince dude,

why would we start using href in a <h> if it doesn't do any favours with Search Engines? And if no one is using href in a <h>, <img> or whatever, why would Search Engines slow their bots/spiders down by incorporating code to parse this info?

snookie

wackybrit

3:54 pm on Sep 22, 2003 (gmt 0)

10+ Year Member



Anyone notice the DOCTYPE is for HTML 4?

MonkeeSage

4:09 pm on Sep 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



snookie:

XHTML2 elements are almost completely different from HTML elements from what I've seen. Don't assume that a similar name means a similar function. The "h" may have nothing to do with headings and may be purely navigational. Or it may be a generic box, like a <div>, which is my guess since those are not 'real' links, they are generated by an xbl binding and a htc behavior for Mozilla and IE respectively.

--------

Rincewind:

I believe there is a totally new image tag, but I'm not 100% sure. The way they are doing it in the page in link is using the <object> element...

<object data="http://.../image.gif">Click here to visit...</object>

(If I'm not mistaken this will also work in the current incarnations of XHTML 1.0 and 1.1).

--------

eduardo:

The DOCTYPE Declaration (DTD) is a standard part of XHTML / XML, they just defined their own, inline, so they could use a few familiar XHTML attributes like "id". There will be an official W3C rec-spec for the DTD set once XHTML2 passes out of draft.

Jordan

MonkeeSage

4:17 pm on Sep 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



HTML 4?

This is what I'm seeing...

<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="xhtml2.css"?>
<!-- no doctype yet, but the id attribute needs to be of type ID,
so the id (#) syntax works in CSS -->
<!DOCTYPE html [
<!ATTLIST section id ID #IMPLIED>
<!ATTLIST h id ID #IMPLIED>
<!ATTLIST div id ID #IMPLIED>
<!ATTLIST nl id ID #IMPLIED>
]>

<?xml version="1.0"?> - XML prologue
<?xml-stylesheet type="text/css" href="xhtml2.css"?> - External CSS (same as XHTML / HTML CSS)
<!DOCTYPE html [...]> - Inline DTD for <html> root element

Jordan

Gusgsm

4:27 pm on Sep 22, 2003 (gmt 0)

10+ Year Member


Just by curiosity,

Why is he including this: <?xml-stylesheet type="text/css" href="xhtml2.css"?> just after the xml declaration? Is that the way to declare a style sheet in xhtml2?

MonkeeSage

4:27 pm on Sep 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



[...]<h> and <section> instead of the <hn>[...]

^ Sorry, I missed that bit earlier...too much looking at the source and not enough reading the page ;p

Jordan

MonkeeSage

4:34 pm on Sep 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Gusgsm:

Yup, it's the way to declare any stylesheet in XML. The type attribute specifies the kind of stylesheet to load; "text/css" is the standard CSS most of us are used to, "text/xsl" (or "text/xml") to load an XSL(T) stylesheet (cf. source of: [w3future.com ]), or an XSL-FO stylesheet.

Jordan

Trisha

6:14 pm on Sep 22, 2003 (gmt 0)

10+ Year Member



It displays ok in IE 5.5, but none of the links work. I'm surprised it even displays ok though, it looks really nice. It's over a year old now and hasn't been updated since then.

Yidaki

6:28 pm on Sep 22, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Tuesday, August 06, 2002
Last Update: 8/11/2002; 20:47:39 PM

Um, do i miss something?

Ryan8720

10:51 pm on Sep 22, 2003 (gmt 0)

10+ Year Member



>If all elements can reference other docs via the href, would we be able to do
<img src="...gif" href="http://www..." alt=" ">
Instead of
<a href="http://www..."><img src="...gif" alt=" "></a>

No, because there is no img tag in XHTML 2.0. You have to use the object tag.

This page should answer many of you guy's questions.
[www-106.ibm.com...]

drbrain

4:45 pm on Sep 23, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Snookie: The h and section elements help out SEO more than hN. For example:

<section>
<h>Widgets</h>
<p>blah blah blah</p>
<section>
<h>Red Widgets</h>
<p>Text about red widgets, prices, etc</p>
</section>
<section>
<h>Blue Widgets</h>
<p>Text about blue widgets, price, etc</p>
</section>
<p>Widget warranty
</section>

The search engine knows for fact that the widgets section contains information about red and blue widgets, and clearly knows which info is about red widgets, and which is about blue widgets. Furthermore, it knows for fact that the widgets warranty applies to both red and blue widgets. Compare to an HTML fragment:

<h1>Widgets</h1>
<p>blah blah
<h2>Blue Widgets</h2>
<p>blah blah blue widgets
<h2>Red Widgets</h2>
<p>Blah blah red widgets
<p>Widgets warranty info

How can a search engine know for fact that the widget warranty info applies to both red and blue widgets? It will have to guess, and with all the implicitness of HTML, it won't be able to guess correctly all the time.

Furthermore, the img element is gone. You embed other content directly into your document:

<p src="holiday.png" type="image/png">
<span src="holiday.gif" type="image/gif">An image of us on holiday.</span>
</p>

So that paragraph gets replaced with holiday.png, or if the UA doesn't support png (or can't load it), holiday.gif, or if the UA doesn't support gif (or can't load it) the text "An image of us on holiday."