cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Andrew <andrewm...@gmail.com>
Subject Re: Cocoon-Ajax issue
Date Tue, 18 Jul 2006 15:44:45 GMT
Hi Mark,
you are understanding the question very well ;-) The head section of my XSLT
file never matches with the head matacher in forms-samples-style.xsl and as
a result none of the require ajax/dojo script code is wrtten to the head
area of my code. My sitemap pipe is as follows:

            <map:match pattern="**viewform-*">
                <map:generate type="jx" src="jx/{2}.jx"/>
                <map:transform type="forms"/>
                <map:transform type="browser-update"/>
                <map:transform type="i18n">
                  <map:parameter name="locale" value="en-US"/>
                </map:transform>
                <map:transform type="xslt-saxon" src="style/{2}.xsl"/>
                <map:transform type="cinclude"/>
                <map:transform src="template-style/forms-samples-styling.xsl
"/>
                <map:transform type="cinclude"/>
                <map:transform type="i18n">
                  <map:parameter name="locale" value="en-US"/>
                </map:transform>
                <map:select type="ajax-request">
                  <map:when test="true">
                    <map:serialize type="xml"/>
                  </map:when>
                  <map:otherwise>
                    <map:serialize type="xhtml"/>
                  </map:otherwise>
                </map:select>
            </map:match>

and my xsl file is as follows:

<?xml version="1.0" encoding="ISO-8859-1"?>
    <xsl:stylesheet version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
        xmlns:cinclude="http://apache.org/cocoon/include/1.0">
        <xsl:template match="/">
          <page>
                <head>
                    <title>beyaRecords - Home Page</title>
                    <link rel="stylesheet" type="text/css">
                        <xsl:attribute
name="href">stylesheets/beya.css</xsl:attribute>
                        <xsl:attribute name="media">all</xsl:attribute>
                    </link>

                    <link rel="stylesheet" type="text/css">
                        <xsl:attribute
name="href">stylesheets/style.css</xsl:attribute>
                        <xsl:attribute name="media">all</xsl:attribute>
                    </link>

                    <script>
                        <xsl:attribute
name="type">text/javascript</xsl:attribute>
                        <xsl:attribute
name="src">js_files/upwarddownward.js</xsl:attribute>
                    </script>

                    <script>
                        <xsl:attribute
name="type">text/javascript</xsl:attribute>
                        <xsl:attribute
name="src">js_files/form.js</xsl:attribute>
                    </script>

                </head>
            <body leftmargin="0" marginheight="0" topmargin="0"
marginwidth="0"
onload="InitialiseScrollableArea();preloadImages('images/scroller_up_on.gif','images/scroller_down_on.gif');MM_swapImage('images/sumit-
over.gif','images/cancel-over.gif','images/emaillink-over.gif')">
            <script>
                <xsl:attribute name="type">text/javascript</xsl:attribute>
                <xsl:attribute name="src">js_files/reload.js</xsl:attribute>
            </script>
            <table width="1024" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td width="221" rowspan="3"><img src="images/bgleft1.jpg"
width="222" height="460" /></td>
              <td colspan="4" background="images/bg1.gif" class="bgcol"
width="583"><xsl:apply-templates select="//menu"/></td>
              <td width="220" rowspan="3"><img src="images/bgright1.gif"
width="220" height="460" /></td>
            </tr>
            <tr>
              <td width="18" class="bgcol"><img src="images/tool.gif"
width="18" height="365" /></td>
              <td width="301" valign="top" class="bgcol">
              <table width="261" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td><img src="images/tool.gif" width="20" height="16"
/></td>
                  </tr>
                  <xsl:apply-templates select="//new_music"/>
                  <tr>
                    <td><img src="images/tool.gif" width="20" height="5"
/></td>
                  </tr>
                  <tr>
                    <td valign="top"><xsl:apply-templates
select="//login_welcome"/></td>
                  </tr>
                  <tr>
                     <td colspan="2"><img src="images/tool.gif" width="20"
height="3" /></td>
                  </tr>
                  <tr>
                    <td><xsl:apply-templates select="//login_fields"/></td>
                  </tr>
                </table></td>
              <td width="19" class="bgcol">&#160;</td>
              <td width="245" valign="top" class="bgcol"><table width="100%"
