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

RE: Control Text-file Embedding in HTML-docs

From: Due Per-VCW437 <Per.Due@motorola.com>
Date: Thu, 29 Mar 2007 13:23:34 +0200
To: "Gareth Hay" <gazhay@gmail.com>
Cc: Asbjørn Ulsberg <asbjorn@ulsberg.no>, www-html@w3.org
Message-ID: <EAAB8BFF1D052A44830B467F3E9FB6B7026FDCFF@zuk35exm64.ds.mot.com>




Hi,


Some cases:


Case 1: A HTML-file embedding 5 pictures.
-----------------------------------------

OK. All pictures visible in the same HTML-page.


Case 2: A HTML-file inserting 5 links to 5 pictures.
----------------------------------------------------

OK. Each picture is shown when each link to it is clicked.


Case 3: A HTML-file embedding 5 text-files.
-------------------------------------------

ERROR. Each text-file is inserted in boxes with scroll-bars.
Should be possible to just print the text. To choose between box and  
scroll-bars or avoiding it.


Case 4: A HTML-file inserting 5 links to 5 text-files.
------------------------------------------------------

OK. The content of each text-file is shown when each link is clicked.



EXAMPLE:
========

In 3 HTML files with these paragraphs:


FileA.html contains: ....COMPANY X is part or larger organization...

FileB.html contains: .............At university COMPANY X is involved in 3  
student projects....

FileC.html contains: ......The strategy the COMPANY X has chosen in  
context with..................


CompanyName.txt contains: COMPANY X


In this context it is desirable to get COMPANY X inserted in the  
paragraphs without box and scroll-bars.
Inserting a link to the text-file 'CompanyName.txt' is not desirable in  
this context.



Best Regards,
Per.

===

Per Hygum Due, Software Engineer,
MOTOROLA.


-----Original Message-----
From: Gareth Hay [mailto:gazhay@gmail.com]
Sent: 29. marts 2007 11:27
To: Due Per-VCW437
Cc: Asbjørn Ulsberg; www-html@w3.org
Subject: Re: Control Text-file Embedding in HTML-docs

Doesn't this use case invalidate the whole idea of markup?
I.E.
	If you need to use the same text in more than one place, mark it up in  
html and link to it from all the other locations.

If you *really* need to do this, any scripting language could automate it  
for you.

On 28 Mar 2007, at 22:24, Due Per-VCW437 wrote:

>
>
>
>
> 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 itis  
> nice to edit and maintain it in one place.
> This ensures that the changes take effect everywhere the TXT-file isused.
>
> If the text is embedded in HTML-documents it must be edited inmultiple  
> 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">
> </object>
> a test. This is a
> <object data="file:///D:/HtmlTest/File2.txt">
> </object>
> test
> <br>
> This
> <object data="file:///D:/HtmlTest/File3.txt" height="50%" width="50%"> 
> </object> is a test <br> This <IFRAMEsrc="file:///D:/HtmlTest/File1.txt">
> </IFRAME>
> is
> <IFRAME src="file:///D:/HtmlTest/File2.txt">
> </IFRAME>
> a test
> <br>
> 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 initialtext.
> Second line of initial text.
> </TEXTAREA>
>
> </body>
> </html>
>
> ==========
>
> For TEXTAREA it doesn't seem to be possible to refer to an externalfile.
>
> 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.
>
> ===
>
> Per Hygum Due, Software Engineer,
> MOTOROLA.
>
>
> -----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>
> wrote:
>
>> <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 [...]
>    </div>
>
> Alternatively, you could use the <iframe> instead of <object> and 
> <textarea> instead of <div>. I'd go with inlining the content insteadof  
> having it externally, though, since that would make it availablefor all  
> UAs, including Google.
>
> --Asbjørn Ulsberg           -=|=-        asbjorn@ulsberg.no
> «He's a loathsome offensive brute, yet I can't look away»
>
>
Received on Thursday, 29 March 2007 11:55:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:16:08 GMT