We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpIntegration › processing htm syntax is problematic
Page Index Toggle Pages: 1
processing htm syntax is problematic (Read 634 times)
processing htm syntax is problematic
Jun 30th, 2008, 2:26pm
 
Today  I add to my firefox navigator Html Validator I test it on my website but it detect 18 errors on scripting syntax from processing html export!

like this :  <embed src="processing/Curves1/Curves1.jar" archive="Curves1.jar">

Element ... undefined
Cause:

You have used the element named above in your document, but the document type you are using does not define an element of that name. This error is often caused by:

   * incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Frameset" document type to get the "<frameset>" element)
   * by using vendor proprietary extensions such as "<spacer>" or "<marquee>" (this is usually fixed by using CSS to achieve the desired effect instead).
   * by using upper-case tags in XHTML (in XHTML attributes and elements must be all lower-case).

For most tags, the reason is that there is other ways to achieve the same result with standard tags or with CSS.
Example 1:
Good<nobr>there is no wrapping here</nobr>
Good<table><tr><td nowrap>there is no wrapping here</td></tr></table>

<span style="white-space: nowrap;">there is no wrapping here</span>

NOBR is not approved by the W3C; <nobr> turns off wordwrapping between the start and end NOBR tag. There are several ways to replace a NOBR with a standard tag :

   * You can use the nowrap attribute of the TR and TD tag in a table. In that case, the <br /> element to force line breaks where desired.
   * The best solution is to use a cascaded style sheet with the attribute: white-space: nowrap;.

Example 2:
Good<object width="400" height="300"><param name="movie" value="movie.swf"/>

<embed src="movie.swf" width="400" height="300"/>
</object>
Good<object width="400" height="300" type="application/x-shockwave-flash" data="movie.swf">

<param name="movie" value="movie.swf" />
</object>

EMBED does not exist in HTML. It is a proprietary tag.
Solution:

Replace the tag with the equivalent in standard HTML.
References:

   * http://www.w3.org/TR/CSS1#white-space
   * http://www.w3.org/TR/html401/index/elements.html
   * http://artikel.fabrice-pascal.de/xhtmlembed/


Re: processing htm syntax is problematic
Reply #1 - Jun 30th, 2008, 3:13pm
 
According to the w3 validator, processing *DOES* produce valid XHTML Strict 1.0. I don't know what that firefox extension does, but it's wrong if it's saying that processing's output is invalid.

See: http://validator.w3.org/check?uri=http%3A%2F%2Fwww.hardcorepawn.com%2Fgalaxy%2F&charset=(detect+automatically)&doctype=Inline&group=0 That's the exact file Processing creates, and it's fine.

Edit: Having had a quick look, what version of processing are you using, mine (0142) doesn't use the embed tag at all..
Re: processing htm syntax is problematic
Reply #2 - Jul 1st, 2008, 12:50am
 
Last time I tried, Processing was outputting <object> tags, not <embed> one (which is understood by most browsers anyway).
You should update your version.
Page Index Toggle Pages: 1