border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td><img src="images/tool.gif" width="20" height="16"
/></td>
                  </tr>
                  <tr>
                    <td><img src="images/newstitle.gif" width="245"
height="27" /></td>
                  </tr>
                  <tr>
                    <td><img src="images/tool.gif" width="20" height="300"
/></td>
                  </tr>
                </table></td>
            </tr>
            <tr>
              <td colspan="4" class="bgcol"><a href="mailto:
info@beyarecords.com" onMouseOut="MM_swapImgRestore()"
onMouseOver="MM_swapImage('email','','images/bottombar-over.gif',0)"><img
src="images/bottombar-none.gif" name="email" width="583" height="22"
border="0" /></a></td>
            </tr>
          </table>
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td bgcolor="B9B5AC"><img src="images/tool.gif" width="1"
height="1" /></td>
            </tr>
          </table>
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
                <td></td>
                <td><img src="images/tool.gif" width="1" height="5" /></td>
            </tr>
            <cinclude:include src="style/copyright.xml" element="included"/>
            <cinclude:include src="style/designed-by-littleghost.xml"
element="included"/>
        </table>
        <P align="center">&#160;</P>
        <div id="divUpControl">
          <table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td>&#160;</td>
              <td width="24">
                <a onmouseover="PerformScroll(-7);displayStatusMsg('Scroll
Up');swapImage('images/scroller_up_button','','images/scroller_up_on.gif',1);return
document.returnValue" onmouseout="CeaseScroll();swapImgRestore()"
href="javascript:;"><img height="18" alt="godown"
src="images/scroller_up_on.gif" width="24" border="0"
name="scroller_up_button"/></a>
              </td>
            </tr>
            <tr>
              <td>&#160;</td>
              <td><img src="images/scrollbg.gif" width="24"
height="154"/></td>
            </tr>
          </table>
          <p>&#160;</p>
          <p>&#160;</p>
          <p>&#160;</p>
          <p>&#160;</p>
          <p>&#160;</p>
          <p>&#160; </p>
        </div>
        <div id="divDownControl">
            <a onmouseover="PerformScroll(7);displayStatusMsg('Scroll
Down');swapImage('images/scroller_down_button','','images/scroller_down_on.gif',1);return
document.returnValue" onmouseout="CeaseScroll();swapImgRestore()"
href="javascript:;"><IMG height="18" alt="goup"
src="images/scroller_down_on.gif" width="24" border="0"
name="scroller_down_button"/></a>
        </div>
        <div id="divContainer">
          <div id="divContent">
                <p class="newstext">
                        <xsl:apply-templates select="//news"/>

                </p>
              <br/>
             <p/>
          </div>
        </div>
        <P align="center">&#160;</P>
        <P align="center">&#160;</P>
        <P align="center">&#160;</P>
        <P align="center">&#160;</P>
        <P align="center">&#160;</P>
        <P align="center">&#160;</P>
</body>
</page>
</xsl:template>

regards

Andrew

On 18/07/06, Mark Lundquist <ml@wrinkledog.com> wrote:
>
> Hi Andrew,
>
> On Jul 18, 2006, at 7:44 AM, Andrew wrote:
>
> > what's up with these machers:
> >
> > <xsl:apply-templates select="." mode="forms-page"/>
> > <xsl:apply-templates select="." mode="forms-field"/>
> >
> > which are never matached in forms-sample-styling.xsl or:
> >
> > <xsl:apply-templates select="." mode="forms-calendar"/>
> > <xsl:apply-templates select="." mode="forms-htmlarea"/>
> >
> > in forms-advanced-field styling.xsl?
>
> Not sure I understand... those are not "matchers".  They are found in
> templates like <xsl:template match="head"> and <xsl:template
> match="body">.  Do you mean that those templates are never matched, and
> if so, why? (they certainly should be matched if they are being applied
> to HTML!)
>
> > Where in my design xslt page am I meant p speacify any of the above
> > 'mode' attributes and values?
>
> You don't.  The modeless templates just match, and then they invoke the
> moded templates which are found in the forms-*-stying.xsl stylesheets.
>
> Does this help?  Maybe I'm misunderstanding the question(s)... :-)
>
> cheers,
> —ml—
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: users-help@cocoon.apache.org
>
>

Mime
View raw message