Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > HTML > DOCTYPE scope

Reply
Thread Tools

DOCTYPE scope

 
 
dorayme
Guest
Posts: n/a
 
      08-08-2012
In article <jvsbin$g8j$(E-Mail Removed)>,
"Neil Gould" <(E-Mail Removed)> wrote:

> >

> Sites can be seen as "applications" too, so that is a distinction without a
> difference.


Don't worry about this, Tim is probably concerned to develop an email
program and he has a good reason to say it is an app and that is very
different to him making a webpage.

His question has been largely answered. Unless he can control the
content of the iframe, it will do what it wants, it is not obvious how
he could even inject styles into it.

--
dorayme
 
Reply With Quote
 
 
 
 
Jonathan N. Little
Guest
Posts: n/a
 
      08-08-2012
dorayme wrote:
> In article <jvsbin$g8j$(E-Mail Removed)>,
> "Neil Gould" <(E-Mail Removed)> wrote:
>
>>>

>> Sites can be seen as "applications" too, so that is a distinction without a
>> difference.

>
> Don't worry about this, Tim is probably concerned to develop an email
> program and he has a good reason to say it is an app and that is very
> different to him making a webpage.
>
> His question has been largely answered. Unless he can control the
> content of the iframe, it will do what it wants, it is not obvious how
> he could even inject styles into it.
>


Scraping. Ignoring the ethics of using someone else's content. He does
have permission to use the content, right?


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
 
 
 
dorayme
Guest
Posts: n/a
 
      08-08-2012
In article <jvsf3h$ekk$(E-Mail Removed)>,
"Jonathan N. Little" <(E-Mail Removed)> wrote:

> dorayme wrote:
> > In article <jvsbin$g8j$(E-Mail Removed)>,
> > "Neil Gould" <(E-Mail Removed)> wrote:
> >
> >>>
> >> Sites can be seen as "applications" too, so that is a distinction without a
> >> difference.

> >
> > Don't worry about this, Tim is probably concerned to develop an email
> > program and he has a good reason to say it is an app and that is very
> > different to him making a webpage.
> >
> > His question has been largely answered. Unless he can control the
> > content of the iframe, it will do what it wants, it is not obvious how
> > he could even inject styles into it.
> >

>
> Scraping. Ignoring the ethics of using someone else's content. He does
> have permission to use the content, right?


Who is scraping? Anyway, I am sure you are misunderstanding. Read
Tim's reply that hints about his purpose. It is a quite honourable one.

When someone sends you an email, for example, a real estate agent with
properties for sale, it is almost certainly an HTML one. It needs to
be rendered on your computer, either in the email read-window or in a
browser that fires up or you can have fire up. If someone is making an
email program or concerned with how to handle such when receiving,
questions of permission are hardly relevant.

--
dorayme
 
Reply With Quote
 
Tim Streater
Guest
Posts: n/a
 
      08-08-2012
In article <jvsbf4$g5k$(E-Mail Removed)>,
"Neil Gould" <(E-Mail Removed)> wrote:

> Tim Streater wrote:
> > In article <jvruse$giq$(E-Mail Removed)>,
> > "Jonathan N. Little" <(E-Mail Removed)> wrote:
> >
> >> Neil Gould wrote:
> >>> Tim Streater wrote:
> >>>> In article <jvr3tf$bjt$(E-Mail Removed)>,
> >>>> "Neil Gould" <(E-Mail Removed)> wrote:
> >>>>
> >>>>> Tim Streater wrote:
> >>>>>> Suppose I have a document with a given DOCTYPE. Does that also
> >>>>>> apply to the content of any iframe I may have within the
> >>>>>> document - which may in any case have its own DOCTYPE?
> >>>>>>
> >>>>> No. The contents in the iframe should have their own declaration,
> >>>>> and should validate on their own through testing.
> >>>>
> >>>> Thanks. But I'm more concerned about the rendering than the
> >>>> validation, in the various cases, in particular as I don't generate
> >>>> the HTML in the iframe and have no control over it.
> >>>>
> >>> If you have no control over the HTML, you also have no control over
> >>> how it will render. So, you can quit worrying, now!
> >>
> >> It is one of the downsides of using frame/iframes

