W3C home > Mailing lists > Public > www-html@w3.org > March 2007

RE: Control Text-file Embedding in HTML-docs

From: sunil vanmullem <sunil.vanmullem@btopenworld.com>
Date: Sat, 31 Mar 2007 01:29:28 +0100
To: "'Due Per-VCW437'" <Per.Due@motorola.com>, 'Asbjørn Ulsberg' <asbjorn@ulsberg.no>, <www-html@w3.org>
Message-ID: <001701c7732b$a51010f0$0200a8c0@xppropc11>

And there was a long discussion about this on www-talk under the title of 
"(MOB)HTML - Merge on browser HTML (was SDPML)". 

That wasn’t strictly related to the development of HTML, rather a way of
using Ajax 
and scripting to reuse document structure and static content in HTML pages,
reducing the 
amount of data returned per request and bring incremental efficiencies
caching the reused document structure and static content in much the way
that images, 
scripting and Stylesheets are.

While that project is band-aid to cover the problem - I would be interested
a standardised way of inlining along the lines of

	<div src="foo.html"/> would pull in the HTML "fragment" from
	<p src="foo.html#bar"/> could pull in the named "element" from
	<p src="foo.xml#bar"/> could pull in the named "element" from
	<div action="iterate" src="foo.html#bar"> could iterate on the named
"element" bar from foo.html	
	<div action="if;eq"  src="foo.html#bar"> would process the div only
if named "element" bar from foo.html exists

NB Per, your email is bouncing saying that you no longer work at your
employer - do you have an 
alternative contact?

I'm a certified TOGAF8 practitioner!
abnegate justify flush - 

-----Original Message-----
From: www-html-request@w3.org [mailto:www-html-request@w3.org] On Behalf Of
sunil vanmullem
Sent: 31 March 2007 00:22
To: 'Due Per-VCW437'; 'Asbjørn Ulsberg'; www-html@w3.org
Subject: RE: Control Text-file Embedding in HTML-docs

Hi Per, I have a cross browser solution using Ajax that works today 
That supports reuse of HTML coding between different pages. Current 
Version, which is pre-release, is that it isnt search engine friendly, 
and wouldn't meet some accessibility criteria but its something that 
Is being worked for the next major version.

I've taken a slightly different approach to the one you describe 
but am willing to work with you to adapt/extend/develop 
as necessary.

Have a look at http://sdpml.mozdev.org/



-----Original Message-----
From: www-html-request@w3.org [mailto:www-html-request@w3.org] On Behalf Of
Due Per-VCW437
Sent: 28 March 2007 22:24
To: Asbjørn Ulsberg; www-html@w3.org
Subject: RE: Control Text-file Embedding in HTML-docs

Thanks for response.

The reason to have the TXT-files is reuse and "update-in-one-place" only.

If the same piece of text must be used in multiple HTML-documents it is  
nice to edit and maintain it in one place.
This ensures that the changes take effect everywhere the TXT-file is used.

If the text is embedded in HTML-documents it must be edited in multiple  
HTML-files when changes are needed.

I tried this:


<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html>
<head> </head> <body> This is <object data="file:///D:/HtmlTest/File1.txt">
a test. This is a
<object data="file:///D:/HtmlTest/File2.txt">
<object data="file:///D:/HtmlTest/File3.txt" height="50%" width="50%">
</object> is a test <br> This <IFRAME src="file:///D:/HtmlTest/File1.txt">
<IFRAME src="file:///D:/HtmlTest/File2.txt">
a test
This is a
<IFRAME src="file:///D:/HtmlTest/File3.txt" height="50%" width="50%">
</IFRAME> test <br>

<TEXTAREA name="thetext" rows="20" cols="80">
First line of initial text.
Second line of initial text.



For TEXTAREA it doesn't seem to be possible to refer to an external file.

Both IFRAME and OBJECT causes text to be places in boxes in the HTML  
document for browsers:

Mozilla, Opera, Microsoft Internet Explorer.

Best Regards,


Per Hygum Due, Software Engineer,

-----Original Message-----
From: Asbjørn Ulsberg [mailto:asbjorn@ulsberg.no]
Sent: 28. marts 2007 18:07
To: Due Per-VCW437; www-html@w3.org
Subject: Re: Control Text-file Embedding in HTML-docs

On Wed, 28 Mar 2007 09:50:54 +0200, Due Per-VCW437 <Per.Due@motorola.com>

> <object data="file:///D:/HtmlTest/File1.txt">
> </object>
> <object data="file:///D:/HtmlTest/File2.txt">
> </object>

Wouldn't it be better to inline the text in a <div> element, like so:

    <div style="width: 10em; overflow: auto">
      Lorem ipsum dolor sit amet, consectetuer adipiscing elit [...]

Alternatively, you could use the <iframe> instead of <object> and  
<textarea> instead of <div>. I'd go with inlining the content instead of  
having it externally, though, since that would make it available for all  
UAs, including Google.

Asbjørn Ulsberg           -=|=-        asbjorn@ulsberg.no
«He's a loathsome offensive brute, yet I can't look away»
Received on Saturday, 31 March 2007 00:28:50 UTC

This archive was generated by hypermail 2.4.0 : Thursday, 30 April 2020 16:21:01 UTC