Reply to Re: Esoteric XHTML question about href

Your name:

Reply:


Posted by David Dorward on 03/13/07 21:34

Grant Robertson wrote:

> I don't know much about XHTML. I am trying to design an XML standard
> where content authors can use HTML or XHTML for the content within an
> element.

That isn't possible - unless the HTML is going to be entered in CDATA
sections or encoding with character references.

> Within the above mentioned XHTML content I want authors to be able to
> insert an href to refer to a graphic without knowing what file type that
> graphic will be.

href="http://www.example.com/foo/someImage"

.... and then the server can deliver up whatever you like.

> I want them to be able to point instead to a separate
> list of alternative files and the first file in the list will be
> displayed if possible. If the browser can't display that first file then
> it will try the next until it finds one it can display.

<object data="foo.gif" type="image/gif">
<object data="foo.jpeg" type="image/jpeg">
<object data="foo.png" type="image/png">
<object data="foo.svg" type="image/svg+xml">
<p>Alternative content.</p>
</object>
</object>
</object>
</object>

.... has been fine since HTML 4.0 ... shame about the browser support though.

> 2)The alternatives aren't listed in the original content. They are
> listed in a separate file that can be modified without changing the
> original content at all.
>
> Can this be done in XHTML at all?

Not with pure HTML.

> Can it be done with no server-side code?

Possibly with some JavaScript voodoo, but I wouldn't like to go down that
route.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация