cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From oceatoon <t.katelb...@systheo.com>
Subject Re: JX generates weird NameSpace???
Date Sun, 20 Mar 2005 17:53:46 GMT
Thanks for the help
here's a little forms sample of this weird namespace popping up in the
<head> tag 
<head xmlns:%@$#^@#="%@$#^@#">
after the generate type jx ( you can see it with a cocoon view)
We are using Xalan now but we still have the same problem.
Hope this helps the solving. 
Best regards.

Tibor


Flow
*****************************
 var form = new Form("cocoon:/forms/login_model.xml"+rolepar);
 form.showForm("login-form.html");
*****************************

our pipe
****************************
<map:match pattern="**-form.html">
<map:generate type="jx" src="forms/{1}_template.xml" label="display"/>
***************************

Login template
**************************
<?xml version="1.0" encoding="UTF-8"?>
<page xmlns:ft="http://apache.org/cocoon/forms/1.0#template"
    xmlns:fi="http://apache.org/cocoon/forms/1.0#instance"
    xmlns:jx="http://apache.org/cocoon/templates/jx/1.0"
xmlns:i18n="http://apache.org/cocoon/i18n/2.1">
    <!-- Import the macros that define CForms template elements -->
    <jx:import
uri="resource://org/apache/cocoon/forms/generation/jx-macros.xml"/>
    <head>
        <title>
            <i18n:text key="login">Login</i18n:text>
        </title>
        <css href="/css/forms.css"/>
        <css href="/css/login.css"/>
        <script>
        //pour la validation coté client repose ici pour
l'internationalisation    
        var validation_msg_validation_head = "<i18n:text key="valerrors"/>";
        var validation_exc_mandatory = "<i18n:text key="valmandatory"/>";
        var validation_exc_number_format = "<i18n:text key="valnumber"/>";
        var validation_exc_date_format = "<i18n:text key="valdate"/>";
        </script>
        <script language="javascript" src="/resources/javascript/date.js"/>
        <script language="javascript"
src="/resources/javascript/clientside-validation.js"/>
    </head>
    <top>
        <p class="title">
            <i18n:text key="welcome"/>
        </p>
    </top>
    <content>
        <ft:form-template action="${cocoon.continuation.id}.continue"
            method="post" name="loginform">
            <p class="explain">
                <i18n:text key="parag_login"/>
            </p>
            <div class="contain-widget">
                <div class="form">
                    <table>
                        <tr>
                            <td class="lbl">
                                <label for="username">
                                    <i18n:text key="username"/>
                                </label>
                            </td>
                            <td>
                                <ft:widget id="username">
                                    <fi:styling/>
                                </ft:widget>
                            </td>
                        </tr>
                        <tr>
                            <td class="lbl">
                                <label for="password">
                                    <i18n:text key="password"/>
                                </label>
                            </td>
                            <td>
                                <ft:widget id="password">
                                    <fi:styling type="password"
onkeypress="javascript:if(event.keyCode==13)validation_execute();"/>
                                </ft:widget>
                            </td>
                        </tr>
                    </table>
                </div>
                <div class="button">
                    <a href="javascript:validation_execute();">
                        <i18n:text key="login"/>
                    </a><br/>
                    <a href="/forgotpwd" title="hint_forgotpwd"
i18n:attr="title">
                        <i18n:text key="forgotpwd"/>
                    </a>
                    <a href="/${cocoon.request.role}_registerprocess"
title="hint_register" i18n:attr="title">
                        <i18n:text key="register"/>
                    </a>
                </div>
            </div>
            <!-- <p class="explain">
                <i18n:text key="parag_createaccount"/>
            </p>
            <div class="div_createaccount button">
                <a href="/owner_registerprocess" title="hint_becomeowner"
i18n:attr="title">
                    <i18n:text key="addyourproperty"/>
                </a>
                <a href="/user_registerprocess" title="hint_becomeuser"
i18n:attr="title">
                    <i18n:text key="jointravelclub"/>
                </a>
            </div> -->
            <p class="explain">
                <span>
                    <i18n:text key="securitynotice"/>
                </span>: <i18n:text key="parag_sessioncut"/>
            </p>
            <!-- <div id="waitdiv" class="wait">
                <p class="bold textbig">
                    <i18n:text key="parag_wait1"/>
                    <br/>
                    <i18n:text key="parag_wait2"/>
                    <br/>
                    <i18n:text key="parag_wait3"/>
                    <br/>Eurobba</p>
            </div> -->
        </ft:form-template>
    </content>
</page>


Login Model
**********************************
<?xml version="1.0" encoding="UTF-8"?>
<!--
-->
<fd:form xmlns:fd="http://apache.org/cocoon/forms/1.0#definition"
xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
xmlns:jx="http://apache.org/cocoon/templates/jx/1.0">
    <fd:widgets>
        <fd:field id="username" required="true">
            <fd:label>
                <i18n:text key="username"/>
            </fd:label>
            <fd:datatype base="string"/>
        </fd:field>
        <fd:field id="password" required="true">
            <fd:label>
                <i18n:text key="password"/>
            </fd:label>
            <fd:validation>
                <jx:choose>
                    <jx:when test="${cocoon.parameters.role != ''}">
                        <fd:auth username="username" password="password"
handler="${cocoon.parameters.handler}" role="${cocoon.parameters.role}"/>
                    </jx:when>
                    <jx:otherwise>
                        <fd:auth username="username" password="password"
handler="${cocoon.parameters.handler}"/>
                    </jx:otherwise>
                </jx:choose>
            </fd:validation>
            <fd:datatype base="string"/>
            <!--<fd:datatype base="digest">
                <fd:convertor>
                   <fd:digest algorithm="" salt="" encode=""/>
                </fd:convertor>
            </fd:datatype>-->
        </fd:field>
    </fd:widgets>
</fd:form>


Sylvain Wallez wrote:

> oceatoon wrote:
> 
>>>>>>Is anybody aware  of such a thing as JX  generating a weirds
>>>>>>namespaces?? <head xmlns:%@$#^@#="%@$#^@#">
>>>>>>          
>>>>>>
>>>>>Yes, and  this has  already been reported.   But AFAICT  it is
>>>>>*not* blocking.  You may be facing another problem without any
>>>>>relation to this namespace oddity.
>>>>>        
>>>>>
>>>>Do you have a bugid for this?
>>>>      
>>>>
>>>I don't  think so.  This  issue has been  discussed on the  list a
>>>couple of months ago.
>>>    
>>>
>>
>>Have there been any solutions emitted for this ?
>>Because we have swapped to Saxon but we still have the weird namespace
>>hanging around??
>>on top of that Saxon verboses quite a lot about our xsl rules(especially
>>ones for cforms) and is even bloquing to go through some of them. My idea
>>was to fusion all the stylesheets together but this is impossible because
>>of this namespace problem. The fact that the stylesheets are decomposed in
>>three layers (page advanced and field) is a good hack to get around the
>>namespace pb, but in our project we'll need to fusion all this together at
>>one point or another.
>>
>>I am quite blocked on this problem
>> If anybody has any other ideas I'd be gratefull to hear them.
>>  
>>
> 
> It would be useful if you could provide us with a simple sample that
> shows the error. That would help to find who's producing this strange
> thing and fix it.
> 
> Sylvain
> 



Mime
View raw message