Adding semantic Information to HTML-Elementes

Adding semantic Information to HTML-Elementes

am 18.01.2008 16:53:41 von JaneDoe

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

(555) 1234
456

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

Re: Adding semantic Information to HTML-Elementes

am 18.01.2008 17:03:00 von Toby A Inkster

Johann Höchtl wrote:

> How can a plug in parse additional information in a web page? For
> example there is a telephone number embeded.

http://www.microformats.org


--
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, 3:16.]

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

Re: Adding semantic Information to HTML-Elementes

am 18.01.2008 17:03:52 von David Dorward

Johann Höchtl wrote:
> * 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).

--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/

Re: Adding semantic Information to HTML-Elementes

am 18.01.2008 18:09:15 von Andy Dingley

On 18 Jan, 15:53, Johann Höchtl wrote:

> 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

Re: Adding semantic Information to HTML-Elementes

am 19.01.2008 12:02:39 von Toby A Inkster

David Dorward wrote:
> Johann Höchtl wrote:
>
>> * a custom XML tag (for xhtml)
>
> 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/

Re: Adding semantic Information to HTML-Elementes

am 20.01.2008 09:38:53 von JaneDoe

Johann Höchtl wrote:
> 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
>
> (555) 1234
> 456
>
Thanks for the replies, especially http://www.microformats.org/ is of
great help.

Regards, Johann
> 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