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 Wed, 19 Jul 2006 11:01:48 GMT
Hi,
I have noticed that if I place forms-sample-styling.xsl after my jxt line,
in the sitemap, that it renders the form section properly...which leads me
to believe that the issue I am having is with the ft:forms-template section
trying to be transformed twice by the 2 stylesheets!:

                <map:generate type="jx" src="jx/{2}.jx"/>
                <map:transform type="browser-update"/>
                <map:transform type="xslt-saxon" src="style/{2}.xsl"/>
                <map:transform type="cinclude"/>

ft:form-template in jx/{2}.jx, containing all widgets, is (partly?)
transformed by style/{2}.xsl

                <map:transform type="i18n">
                  <map:parameter name="locale" value="en-US"/>
                </map:transform>
                <map:transform src="template-style/forms-samples-styling.xsl
"/>
                <map:transform type="i18n">
                  <map:parameter name="locale" value="en-US"/>
                </map:transform>

A second pass is made on the already, partly?, transformed ft:forms-template
section. I say partly because all of the ft:form-template namesapce (plus
all contents of) should only take place in forms-samples-styling.xsl. Does
this make sense?

Solution:
style/{2}.xsl is my overall page design, whilst jx/{2}.jx is a subpart of
that page. So, how to transform jx/{2}.jx, form/widgets, only by the second
stylesheet transform forms-samples-styling.xsl? Is this possible? Is there a
way to specify in the jx template that the contents are to be transformed by
a specific stylesheet only?

regards

Andrew

