ObjectWeb Consortium
Search ObjectWeb Mail Archive: 

Advanced Search - Powered by Google


Mail Archive Home | enhydra List | June 2004 Index

<--  Date Index  --> <--  Thread Index  -->

Re: [enhydra] insert a file(.pdf, .doc) somewhere in a web page


Hi all,

On 8 juin 04, at 20:47, Petr Stehlik wrote:
V Út, 08. 06. 2004 v 09:52, Gilles Serasset píše:
Well, if you choose to "embed" the article as an HTML tree (keeping
some formating), you should rather use a <div id="..."> tag, as the
span tag may only contain raw text according to the HTML specs.

Really?

"The DIV and SPAN elements, in conjunction with the id and class
attributes, offer a generic mechanism for adding structure to documents.
These elements define content to be inline (SPAN) or block-level (DIV)
but impose no other presentational idioms on the content."

http://www.w3.org/TR/1999/REC-html401-19991224/struct/global.html#h -7.5.4

I also used to think that SPAN is for plain text only - this is probably
because XMLC generates the setText method for it. But it's generic and
can be used for including anything, even a whole DOC or XLS document
(once the document is converted to HTML :-)

Petr

Well, it seems that some formating is allowed in <SPAN>, but as far as I understand the DTD:

<!ELEMENT DIV - - (%flow;)* -- generic language/style container --> <!ELEMENT SPAN - - (%inline;)* -- generic language/style container -->

DIV allows only "inline formatting" when span allows "flow"

A flow is "block" or "inline":
<!ENTITY % flow "%block; | %inline;

Hence everything that is a block but not an inline is not authorized in a SPAN. This include paragraphs, lists, divs etc...

<!ENTITY % block
     "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |
      BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">

Hence, I wrongly thought that ONLY text was allowed in SPAN, but it appears that formatted text is allowed.

Well all of this is purelly theoretical as 99% of the available web pages are not valid HTML... but sticking to the standard may be a good thing to get cross-plateform web pages...

Regards,

Gilles,

--
Gilles Sérasset
GETA-CLIPS-IMAG (UJF, INPG & CNRS)
BP 53 - F-38041 Grenoble Cedex 9
Phone: +33 4 76 51 43 80
Fax:   +33 4 76 44 66 75





<--  Date Index  --> <--  Thread Index  -->

Reply via email to:

Powered by MHonArc.

Copyright © 1999-2005, ObjectWeb Consortium | contact | webmaster.