Re: Object and New Insert Code Element

> I've been trying for the longest time to insert code from an external 
> file onto another page for a long time. Using <object> does not work to 
> good. SSI is not supported and I even tried Flash.

You need to be more specific about the problem with object.  If it
is in the implementation, you cannot fix an implemnetation problem
by requiring the implementation of a new feature which may be even
more poorly implemented.

Commercial policies of ISPs with respect to SSI are not necessarily
a valid reason for a change, either, although SSI does have problems
with respect to cachability (some of these can be fixed in the server,
though).

> I say one thing XHTML 2 desperately needs is a new element called 
> insert. We would use it sort of like object except this would be for 
> inserting code, (not images or applications!) from an external file 
> source. This is something myself and many others NEED.
> 

This already exists, for all XML languages, but browsers are not required
to honour it, and as far as I know, none do.  It actually existed in
SGML, and is part of XML.  As part of XML, it becomes part of all XML
based languages.  In the DOCTYPE, you call in entity definition
files, and in the body of the document you use  &NameOfInsertion;.
This is actually the same mechanism as used for named characters, but
the difference there is that the included character definition files
are included by the primary DTD and are known to the browser.  From an
XML or SGML point of view, the fact that such entities expand to single
characters is not special.

> It would be so fun to be able to do this.
> 
> <insert data-"http://domain.com/directory/filename.ext" 
> type-"application/xhtml+xml"/> or

Insertions really need to be of the same type as the base document (although
I suppose that could technically be just XML, so there might be some client
side content negotiation value that is not implied by the entity mechanism.
On the other hand, an inline inclusion is likely to be so fundamental part
of the page that one should have negotiated a different page in the first
place.

> <insert data-"http://domain.com/directory/filename.ext" 
> type-"application/xhtml+xml">Your browser does not support XHTML 2.0. 
> Sorry.</insert>

"Your browser does not support..." messages are very bad practice.  The
fallback mechanism is intended to provide equivalent function, but possibly
with degraded presentation or usability.

Note that include elements are an FAQ, so a search of the archives may
be worthwhile.

Received on Thursday, 10 April 2003 02:05:35 UTC