On 19/07/06, Andrew <andrewmadu@gmail.com> wrote:
>
> Hi,
> in forms-samples-styling.xsl I came across the following comments:
>
>       <!--+ !!! If template with mode 'forms-page' adds text or elements
>           |        template with mode 'forms-field' can no longer add
> attributes!!!
>           +-->
>
> Could this have any bearing on the ft:form-template section of my page not
> processing properly?
>
> regards
>
> Andrew
>
>
> On 19/07/06, Andrew <andrewmadu@gmail.com> wrote:
> >
> > Hi Mark,
> >
> > >
> > > > Ok..,
> > > > si i've managed to get the head elements working but now I can't get
> > >
> > > > the body elements to be processed by forms-samples-styling.xsl and
> > > the
> > > > html output I get for the jx part of the body section is:
> > > > <snip...>
> > >
> > > Hi Andrew... OK, how do you know that <body> isn't being processed?
> >
> >
> > The body in itself is being processed, but as I mentioned, the JX part
> > of my page, which is the form itself, is not being processed properly at
> > all.
> >
> > Also —what is the namespace for your form template elements?  Whatever
> > > it's supposed to be, typically we use the prefix 'ft' to denote it, so
> > > I think we should not be seeing something <form-template> here... it
> > > would be <ft:form-template> if the document was somehow getting past
> > > the forms stylesheets.
> >
> >
> > The namespace I am using for the form is as per  convetion,
> > <ft:form-template>, and the  html output,. as shown, reads as
> > <form-template>. This I do not understand at all!
> >
> >  The result you posted looks as though you have
> > > HTML elements and forms template elements are both in the default
> > > namespace...?
> >
> >
> >
> > Yes I have some html  inside the form namespace. My XSL snippet is as
> > sfollows:
> >
> >
> > <?xml version="1.0" encoding="ISO-8859-1"?>
> >
> > <page
> > xmlns:jx=" http://apache.org/cocoon/templates/jx/1.0"
> > xmlns:cinclude=" http://apache.org/cocoon/include/1.0"
> > xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
> > xmlns:fi=" http://apache.org/cocoon/forms/1.0#instance ">
> >
> > <jx:import uri="resource://org/apache/cocoon/forms/generation/jx-
> > macros.xml"/>
> >     <login_fields>
> >         <jx:choose>
> >           <jx:when test="${userGlobal==null}">
> >               <ft:form-template action="login.kont" name="Form1"
> > method="POST" ajax="true">
> >                 <ft:continuation-id/>
> >                    <div id="output">
> >                     <table border="0" cellspacing="0" cellpadding="0">
> >                         <tr>
> >                           <td width="55" valign="bottom"><img
> > src="images/user.gif" width="55" height="16" /></td>
> >                           <td width="220" valign="top">
> >                             <fi:group>
> >                                   <fi:styling type="tabs"/>
> >                                       <fi:state>
> >                                           <ft:widget id="activetab" />
> >                                       </fi:state>
> >                                       <fi:items>
> >                                           <ft:widget id="username">
> >                                               <fi:styling size="30"
> > type="text" class="keyinbox"/>
> >                                           </ft:widget>
> >                                       </fi:items>
> >                             </fi:group>
> >                           </td>
> >                         </tr>
> >                       </table>
> >                       <table border="0" cellspacing="0" cellpadding="0">
> >
> >                         <tr>
> >                           <td width="55" valign="bottom"><img
> > src="images/passwords.gif" width="89" height="16" /></td>
> >                           <td width="220" valign="top">
> >                             <fi:group>
> >                                   <fi:styling type="tabs" />
> >                                       <fi:state>
> >                                           <ft:widget id="activetab" />
> >                                       </fi:state>
> >                                       <fi:items>
> >                                           <ft:widget id="password">
> >                                               <fi:styling size="30"
> > type="password" class="keyinbox"/>
> >                                           </ft:widget>
> >                                       </fi:items>
> >                             </fi:group>
> >                           </td>
> >                         </tr>
> >                       </table>
> >                       <table border="0" cellspacing="0" cellpadding="0">
> >
> >                         <tr>
> >                           <td colspan="6" align="right"><img
> > src="images/tool.gif" width="2" border="0" height="5" /></td>
> >                         </tr>
> >                         <tr>
> >                           <td><img src="images/tool.gif" width="3"
> > border="0" height="1" /></td>
> >                           <td width="55" valign="bottom"
> > class="indextext"><img src="captcha.jpeg" /></td>
> >                           <td width="220" valign="top">
> >                               <table border="0" cellspacing="0"
> > cellpadding="0">
> >                               <tr>
> >                                   <td><img src="images/tool.gif"
> > width="3" border="0" height="1" /></td>
> >                                   <td valign="top">
> >                                     <fi:group>
> >                                           <fi:styling type="tabs"/>
> >                                               <fi:state>
> >                                                   <ft:widget
> > id="activetab" />
> >                                               </fi:state>
> >                                               <fi:items>
> >                                                   <ft:widget
> > id="captcha_code">
> >                                                       <fi:styling
> > listbox-size="30" type="text" class="keyinbox"/>
> >                                                   </ft:widget>
> >                                               </fi:items>
> >                                     </fi:group>
> >                                   </td>
> >                               </tr>
> >                               </table>
> >                           </td>
> >                         </tr>
> >                       </table>
> >                       <table width="100%" border="0" cellspacing="0"
> > cellpadding="0">
> >                         <tr>
> >                           <td colspan="6" align="right"><img
> > src="images/tool.gif" width="2" border="0" height="10" /></td>
> >                         </tr>
> >                         <tr>
> >                           <td align="right">
> >                           <table width="100%" cellpadding="0"
> > cellspacing="0" border="0">
> >                           <tr>
> >                               <td align="left" valign="bottom"
> > class="indextext"><a href="javascript:popup('sendDetailsPopUp.xml','${userGlobal}')">&#160;Forgotten
> > your Password?</a></td>
> >                               <td align="right"><img
> > src="images/plus.gif" width="8" height="14" /></td>
> >                           </tr>
> >                           </table>
> >                           </td>
> >                           <td width="8" align="left"><img
> > src="images/plus.gif" width="8" height="14" /></td>
> >                           <td width="42" align="left"><a
> > href="javascript:formSubmit(document.Form1)"
> > onMouseOut="MM_swapImgRestore()"
> > onMouseOver="MM_swapImage('sumit','','images/sumit- over.gif',1)"><img
> > src="images/sumit-none.gif" alt="sumit" name="sumit" width="42"
> > height="15" border="0" /></a></td>
> >                           <td width="42" align="center"
> > valign="middle"><a href="javascript:formReset( document.Form1)"
> > onMouseOut="MM_swapImgRestore()"
> > onMouseOver="MM_swapImage('cancel','','images/cancel-over.gif',1)"><img
> > src="images/cancel-none.gif" alt="cancel" name="cancel" width="42"
> > height="15" border="0" /></a></td>
> >                           <td width="20" align="center"
> > valign="middle"><img src="images/tool.gif" width="20" height="8" /></td>
> >                         </tr>
> >                       </table>
> >                 </div>
> >               </ft:form-template>
> >             </jx:when>
> >
> > regards
> >
> > Andrew
> >
> > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: users-unsubscribe@cocoon.apache.org
> > > For additional commands, e-mail: users-help@cocoon.apache.org
> > >
> > >
> >
>

Mime
View raw message