Re: Control Text-file Embedding in HTML-docs

Hello,

I don't really understand your query here, sorry.
Perhaps Tina said it better than I did
>
>
>> The reason to have the TXT-files is reuse and "update-in-one-place"
>> only.
>>
>
>   Unless I have missed something essential, then the usual method for
>   handling this is to use either a scripting language to build the  
> page
>   from smaller templates, or use an off-line document pre-processor  
> such
>   as wmake, orb, or even good old make.
>
>   It isn't strictly speaking a job for HTML, imho.

I agree that I don't think this is an HTML problem, more that it is a  
logical problem on your behalf.
If you have large amounts of repeating content, then it makes sense  
to either have this content in proper marked up html files itself and  
link to it, or to use templating / scripting to generate content for  
you.

e.g. If you are trying to do something like add a footer to every  
page, and want the text to be stored in only one location, you either  
use something like php to send the footer with every request, or on  
each page you have an <a href> tag that links to a page with your  
message, or finally, use an <object> tag to supply this content, as  
<object> handles test/html fine in my experience.

Thanks

On 29 Mar 2007, at 11:41, Koko wrote:

> Hi,
>
> I can't see any conflicts with html-markup using <object data /> or  
> IFRAMEs.
> Can you please provide  a very simple html-example with no any  
> scripting, without both iframe nor object?
>
> Thanks: Koko
> Gareth Hay wrote:
>> 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  
>>> 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">
>>> </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
>>> <IFRAME src="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 initial text.
>>> Second line of initial text.
>>> </TEXTAREA>
>>>
>>> </body>
>>> </html>
>>>
>>> ==========
>>>
>>> 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.
>>>
>>> ===
>>>
>>> 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  
>>> 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 Thursday, 29 March 2007 09:52:05 UTC