RE: [WSG] Input tag - closing tag optional?

2007-11-26 Thread Kepler Gelotte
> Also, if I understand correctly, this will break in IE?

Actually the original question was whether the  element (which is
defined as EMPTY in the DTD) requires a closing  tag. It was not
whether an empty element like a  with no content could be written as a
simple tag. According to the XML spec. it is valid XML to do so, however it
recommends that only EMPTY elements be written using the simple tag syntax:

http://www.w3.org/TR/2004/REC-xml-20040204/#dt-content

"For interoperability, the empty-element tag SHOULD be used, and SHOULD only
be used, for elements which are declared EMPTY"

Using the start tag/end tag combination for tags defined as EMPTY works fine
in most recent browsers:

http://www.neighborwebmaster.com/tests/input.php

Regards,
Kepler



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Input tag - closing tag optional?

2007-11-26 Thread Dusan Smolnikar
Never thought of that really, thanks! So Basically what you have to do is
tell your web server to set file headers to return content type as xml?

Also, if I understand correctly, this will break in IE?


On Nov 26, 2007 8:37 AM, Jens Brueckmann <[EMAIL PROTECTED]> wrote:


> Your demo shows very well why serving XHTML as text/html is harmful.
>
> When the document's media type is changed, you will see the expected
> results, i.e. your document is rendered as application/xhtml+xml:
>
> http://www.lairx.de/071126/tags.xhtml
>
>


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

Re: [WSG] Input tag - closing tag optional?

2007-11-26 Thread Michael MD

When the document's media type is changed, you will see the expected
results, i.e. your document is rendered as application/xhtml+xml:

http://www.lairx.de/071126/tags.xhtml



doesn't look like IE7 recognises application/xhtml+xml  it asks if I 
want to download it!






***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Input tag - closing tag optional?

2007-11-25 Thread Jens Brueckmann
Hi Dusan,

> It won't work in any other browser I know of as well. See this demo
> case:
> http://dusan.fora.si/blog/wp-content/uploads/2007/07/tags.html

Your demo shows very well why serving XHTML as text/html is harmful.

When the document's media type is changed, you will see the expected
results, i.e. your document is rendered as application/xhtml+xml:

http://www.lairx.de/071126/tags.xhtml


Cheers,

jens

-- 
Jens Brueckmann
http://www.yalf.de


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Input tag - closing tag optional?

2007-11-25 Thread Dusan Smolnikar
It won't work in any other browser I know of as well. See this demo  
case:

