Re: [WSG] inline element directly on body

2005-10-23 Thread Isabel Santos
Thank you all,
 
first, with short schedules and short weekends I find myself looking for things I cannot find in w3c, its organization is quite confusing, and since I keep loosing bookmarks and favorite lists on every format (unfortunatly too many of those) I end up getting in pannic once in a while.

On those times my synapsis tend to get slower :).
Things like 
(quoting w3c)
EM | 
STRONG | DFN | 
CODE |
   SAMP | 
KBD | VAR | 
CITE | ABBR | 
ACRONYM" >
%fontstyle;|%phrase;) - - (
%inline;)*>
%fontstyle;|%phrase;)
  %attrs;  -- %coreattrs, 
%i18n, %events --
  >tend to get confusing when you google it digging for a simple clear statement about your doubt, so thank you Rimantas.
Janos, thank you for the tip, but I used the "em" element because that is what makes sense in the context, to enphasize a note as content, not only as presentation.
Pardon me if I wasn't clear: I classified the w3c "well formedness" concept example as a bad one, not because it says anything wrong, but because it can be missunderstood; one can find this example all over the internet, as an example of how to use the "em" tag, but they are as poor as this example as to the issue in question: where exactly should it go. (I mean it would be wrong to make it "Hello World!" since "em" is an inline element and "p" is a block level one, but that isn't made clear). It seams it is very easy to find a lot of places where you learn xhtml, even where you can get diplomas on the subject, but the fact is that they do not get very deep. When one searches for more specific information, w3c turns into a labirinth, and most tutorial and reference sites into mere copies of w3c schools main content pages.

Anyway, this links you all gave me deserve a good study,
Thank you, best regards,
 
Isabel Santos 


Re: [WSG] inline element directly on body

2005-10-23 Thread Rimantas Liubertas
2005/10/23, russ - maxdesign <[EMAIL PROTECTED]>:
<...>
> Inline elements [1] and anonymous inline boxes [2] cannot be placed directly
> inside the body, form or blockquote elements when using a strict Doctype.
> They must be wrapped in a block level element.
<...>>
> [1] http://www.w3.org/TR/REC-CSS2/visuren.html#q7
> [2] http://www.w3.org/TR/REC-CSS2/visuren.html#anonymous
<...>

I'd say to lookup information for what can go where one should look at the
corresponding DTD, in this case:
http://www.w3.org/TR/html401/sgml/dtd.html
which says:


(%block;|SCRIPT)+ +(INS|DEL) lists allowed elements. Plus sign at the end
means that BODY must contain at least one block level or SCRIPT element.

%block; entity expands to: 

%heading;: 
%list;:
%preformatted; 

Add there INS and DEL which may occur (plus sign in front) and you have
list what is allowed in BODY.

More info about how to read DTD:

http://www.w3.org/TR/REC-html40/intro/sgmltut.html
http://www.w3schools.com/dtd/default.asp
http://www.alistapart.com/stories/readspec
http://www.autisticcuckoo.net/archive.php?id=2005/05/01/art-of-reading-dtd

Regards,
Rimantas
--
http://rimantas.com/
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
**



Re: [WSG] inline element directly on body

2005-10-23 Thread Isabel Santos
:) thank you Russ,
I must make a w3c site map on my favorites one of this days to be able to find this things...
best regards,
Isabel Santos 
On 10/23/05, russ - maxdesign <[EMAIL PROTECTED]> wrote:
...Inline elements [1] and anonymous inline boxes [2] cannot be placed directlyinside the body, form or blockquote elements when using a strict Doctype.
They must be wrapped in a block level element[1] http://www.w3.org/TR/REC-CSS2/visuren.html#q7[2] 
http://www.w3.org/TR/REC-CSS2/visuren.html#anonymousHTHRuss


Re: [WSG] inline element directly on body

2005-10-23 Thread Janos Hardi
Dear Isabel,

As you can see from here http://www.w3.org/TR/xhtml1/diffs.html your
markup is incorrect because you are attempted to use an old (html4)
style () within a new XML based document. In XML based documents
you have to use strict markup, e.g.

heading: 
paragraph: 

etc.

Emphasizing some excerpt of your text should go that way as the W3C
validator says:

