You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@forrest.apache.org by Cyriaque Dupoirieux <Cy...@pcotech.fr> on 2007/01/29 12:07:36 UTC

[Dispatcher] head and body tags are inverted

Hi,

    With the dispatcher, the head tag is generated after the body tag 
and it is not W3C...
    http://www.w3.org/TR/html4/struct/global.html#edef-HTML

    I have a problem with this because some scripts are included in the 
head and are not found in the body - because the body appears first...

    How can I correct this ?

-- 
Salutations,
Cyriaque,

Re: [Dispatcher] head and body tags are inverted

Posted by Thorsten Scherler <th...@apache.org>.
On Mon, 2007-01-29 at 12:07 +0100, Cyriaque Dupoirieux wrote:
> Hi,
> 
>     With the dispatcher, the head tag is generated after the body tag 

Yes the dispatcher transformer does that.

> and it is not W3C...
>     http://www.w3.org/TR/html4/struct/global.html#edef-HTML
> 

http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/internal.xmap?view=markup

The html match contains 
<map:transform 
          src="resources/stylesheets/helper/strip-dispatcher-remains.xsl" 
          />

http://svn.apache.org/viewvc/forrest/trunk/whiteboard/plugins/org.apache.forrest.plugin.internal.dispatcher/resources/stylesheets/helper/strip-dispatcher-remains.xsl?view=markup

Here we do:
  <xsl:template match="/">
    <html xmlns="http://www.w3.org/1999/xhtml">
      <xsl:copy-of select="html/head"/>
      <xsl:copy-of select="html/body"/>
    </html>
  </xsl:template>

>     I have a problem with this because some scripts are included in the 
> head and are not found in the body - because the body appears first...
> 
>     How can I correct this ?

You should apply above, but it is in there by default.

...or are you talking about stax?

salu2
-- 
thorsten

"Together we stand, divided we fall!" 
Hey you (Pink Floyd)