http://dusan.fora.si/blog/wp-content/uploads/2007/07/tags.html
(explained at http://dusan.fora.si/blog/self-closing-tags )

Of course I don't suggest using an empty div tag with no id. It was  
just an example.
But, semantically, even empty tags with ids are bad practice, are they  
not?


I believe quite some time will pass before we get real xml support in  
most browsers.

It's a shame...



On Nov26, 2007, at 12:19 AM, Jason Grant wrote:


Hi Dusan,

Here are some of the unofficial guidelines I work with:

 will not work with IE in certain circumstances. It might  
give you
some errors which you might find mind-bogglingly difficult to debug  
(i.e.

very weird behaviour).

 will behave much better, but (unless you have an ID or a  
class
on it) I suggest you do not use empty s at all. I certainly  
don't use

them. What's the real need for it if you think about it really?

As far as  is concerned, it is a sort of a special tag in  
so far
that all its attributes are defined within the tag (i.e. value,  
type, name,

id, class, size, maxlength, etc.), so there is no need for any content
between the opening and closing tags, hence in XHTML we use type=""
value="" name="" />. This is valid XML and it conforms to the  
standards.


Hope this helps.

Regards,

Jason
www.flexewebs.com




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



RE: [WSG] Input tag - closing tag optional?

2007-11-25 Thread Kepler Gelotte
> I'm afraid browser don't agree with this, though. I'm not sure about  
> input but I'm
> positive that  is not the same as  as far as browser  
> rendering goes.

Hi Dusan,

I was going by my knowledge of XML. According to the XHTML spec. both forms
are equivalent:

http://www.w3.org/TR/2002/REC-xhtml1-20020801/#h-4.6

As you pointed out though, not all browsers recognize strict XML:

http://www.w3.org/TR/2002/REC-xhtml1-20020801/#guidelines

Regards,
Kepler



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Input tag - closing tag optional?

2007-11-25 Thread Matthew Cruickshank

Philippe Wittenbergh wrote:

Depending on the mime type there is a huge difference.
text/html --> sgml parser in use
application/xhtml+xml --> xml parser is in use.


Just to clear up this misconception text/html doesn't use an SGML parser 
(few, or possibly zero browsers have implemented SGML parsing),


While the HTML form of HTML5 bears a close resemblance to SGML and 
XML, it is a separate language with its own parsing rules.


Some earlier versions of HTML (in particular from HTML2 to HTML4) were 
based on SGML and used SGML parsing rules. However, few (if any) web 
browsers ever implemented true SGML parsing for HTML documents; the 
only user agents to strictly handle HTML as an SGML application have 
historically been validators. The resulting confusion — with 
validators claiming documents to have one representation while widely 
deployed Web browsers interoperably implemented a different 
representation — has resulted in this version of HTML returning to a 
non-SGML basis.


Authors interested in using SGML tools in their authoring pipeline are 
encouraged to use the XML serialisation of HTML5 instead of the HTML 
serialisation.


--- 
http://www.whatwg.org/specs/web-apps/current-work/multipage/section-parsing.html



.Matthew Cruickshank
http://holloway.co.nz/blog/ << My new blog on XML, XSLT, and the web
http://docvert.org/ << Convert MSWord to OpenDocument, DocBook or clean HTML


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Input tag - closing tag optional?

2007-11-25 Thread Philippe Wittenbergh


On Nov 26, 2007, at 8:00 AM, Dusan Smolnikar wrote:

I'm afraid browser don't agree with this, though. I'm not sure  
about input but I'm
positive that  is not the same as  as far as  
browser rendering

goes.


Actually as far as XML (and consequently XHTML) is concerned:



Is the same as:




Depending on the mime type there is a huge difference.
text/html --> sgml parser in use
application/xhtml+xml --> xml parser is in use.
And no, slamming an xhtml doctype at the top of the page has no  
effect (doesn't affect the mime-type).


Note: the upcoming Firefox 3 and other browsers using the Gecko 1.9  
rendering engine are more strict in handling this.


Philippe
---
Philippe Wittenbergh






***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Input tag - closing tag optional?

2007-11-25 Thread Jason Grant
Hi Dusan,

Here are some of the unofficial guidelines I work with:

 will not work with IE in certain circumstances. It might give you
some errors which you might find mind-bogglingly difficult to debug (i.e.
very weird behaviour).

 will behave much better, but (unless you have an ID or a class
on it) I suggest you do not use empty s at all. I certainly don't use
them. What's the real need for it if you think about it really?

As far as  is concerned, it is a sort of a special tag in so far
that all its attributes are defined within the tag (i.e. value, type, name,
id, class, size, maxlength, etc.), so there is no need for any content
between the opening and closing tags, hence in XHTML we use . This is valid XML and it conforms to the standards.

Hope this helps.

Regards,

Jason
www.flexewebs.com

On 11/25/07, Dusan Smolnikar <[EMAIL PROTECTED]> wrote:
>
> I'm afraid browser don't agree with this, though. I'm not sure about
> input but I'm
> positive that  is not the same as  as far as browser
> rendering
> goes.
>
>
> On Nov21, 2007, at 7:28 AM, Kepler Gelotte wrote:
>
> > Actually as far as XML (and consequently XHTML) is concerned:
> >
> > 
> >
> > Is the same as:
> >
> > 
>
>
>
> ***
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: [EMAIL PROTECTED]
> ***
>
>


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

Re: [WSG] Input tag - closing tag optional?

2007-11-25 Thread Dusan Smolnikar
I'm afraid browser don't agree with this, though. I'm not sure about  
input but I'm
positive that  is not the same as  as far as browser  
rendering

goes.


On Nov21, 2007, at 7:28 AM, Kepler Gelotte wrote:


Actually as far as XML (and consequently XHTML) is concerned:



Is the same as:






***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Input tag - closing tag optional?

2007-11-23 Thread David Hucklesby
> On 21 Nov 2007, at 05:12, David Hucklesby wrote:
>
>> Trying to help a friend with their form markup, I suggested they look up the 
>> W3C
>> specifications. Their question was "does the input tag require a closing 
>> "".
>> I told them categorically "no" but was embarrassed to see this in the W3C 
>> specs[1]:
>>
>> 
>>
On Fri, 23 Nov 2007 15:20:00 +, David Dorward replied:
> 
> From: http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.3
>
> 'The hyphen and the following "O" indicate that the end tag can be omitted, 
> but
> together with the content model "EMPTY", this is strengthened to the rule 
> that the end
> tag must be omitted.'

Thank you David,
That's more encouraging.  :)

I see now that I am reading the specifications incorrectly. I expected
to see an "N" instead of the "O" -- but that's not the way the specs
are written.

I did "RTFM" -- I just did not read far enough.  :\

Cordially,
David
--



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Input tag - closing tag optional?

2007-11-23 Thread David Hucklesby
> On 21 Nov 2007, at 05:12, David Hucklesby wrote:
>
>> Trying to help a friend with their form markup, I suggested they look up the 
>> W3C
>> specifications. Their question was "does the input tag require a closing 
>> "".
>> I told them categorically "no" but was embarrassed to see this in the W3C 
>> specs[1]:
>>
>> 
>>
On Fri, 23 Nov 2007 15:20:00 +, David Dorward replied:
> 
> From: http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.3
>
> 'The hyphen and the following "O" indicate that the end tag can be omitted, 
> but
> together with the content model "EMPTY", this is strengthened to the rule 
> that the end
> tag must be omitted.'

Thank you David,
That's more encouraging.  :)

I see now that I am reading the specifications incorrectly. I expected
to see an "N" instead of the "O" -- but that's not the way the specs
are written.

I did "RTFM" -- I just did not read far enough.  :\

Cordially,
David
--



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Input tag - closing tag optional?

2007-11-23 Thread David Dorward


On 21 Nov 2007, at 05:12, David Hucklesby wrote:


Trying to help a friend with their form markup, I suggested they
look up the W3C specifications. Their question was "does the input
tag require a closing "". I told them categorically "no" but
was embarrassed to see this in the W3C specs[1]:

 

Now, I read that as "closing tag optional." So I am wrong. Or am I?


From: http://www.w3.org/TR/html4/intro/sgmltut.html#h-3.3

'The hyphen and the following "O" indicate that the end tag can be  
omitted, but together with the content model "EMPTY", this is  
strengthened to the rule that the end tag must be omitted.'


--
David Dorward
http://dorward.me.uk/
http://blog.dorward.me.uk/




***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



RE: [WSG] Input tag - closing tag optional?

2007-11-20 Thread Kepler Gelotte
> there's no closing tag

>  is XHTML
>  is HTML


Actually as far as XML (and consequently XHTML) is concerned:



Is the same as:



It's just that  can't contain anything between the start and end
tags. Both are valid though.

Regards,
Kepler



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Input tag - closing tag optional?

2007-11-20 Thread Chris Knowles
David Hucklesby wrote:
> Trying to help a friend with their form markup, I suggested they
> look up the W3C specifications. Their question was "does the input
> tag require a closing "". I told them categorically "no" but
> was embarrassed to see this in the W3C specs[1]:
> 
>  
> 
> Now, I read that as "closing tag optional." So I am wrong. Or am I?
> 

Hi David,

there's no closing tag

 is XHTML
 is HTML



-- 
Chris Knowles


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***



Re: [WSG] Input tag - closing tag optional?

2007-11-20 Thread Adam Martin
This is the reason why i made the move to XHTML - it is much more structured
in my opinion. And these sort of issues don't arise.
Adam.

On Nov 21, 2007 3:12 PM, David Hucklesby <[EMAIL PROTECTED]> wrote:

> Trying to help a friend with their form markup, I suggested they
> look up the W3C specifications. Their question was "does the input
> tag require a closing "". I told them categorically "no" but
> was embarrassed to see this in the W3C specs[1]:
>
>  
>
> Now, I read that as "closing tag optional." So I am wrong. Or am I?
>
> Anyone?
>
> [1] 
>
> Cordially,
> David
> --
>
>
>
> ***
> List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
> Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
> Help: [EMAIL PROTECTED]
> ***
>
>


-- 
-
http://myfitness.ning.com
A community of people that care about their health and fitness
Free fitness videos, recipes, blogs, photos etc.
--


***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***

[WSG] Input tag - closing tag optional?

2007-11-20 Thread David Hucklesby
Trying to help a friend with their form markup, I suggested they
look up the W3C specifications. Their question was "does the input
tag require a closing "". I told them categorically "no" but
was embarrassed to see this in the W3C specs[1]:

 

Now, I read that as "closing tag optional." So I am wrong. Or am I?

Anyone?

[1] 

Cordially,
David
--



***
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
***