Adding semantic Information to HTML-Elementes
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
Re: Adding semantic Information to HTML-Elementes
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
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
On 18 Jan, 15:53, Johann Höchtl <jane... [at] none.none> 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
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
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
>
> <!-- 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
> 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