Adding semantic Information to HTML-Elementes

J

Johann Höchtl

Hello!

How can a plug in parse additional information in a web page? For
example there is a telephone number embeded. The Skype plugin tries to
guess, or even better, analyses the received (x)html for

<!-- sphoneid telnr="+15551234456" fileas="John Smith" -->(555) 1234
456<!-- sphoneid -->

This is fine for a single item. How would I annotate compound elements?

Two ideas:

* A CSS-class to parse for
* a custom XML tag (for xhtml)

I do not know wheather the second is actually possible. Can I
intermangle xhtml with another namespace for successfulf rendering in a
browser?

Regards, Johann
 
D

David Dorward

Johann said:
* A CSS-class to parse for

There's no such thing. HTML has classes. CSS can use class selectors to
match them.

See http://microformats.org/ for examples.
* a custom XML tag (for xhtml)

I do not know wheather the second is actually possible. Can I
intermangle xhtml with another namespace for successfulf rendering in a
browser?

Yes, so long as the browser supports XHTML - you can't do it while
conforming to Appendix C. This effectively means you can kiss goodbye to
support from Internet Explorer (at least upto version 7).
 
A

Andy Dingley

How can a plug in parse additional information in a web page?

That would depend on how the addiitional metadata is embedded.
Different ways of embedding make it difficult / impossible / or
usually simply not worth bothering.

Standard ways of embedding: look at RDFa

Things to embed: FOAF, Dublin Core

An interesting metadata extractor: PigggyBank extension for FireFox
 
T

Toby A Inkster

David said:
Yes, so long as the browser supports XHTML - you can't do it while
conforming to Appendix C.

Forget appendix C -- you can't do it while validating to the XHTML DTD at
all. You'd have to write your own DTD to validate against.

--
Toby A Inkster BSc (Hons) ARCS
[Geek of HTML/SQL/Perl/PHP/Python/Apache/Linux]
[OS: Linux 2.6.17.14-mm-desktop-9mdvsmp, up 19 days, 22:14.]

Ham vs Bacon vs Pork
http://tobyinkster.co.uk/blog/2008/01/17/pork-etc/
 
J

Johann Höchtl

Johann said:
Hello!

How can a plug in parse additional information in a web page? For
example there is a telephone number embeded. The Skype plugin tries to
guess, or even better, analyses the received (x)html for

<!-- sphoneid telnr="+15551234456" fileas="John Smith" -->(555) 1234
456<!-- sphoneid -->
Thanks for the replies, especially http://www.microformats.org/ is of
great help.

Regards, Johann
 

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,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top