Re: Esoteric XHTML question about href
- From: David Dorward <dorward@xxxxxxxxx>
- Date: Tue, 13 Mar 2007 21:34:18 +0000
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
.
- Follow-Ups:
- Re: Esoteric XHTML question about href
- From: Grant Robertson
- Re: Esoteric XHTML question about href
- From: Toby A Inkster
- Re: Esoteric XHTML question about href
- References:
- Esoteric XHTML question about href
- From: Grant Robertson
- Esoteric XHTML question about href
- Prev by Date: Esoteric XHTML question about href
- Next by Date: Re: Esoteric XHTML question about href
- Previous by thread: Esoteric XHTML question about href
- Next by thread: Re: Esoteric XHTML question about href
- Index(es):
Relevant Pages
|