emphasized text in a paragraph:

Hello World!

or an emphasized paragraph:

Hello World!

And yes it is mandatory because e.g. XML interpreters won't "understand" this:

here is an emphasized paragraph.

And an XHTML document has to be conformant with the XML markup.

Regards,

Janos

PS. Sorry for my poor english :)

2005/10/23, Isabel Santos <[EMAIL PROTECTED]>:
> Hi all,
>
> maybe I should know this, but I cannot even find where does w3c refers to
> this, so here it goes:
> I have a very simple document with a strict dtd.
> on the body I have something like this:
>   ...
>   ...
>   ...
> while validating the document I get this message:
> ___
> (quoting the validator)
> Line 15 column 18: document type does not allow element "em" here; missing
> one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address",
> "fieldset", "ins", "del" start-tag .
> ...,
> The mentioned element is not allowed to appear in the context in which
> you've placed it; the other mentioned elements are the only ones that are
> both allowed there and can contain the element mentioned. This might mean
> that you need a containing element, or possibly that you've forgotten to
> close a previous element.
> One possible cause for this message is that you have attempted to put a
> block-level element (such as "" or "") inside an inline element
> (such as "", "", or "").
> ___
>
>
> the question is:
> I cannot find a place where w3c tells me I cannot place an inline element
> directly on the body.
> In fact, all I find besides references about what is it, what can it contain
> and wich attributes it can handle, is a bad example of the "well formedness"
> concept:
> ___
> (quoting w3c)
> CORRECT: nested elements.
> here is an emphasized paragraph.
> INCORRECT: overlapping elements
>  here is an emphasized paragraph.
> 
>
>
> so, is it really mandatory that em elements (or any inline element for that
> matter) should go inside block level elements, or am I missing something
> here?
>
> Best regards,
>
> Isabel Santos
**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
**



Re: [WSG] inline element directly on body

2005-10-23 Thread russ - maxdesign
Hi Isabel,

Inline elements [1] and anonymous inline boxes [2] cannot be placed directly
inside the body, form or blockquote elements when using a strict Doctype.
They must be wrapped in a block level element.

However, if a Transitional Doctype is used, then inline elements and
anonymous inline boxes can be placed directly inside the body, form or
blockquote elements. They are not required to be wrapped in block level
elements.

[1] http://www.w3.org/TR/REC-CSS2/visuren.html#q7
[2] http://www.w3.org/TR/REC-CSS2/visuren.html#anonymous

HTH
Russ


> so, is it really mandatory that em elements (or any inline element for that
> matter) should go inside block level elements, or am I missing something here?
> 
> Best regards,
> 
> Isabel Santos
>

**
The discussion list for  http://webstandardsgroup.org/

 See http://webstandardsgroup.org/mail/guidelines.cfm
 for some hints on posting to the list & getting help
**



[WSG] inline element directly on body

2005-10-23 Thread Isabel Santos
Hi all,
 
maybe I should know this, but I cannot even find where does w3c refers to this, so here it goes:
I have a very simple document with a strict dtd.
on the body I have something like this:
  ...  ...  ...
while validating the document I get this message:
___(quoting the validator)
Line 15 column 18: document type does not allow element "em" here; missing one of "p", "h1", "h2", "h3", "h4", "h5", "h6", "div", "pre", "address", "fieldset", "ins", "del" start-tag
.
>...,The mentioned element is not allowed to appear in the context in which you've placed it; the other mentioned elements are the only ones that are both allowed there 
and can contain the element mentioned. This might mean that you need a containing element, or possibly that you've forgotten to close a previous element.One possible cause for this message is that you have attempted to put a block-level element (such as "" or "") inside an inline element (such as "", "", or ""). 
___

the question is:I cannot find a place where w3c tells me I cannot place an inline element directly on the body.In fact, all I find besides references about what is it, what can it contain and wich attributes it can handle, is a bad example of the "well formedness" concept:
___(quoting w3c)CORRECT: nested elements.here is an emphasized paragraph.INCORRECT: overlapping elements
here is an emphasized paragraph.

so, is it really mandatory that em elements (or any inline element for that matter) should go inside block level elements, or am I missing something here?
Best regards,
Isabel Santos