Am 18.09.2007 um 10:10 schrieb Thorsten Scherler:

On Tue, 2007-09-18 at 09:47 +0200, Jürgen Ragaller wrote:
Am 18.09.2007 um 08:30 schrieb Thorsten Scherler:

On Mon, 2007-09-17 at 22:38 +0200, Jürgen Ragaller wrote:
Am Sep 17, 2007 um 20:43 schrieb Jürgen Ragaller:


The next thing to find out is how to get the dojo javascript stuff
and cocoon form css in the html head...


Here is what I found out about the above problem:

In usecasedocument/sitemap.xmap the transformation forms-samples-
styling.xsl inserts the dojo scripts but after the xhtml2xhtml.xsl
transformation the scripts are gone (eaten up).

When the page is called using the lenya.usecase GET parameter, the
pipeline usecase/usecase.xmap is called and the scripts are inserted
correctly.

So we must find out which code in the usecase.xmap is responsible for
the correct behavior and fix the eat up.

It is not usecase/usecase.xmap causing the trouble.

Yeah, I understood that this code is working.

sorry - misunderstood you...



I wanted to get a cform in a usecasedocument.

Here is what I did:

The «usecase document» was created using the following get parameters:
usecase=myusecase.event&lenya.usecase=usecasedocument.create
(as it is done in contactform)

When it is called (using it't normal url e.g. form.html), the following
sitemap is handles the cform:
usecasedocument/sitemap.xmap (that sitemap eats up the dojo scripts)

The reason I took that approach is, that I need to have the form
rendered
as a lenya document and I got inspiration von contactform.



nice.


In fallback://lenya/modules/xhtml/xslt/xhtml2xhtml.xsl we eat the head:

<xsl:template match="/xhtml:html">
  <html>
    <body>
      <div id="body">
        <xsl:if test="$rendertype = 'edit'">
          <xsl:attribute
name="bxe_xpath">/xhtml:html/xhtml:body</xsl:attribute>
        </xsl:if>
        <xsl:apply-templates select="xhtml:body/node()"/>
      </div>
    </body>
  </html>
</xsl:template>

try something like:
<xsl:template match="/xhtml:html">
  <html>
+   <head>
+  <xsl:apply-templates select="xhtml:head/node()"/>
+   </head>
    <body>
      <div id="body">
        <xsl:if test="$rendertype = 'edit'">
          <xsl:attribute
name="bxe_xpath">/xhtml:html/xhtml:body</xsl:attribute>
        </xsl:if>
        <xsl:apply-templates select="xhtml:body/node()"/>
      </div>
    </body>
  </html>
</xsl:template>

Thanks Thorsten - I had just compared page2xhtml and xhtml2xhtml and also found the spot you described. Would that piece of code cause any harm to other transformations or could it be added to the trunk - WDYT?

Now the last tiny problem to solve (for now...) is to avoid the collapsing of script tags... (right now dojo complains with a javascript alert box, that _editor_url is not set - a followup error of the partial script tag collapsing).

Jürgen





---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to