> >
> > So if my doc has a nice DOCTYPE, but I have to put someone else's HTML
> > inside the iframe within my doc, and their HTML doesn't have any
> > DOCTYPE, then the iframe content is rendered in quirks mode?
> >

> Most likely. It seems that you are asking whether content in frames /
> iframes inherit the DOCTYPE of your page. No... it doesn't.


Right - that's clear enough - thanks

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
 
Reply With Quote
 
Tim Streater
Guest
Posts: n/a
 
      08-08-2012
In article <jvsf3h$ekk$(E-Mail Removed)>,
"Jonathan N. Little" <(E-Mail Removed)> wrote:

> dorayme wrote:
> > In article <jvsbin$g8j$(E-Mail Removed)>,
> > "Neil Gould" <(E-Mail Removed)> wrote:


> >> Sites can be seen as "applications" too, so that is a distinction without a
> >> difference.

> >
> > Don't worry about this, Tim is probably concerned to develop an email
> > program and he has a good reason to say it is an app and that is very
> > different to him making a webpage.
> >
> > His question has been largely answered. Unless he can control the
> > content of the iframe, it will do what it wants, it is not obvious how
> > he could even inject styles into it.


In fact I process the html before dumping it in the iframe, as follows:

1) Remove any scripts I can see

2) Check all links to see if they are obviously phishing and insert a
tip about each one (I recall that dorayme helped on that one)

3) Outlook lies in its <meta>, claiming the charset to be ISO-8859-1
when it in fact is utf-8

4) fix up pointers to inline images

5) Ensure that all links have a target of '_blank' and that no href is
empty.

> Scraping. Ignoring the ethics of using someone else's content. He does
> have permission to use the content, right?


I have and need just as much permission as you needed in order to quote
dorayme's post.

What is scraping?

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
 
Reply With Quote
 
Neil Gould
Guest
Posts: n/a
 
      08-08-2012
dorayme wrote:
> In article <jvsbin$g8j$(E-Mail Removed)>,
> "Neil Gould" <(E-Mail Removed)> wrote:
>>
>> Sites can be seen as "applications" too, so that is a distinction
>> without a difference.

>
> Don't worry about this, Tim is probably concerned to develop an email
> program and he has a good reason to say it is an app and that is very
> different to him making a webpage.
>

I understood Tim's implication. However, many sites are interactive in some
way, and their HTML is often generated by underlying code in some
programming or scripting language, so they are an application.

--
best regards,

Neil


 
Reply With Quote
 
Tim Streater
Guest
Posts: n/a
 
      08-08-2012
In article <jvtm6n$7oe$(E-Mail Removed)>,
"Neil Gould" <(E-Mail Removed)> wrote:

> dorayme wrote:
> > In article <jvsbin$g8j$(E-Mail Removed)>,
> > "Neil Gould" <(E-Mail Removed)> wrote:
> >>
> >> Sites can be seen as "applications" too, so that is a distinction
> >> without a difference.

> >
> > Don't worry about this, Tim is probably concerned to develop an email
> > program and he has a good reason to say it is an app and that is very
> > different to him making a webpage.
> >

> I understood Tim's implication. However, many sites are interactive in some
> way, and their HTML is often generated by underlying code in some
> programming or scripting language, so they are an application.


True. I suppose what I meant was, that in my case I use Safari,
JavaScript, a *local* instance of apache, PHP and SQLite as *components*
of an app that you double-click to start in the traditional way. Your
Internet connection is only actually needed when fetching or sending
mail.

--
Tim

"That excessive bail ought not to be required, nor excessive fines imposed,
nor cruel and unusual punishments inflicted" -- Bill of Rights 1689
 
Reply With Quote
 
Jonathan N. Little
Guest
Posts: n/a
 
      08-08-2012
dorayme wrote:
> In article <jvsf3h$ekk$(E-Mail Removed)>,
> "Jonathan N. Little" <(E-Mail Removed)> wrote:
>
>> dorayme wrote:
>>> In article <jvsbin$g8j$(E-Mail Removed)>,
>>> "Neil Gould" <(E-Mail Removed)> wrote:
>>>
>>>>>
>>>> Sites can be seen as "applications" too, so that is a distinction without a
>>>> difference.
>>>
>>> Don't worry about this, Tim is probably concerned to develop an email
>>> program and he has a good reason to say it is an app and that is very
>>> different to him making a webpage.
>>>
>>> His question has been largely answered. Unless he can control the
>>> content of the iframe, it will do what it wants, it is not obvious how
>>> he could even inject styles into it.
>>>

>>
>> Scraping. Ignoring the ethics of using someone else's content. He does
>> have permission to use the content, right?

>
> Who is scraping? Anyway, I am sure you are misunderstanding. Read
> Tim's reply that hints about his purpose. It is a quite honourable one.


s/who/what/

scraping is using server side scripting to get remote page content so
that is can be parsed, manipulated, reformatted, and included with your
servers' page. CURL for PHP is one popular way. I am sure you have
stumbled across those scrapped eBay auction listing sites.

>
> When someone sends you an email, for example, a real estate agent with
> properties for sale, it is almost certainly an HTML one. It needs to
> be rendered on your computer, either in the email read-window or in a
> browser that fires up or you can have fire up. If someone is making an
> email program or concerned with how to handle such when receiving,
> questions of permission are hardly relevant.
>


For email clients, like TB will block remote content be default for
security reasons. Iframe injection trojans. But with web mail...T think
that is how so many now are getting nailed, your web browser is much
more relaxed with JavaScript and frames enabled by default. But this is
not what I was addressing. I was giving one example of how to use remote
content and have control over the format without frames/iframes.


--
Take care,

Jonathan
-------------------
LITTLE WORKS STUDIO
http://www.LittleWorksStudio.com
 
Reply With Quote
 
Hot-Text
Guest
Posts: n/a
 
      08-11-2012
"Tim Streater" <(E-Mail Removed)> wrote in message news:(E-Mail Removed)...
> Suppose I have a document with a given DOCTYPE. Does that also apply to
> the content of any iframe I may have within the document - which may in
> any case have its own DOCTYPE?
>


No it have not it own DOCTYPE

For Iframe is HTML a Transitional Code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
because it's have HTML with the Iframe..

For frameset is HTML a frameset Code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN"
"http://www.w3.org/TR/REC-html40/frameset.dtd">
because it's have not HTML with the frameset,

But you can add JavaScript, and <style type="text/css">
to frameset it will work...
And in <noframeset>you can put a HTML Body</noframeset>
 
Reply With Quote
 
Denis McMahon
Guest
Posts: n/a
 
      08-11-2012
On Sat, 11 Aug 2012 00:04:02 -0500, Hot-Text wrote:

> "Tim Streater" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
>> Suppose I have a document with a given DOCTYPE. Does that also apply to
>> the content of any iframe I may have within the document - which may in
>> any case have its own DOCTYPE?


> No it have not it own DOCTYPE


Yes, the content of an iframe can have it's own DOCTYPE.

An iframe can contain content from another server that you have no
control over. If your document is html4 transitional, and loads an iframe,
the content of a document loaded in the iframe might be html4 strict,
html4 frameset, xhtml1.*, html 5, or anything else that has a valid
doctype as long as it's served with the right doctype for what it
contains.

Rgds

Denis McMahon
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
CSS Newbie - CSS Works With Invalid DOCTYPE. Fails With Valid DOCTYPE. Larry Lindstrom HTML 19 06-12-2012 02:07 PM
Re: Lexical scope vs. dynamic scope Xah Lee Java 0 02-26-2009 10:08 AM
Scope - do I need two identical classes, each with different scope? ann Java 13 09-13-2005 03:07 AM
How do namespace scope and class scope differ? Steven T. Hatton C++ 9 07-19-2005 06:07 PM
IMPORT STATIC; Why is "import static" file scope? Why not class scope? Paul Opal Java 12 10-10-2004 11:01 PM



Advertisments