XForms generated by XSLT in Firefox

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

XForms generated by XSLT in Firefox

Josh-2007
Hi all,

I've been dealing with this problem for a few days now, and I'm still can't find what I'm doing wrong.

I'm creating an XForms form, from an xml source by using XSLT.
If I load the file on Firefox, - submit - button - select - and - event - don't work.
Furthermore, the generated source in Firefox 2 is a real mess with missing tags althought it's just fine transformed with Xalan or Saxon8B.
I didn't see a similar problem in any forum I came through. If someone finds the problem, it would be of a great help.

Here are a sample of the xml file and the xslt :

XML file=>

"<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="XSL-XForms.xsl"
     version="2.0"?>
    <element id="e2" designId="element" dynamismId="d1" interactionId="i1">
        <form id="form1">
            <content>
                <namespaces xmlns="http://www.w3.org/1999/xhtml" xmlns:ev="http://www.w3.org/2001/xml-events" xmlns:xf="http://www.w3.org/2002/xforms"/>
                <head>
                    <title/>
                    <model>
                        <instance>
                            <user>
                                <username/>
                                <password/>
                                <selectTest1/>
                                <selectTest2/>
                                <selectTest3/>
                            </user>
                        </instance>
                        <submission id="subscribe" method="post" action="file:///C:/Users//Desktop/Sans%20titre2.xml"/>
                    </model>
                </head>
                <body>
                    <legend>System Subscribe</legend>
                    <invite>Enter your username and password</invite>
                    <br/>
                    <input ref="username" incremental="true">
                        <label>Username:</label>
                        <message level="ephemeral" event="DOMFocusIn">event test.</message>
                    </input>
                    <br/>
                    <secret ref="password" incremental="true">
                        <label>Password:</label>
                    </secret>
                    <br/>
                    <select1 ref="selectTest1">
                        <label>Select1 test:</label>
                            <item>
                                <label>test1</label>
                                <value>t1</value>
                            </item>
                            <item>
                                <label>test2</label>
                                <value>t2</value>
                            </item>
                            <item>
                                <label>test3</label>
                                <value>t3</value>
                            </item>
                    </select1>
                    <select ref="selectTest2" appearance="minimal">
                        <label>Select test:</label>
                        <item>
                            <label>test 1</label>
                            <value>t1</value>
                        </item>
                        <item>
                            <label>test 2</label>
                            <value>t2</value>
                        </item>
                        <item>
                            <label>test 3</label>
                            <value>t3</value>
                        </item>
                    </select>
                    <select ref="selectTest3" appearance="full">
                        <label>Select test 3:</label>
                        <item>
                            <label>test1</label>
                            <value>t1</value>
                        </item>
                        <item>
                            <label>test2</label>
                            <value>t2</value>
                        </item>
                        <item>
                            <label>test3</label>
                            <value>t3</value>
                        </item>
                    </select>
                    <submit submission="subscribe">
                        <label>Subscribe</label>
                    </submit>
                    <br/>
                </body>
            </content>
        </form>
    </element>

XSLT file =>

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0"
    xmlns="http://www.w3.org/1999/xhtml"
    xmlns:xf="http://www.w3.org/2002/xforms"
    xmlns:ev="http://www.w3.org/2001/xml-events">
    <xsl:output method="html" omit-xml-declaration="yes"/>
   
   
    <xsl:template match="/">
        <html>
            <xsl:if test="./descendant::*/form">
                <xsl:copy-of select="*/descendant::*/form/namespaces/attribute::*"/>
            </xsl:if>
            <head>
                <title/>
                <xsl:if test="./descendant::*/form">
                    <xsl:call-template name="formHead">
                        <xsl:with-param name="node" select="./descendant::*/form/content/head"/>
                    </xsl:call-template>
                </xsl:if>
            </head>
            <body>
                <xsl:call-template name="formBody">
                    <xsl:with-param name="node" select="./descendant::*/form"/>
                </xsl:call-template>
            </body>
        </html>
    </xsl:template>

    <xsl:template name="formHead">
        <xsl:param name="node"/>
        <xsl:if test="$node/model">
            <xf:model>
                <xsl:copy-of select="$node/attribute::*"/>
                <xsl:for-each select="$node/model/child::node()">
                    <xsl:choose>
                        <xsl:when test="self::*=self::instance">
                            <xf:instance>
                                <xsl:copy-of select="./*"/>
                            </xf:instance>
                        </xsl:when>
                        <xsl:when test="self::*=self::submission">
                            <xf:submission>
                                <xsl:copy-of select="./attribute::*"/>
                            </xf:submission>
                        </xsl:when>
                    </xsl:choose>
                </xsl:for-each>
            </xf:model>
        </xsl:if>
    </xsl:template>
   
    <xsl:template name="formBody">
        <xsl:param name="node"/>
        <div class="form" id="{$node/@id}">
            <body>
                <xsl:for-each select="$node/content/body/child::node()">
                    <xsl:choose>
                        <xsl:when test="self::*=self::input">
                            <xsl:call-template name="formInput">
                                <xsl:with-param name="node" select="."/>
                            </xsl:call-template>
                        </xsl:when>
                        <xsl:when test="self::*=self::secret">
                            <xsl:call-template name="formSecret">
                                <xsl:with-param name="node" select="."/>
                            </xsl:call-template>
                        </xsl:when>
                        <xsl:when test="self::*=self::submit">
                            <xsl:call-template name="formSubmit">
                                <xsl:with-param name="node" select="."/>
                            </xsl:call-template>
                        </xsl:when>
                        <xsl:when test="self::*=self::legend">
                            <xsl:copy-of select="."/>
                        </xsl:when>
                        <xsl:when test="self::*=self::invite">
                            <xsl:copy-of select="."/>
                        </xsl:when>
                        <xsl:when test="self::*=self::br">
                            <br/>
                        </xsl:when>
                        <xsl:when test="self::*=self::select1">
                            <xsl:call-template name="formSelect1">
                                <xsl:with-param name="node" select="."/>
                            </xsl:call-template>
                        </xsl:when>
                        <xsl:when test="self::*=self::select">
                            <xsl:call-template name="formSelect">
                                <xsl:with-param name="node" select="."/>
                            </xsl:call-template>
                        </xsl:when>
                    </xsl:choose>
                </xsl:for-each>
            </body>
        </div>
    </xsl:template>
   
    <xsl:template name="formInput">
        <xsl:param name="node"/>
        <xf:input>
            <xsl:copy-of select="./attribute::*"/>
            <xsl:for-each select="./child::node()">
                <xsl:choose>
                    <xsl:when test="self::*=self::label">
                        <xsl:call-template name="formLabel">
                            <xsl:with-param name="node" select="."/>
                        </xsl:call-template>
                    </xsl:when>
                    <xsl:when test="self::*=self::message">
                        <xsl:call-template name="formMessage">
                            <xsl:with-param name="node" select="."/>
                        </xsl:call-template>
                    </xsl:when>
                    <xsl:otherwise>
                        <xsl:copy-of select="."/>
                    </xsl:otherwise>
                </xsl:choose>
            </xsl:for-each>
        </xf:input>
    </xsl:template>
   
    <xsl:template name="formSecret">
        <xsl:param name="node"/>
        <xf:secret>
            <xsl:copy-of select="./attribute::*"/>
            <xsl:for-each select="./child::node()">
                <xsl:choose>
                    <xsl:when test="self::*=self::label">
                        <xsl:call-template name="formLabel">
                            <xsl:with-param name="node" select="."/>
                        </xsl:call-template>
                    </xsl:when>
                    <xsl:when test="self::*=self::message">
                        <xsl:call-template name="formMessage">
                            <xsl:with-param name="node" select="."/>
                        </xsl:call-template>
                    </xsl:when>
                    <xsl:otherwise>
                        <xsl:copy-of select="."/>
                    </xsl:otherwise>
                </xsl:choose>
            </xsl:for-each>
        </xf:secret>
    </xsl:template>
   
    <xsl:template name="formSubmit">
        <xsl:param name="node"/>
        <xf:submit>
            <xsl:copy-of select="./attribute::*"/>
            <xsl:for-each select="./child::node()">
                <xsl:choose>
                    <xsl:when test="self::*=self::label">
                        <xsl:call-template name="formLabel">
                            <xsl:with-param name="node" select="."/>
                        </xsl:call-template>
                    </xsl:when>
                    <xsl:otherwise>
                        <xsl:copy-of select="."/>
                    </xsl:otherwise>
                </xsl:choose>
            </xsl:for-each>
        </xf:submit>
    </xsl:template>
   
    <xsl:template name="formSelect1">
        <xsl:param name="node"/>
        <xf:select1>
            <xsl:copy-of select="./attribute::*"/>
            <xsl:for-each select="./child::node()">
                <xsl:choose>
                    <xsl:when test="self::*=self::item">
                        <xf:item>
                            <xsl:copy-of select="./attribute::*"/>                            <xsl:for-each select="./child::node()">
                                <xsl:choose>
                                    <xsl:when test="self::*=self::label">
                                        <xsl:call-template name="formLabel">
                                            <xsl:with-param name="node" select="."/>
                                        </xsl:call-template>
                                    </xsl:when>
                                    <xsl:when test="self::*=self::value">
                                        <xsl:call-template name="formValue">
                                            <xsl:with-param name="node" select="."/>
                                        </xsl:call-template>
                                    </xsl:when>
                                    <xsl:otherwise>
                                        <xsl:copy-of select="."/>
                                    </xsl:otherwise>
                                </xsl:choose>
                            </xsl:for-each>
                        </xf:item>
                    </xsl:when>
                    <xsl:otherwise>
                        <xsl:copy-of select="."/>
                    </xsl:otherwise>
                </xsl:choose>
            </xsl:for-each>
        </xf:select1>
    </xsl:template>
   
    <xsl:template name="formSelect">
        <xsl:param name="node"/>
        <xf:select>
            <xsl:copy-of select="./attribute::*"/>
            <xsl:for-each select="./child::node()">
                <xsl:choose>
                    <xsl:when test="self::*=self::item">
                        <xf:item>
                            <xsl:copy-of select="./attribute::*"/>
                            <xsl:for-each select="./child::node()">
                                <xsl:choose>
                                    <xsl:when test="self::*=self::label">
                                        <xsl:call-template name="formLabel">
                                            <xsl:with-param name="node" select="."/>
                                        </xsl:call-template>
                                    </xsl:when>
                                    <xsl:when test="self::*=self::value">
                                        <xsl:call-template name="formValue">
                                            <xsl:with-param name="node" select="."/>
                                        </xsl:call-template>
                                    </xsl:when>
                                    <xsl:otherwise>
                                        <xsl:copy-of select="."/>
                                    </xsl:otherwise>
                                </xsl:choose>
                            </xsl:for-each>
                        </xf:item>
                    </xsl:when>
                    <xsl:otherwise>
                        <xsl:copy-of select="."/>
                    </xsl:otherwise>
                </xsl:choose>
            </xsl:for-each>
        </xf:select>
    </xsl:template>
   
    <xsl:template name="formLabel">
        <xsl:param name="node"/>
        <xf:label>
            <xsl:copy-of select="./text()"/>
        </xf:label>
    </xsl:template>
   
    <xsl:template name="formValue">
        <xsl:param name="node"/>
        <xf:value>
            <xsl:copy-of select="./text()"/>
        </xf:value>
    </xsl:template>
   
    <xsl:template name="formMessage">
        <xsl:param name="node"/>
        <xf:message>
            <xsl:copy-of select="./attribute::level"/>
            <xsl:copy-of select="./attribute::model"/>
            <xsl:attribute name="ev:event" select="./attribute::event"/>
            <xsl:copy-of select="./text()"/>
        </xf:message>
    </xsl:template>
   
</xsl:stylesheet>

Rendering with Saxon8B =>

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:xf="http://www.w3.org/2002/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
   <head>
      <title></title>
      <xf:model>
         <xf:instance>
            <user xmlns="">
               
               <username></username>
               
               <password></password>
               
               <selectTest1></selectTest1>
               
               <selectTest2></selectTest2>
               
               <selectTest3></selectTest3>
               
            </user>
         </xf:instance>
         <xf:submission id="subscribe" method="post" action="file:///C:/Users//Desktop/Sans%20titre2.xml"></xf:submission>
      </xf:model>
   </head>
   <body>
      <div class="form" id="form1">
         <body>
            <legend xmlns="">System Subscribe</legend>
            <invite xmlns="">Enter your username and password</invite><br></br><xf:input ref="username" incremental="true">
               
               <xf:label>Username:</xf:label>
               
               <xf:message level="ephemeral" ev:event="DOMFocusIn">event test.</xf:message>
               
            </xf:input><br></br><xf:secret ref="password" incremental="true">
               
               <xf:label>Password:</xf:label>
               
            </xf:secret><br></br><xf:select1 ref="selectTest1">
               <label xmlns="">Select1 test:</label>
               
               <xf:item>
                 
                  <xf:label>test1</xf:label>
                 
                  <xf:value>t1</xf:value>
                 
               </xf:item>
               
               <xf:item>
                 
                  <xf:label>test2</xf:label>
                 
                  <xf:value>t2</xf:value>
                 
               </xf:item>
               
               <xf:item>
                 
                  <xf:label>test3</xf:label>
                 
                  <xf:value>t3</xf:value>
                 
               </xf:item>
               
            </xf:select1>
            <xf:select ref="selectTest2" appearance="minimal">
               <label xmlns="">Select test:</label>
               
               <xf:item>
                 
                  <xf:label>test 1</xf:label>
                 
                  <xf:value>t1</xf:value>
                 
               </xf:item>
               
               <xf:item>
                 
                  <xf:label>test 2</xf:label>
                 
                  <xf:value>t2</xf:value>
                 
               </xf:item>
               
               <xf:item>
                 
                  <xf:label>test 3</xf:label>
                 
                  <xf:value>t3</xf:value>
                 
               </xf:item>
               
            </xf:select>
            <xf:select ref="selectTest3" appearance="full">
               <label xmlns="">Select test 3:</label>
               
               <xf:item>
                 
                  <xf:label>test1</xf:label>
                 
                  <xf:value>t1</xf:value>
                 
               </xf:item>
               
               <xf:item>
                 
                  <xf:label>test2</xf:label>
                 
                  <xf:value>t2</xf:value>
                 
               </xf:item>
               
               <xf:item>
                 
                  <xf:label>test3</xf:label>
                 
                  <xf:value>t3</xf:value>
                 
               </xf:item>
               
            </xf:select>
            <xf:submit submission="subscribe">
               
               <xf:label>Subscribe</xf:label>
               
            </xf:submit><br></br></body>
      </div>
   </body>
</html>

Just fine!

But rendering in Firefox =>

<html><head><meta content="text/html; charset=UTF-8" http-equiv="Content-Type"><title></title><model><instance><user>
                                <username></username>
                                <password></password>
                                <selecttest1></selecttest1>
                                <selecttest2></selecttest2>
                                <selecttest3></selecttest3>
                            </user></instance><submission action="file:///C:/Users//Desktop/Sans%20titre2.xml" method="post" id="subscribe"></submission></model></head><body><div id="form1" class="form"><body><legend>System Subscribe</legend><invite>Enter your username and password</invite><br><input incremental="true" ref="username">

                        <label>Username:</label>
                        <message event="" level="ephemeral">event test.</message>
                    <br><secret incremental="true" ref="password">
                        <label>Password:</label>
                    </secret><br><select1 ref="selectTest1">
                        <label>Select1 test:</label>
                            <item>

                                <label>test1</label>
                                <value>t1</value>
                            </item>
                            <item>
                                <label>test2</label>
                                <value>t2</value>
                            </item>

                            <item>
                                <label>test3</label>
                                <value>t3</value>
                            </item>
                    </select1><select appearance="minimal" ref="selectTest2">
                        <label>Select test:</label>
                        <item>

                            <label>test 1</label>
                            <value>t1</value>
                        </item>
                        <item>
                            <label>test 2</label>
                            <value>t2</value>
                        </item>

                        <item>
                            <label>test 3</label>
                            <value>t3</value>
                        </item>
                    </select><select appearance="full" ref="selectTest3">
                        <label>Select test 3:</label>
                        <item>

                            <label>test1</label>
                            <value>t1</value>
                        </item>
                        <item>
                            <label>test2</label>
                            <value>t2</value>
                        </item>

                        <item>
                            <label>test3</label>
                            <value>t3</value>
                        </item>
                    </select><submit submission="subscribe">
                        <label>Subscribe</label>
                    </submit><br></body></div></body></html>"

Select2 and Select3 don't work
Submit does'nt work either as long as event messages... notice the attribute - event - is empty in the Firefox generated source although it was filled in the XML and is fine with Saxon 8B.

So, any idea?


Reply | Threaded
Open this post in threaded view
|

Re: XForms generated by XSLT in Firefox

Alessandro Vernet
Administrator
Hi,

You are using XSLT to generate XForms. So this XSLT has to run before
the XForms engine kicks in. If you are using Orbeon Forms, the XForms
engine is running on the server-side. So sending the XML/XSLT to
Firefox won't work. Usually, on the server-side, you will run XSLT
first, and then XForms, and what gets sent to the browser is "just
HTML". Does this make sense, or have I misunderstood your scenario?

Alex

On 4/11/07, Josh-2007 <[hidden email]> wrote:

>
> Hi all,
>
> I've been dealing with this problem for a few days now, and I'm still can't
> find what I'm doing wrong.
>
> I'm creating an XForms form, from an xml source by using XSLT.
> If I load the file on Firefox, - submit - button - select - and - event -
> don't work.
> Furthermore, the generated source in Firefox 2 is a real mess with missing
> tags althought it's just fine transformed with Xalan or Saxon8B.
> I didn't see a similar problem in any forum I came through. If someone finds
> the problem, it would be of a great help.
>
> Here are a sample of the xml file and the xslt :
>
> XML file=>
>
> "<?xml version="1.0" encoding="UTF-8"?>
> <?xml-stylesheet type="text/xsl" href="XSL-XForms.xsl"
>      version="2.0"?>
>     <element id="e2" designId="element" dynamismId="d1" interactionId="i1">
>         <form id="form1">
>             <content>
>                 <namespaces xmlns="http://www.w3.org/1999/xhtml"
> xmlns:ev="http://www.w3.org/2001/xml-events"
> xmlns:xf="http://www.w3.org/2002/xforms"/>
>                 <head>
>                     <title/>
>                     <model>
>                         <instance>
>                             <user>
>                                 <username/>
>                                 <password/>
>                                 <selectTest1/>
>                                 <selectTest2/>
>                                 <selectTest3/>
>                             </user>
>                         </instance>
>                         <submission id="subscribe" method="post"
> action="file:///C:/Users//Desktop/Sans%20titre2.xml"/>
>                     </model>
>                 </head>
>                 <body>
>                     <legend>System Subscribe</legend>
>                     <invite>Enter your username and password</invite>
>                     <br/>
>                     <input ref="username" incremental="true">
>                         <label>Username:</label>
>                         <message level="ephemeral" event="DOMFocusIn">event
> test.</message>
>                     </input>
>                     <br/>
>                     <secret ref="password" incremental="true">
>                         <label>Password:</label>
>                     </secret>
>                     <br/>
>                     <select1 ref="selectTest1">
>                         <label>Select1 test:</label>
>                             <item>
>                                 <label>test1</label>
>                                 <value>t1</value>
>                             </item>
>                             <item>
>                                 <label>test2</label>
>                                 <value>t2</value>
>                             </item>
>                             <item>
>                                 <label>test3</label>
>                                 <value>t3</value>
>                             </item>
>                     </select1>
>                     <select ref="selectTest2" appearance="minimal">
>                         <label>Select test:</label>
>                         <item>
>                             <label>test 1</label>
>                             <value>t1</value>
>                         </item>
>                         <item>
>                             <label>test 2</label>
>                             <value>t2</value>
>                         </item>
>                         <item>
>                             <label>test 3</label>
>                             <value>t3</value>
>                         </item>
>                     </select>
>                     <select ref="selectTest3" appearance="full">
>                         <label>Select test 3:</label>
>                         <item>
>                             <label>test1</label>
>                             <value>t1</value>
>                         </item>
>                         <item>
>                             <label>test2</label>
>                             <value>t2</value>
>                         </item>
>                         <item>
>                             <label>test3</label>
>                             <value>t3</value>
>                         </item>
>                     </select>
>                     <submit submission="subscribe">
>                         <label>Subscribe</label>
>                     </submit>
>                     <br/>
>                 </body>
>             </content>
>         </form>
>     </element>
>
> XSLT file =>
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> version="2.0"
>     xmlns="http://www.w3.org/1999/xhtml"
>     xmlns:xf="http://www.w3.org/2002/xforms"
>     xmlns:ev="http://www.w3.org/2001/xml-events">
>     <xsl:output method="html" omit-xml-declaration="yes"/>
>     <!--  turn the final xml page into xhtml -->
>
>     <xsl:template match="/">
>         <html>
>             <xsl:if test="./descendant::*/form"><!-- search for a form in
> the tree -->
>                 <xsl:copy-of
> select="*/descendant::*/form/namespaces/attribute::*"/><!-- copy the
> namespaces -->
>             </xsl:if>
>             <head>
>                 <title/>
>                 <xsl:if test="./descendant::*/form"><!-- search for a form
> in the tree -->
>                     <xsl:call-template name="formHead"><!-- copy the XForms
> model -->
>                         <xsl:with-param name="node"
> select="./descendant::*/form/content/head"/>
>                     </xsl:call-template>
>                 </xsl:if>
>             </head>
>             <body>
>                 <xsl:call-template name="formBody"><!-- copy the body of the
> XForms -->
>                     <xsl:with-param name="node"
> select="./descendant::*/form"/>
>                 </xsl:call-template>
>             </body>
>         </html>
>     </xsl:template>
>
>     <xsl:template name="formHead">
>         <xsl:param name="node"/>
>         <xsl:if test="$node/model">
>             <xf:model>
>                 <xsl:copy-of select="$node/attribute::*"/><!-- copy model
> attributes -->
>                 <xsl:for-each select="$node/model/child::node()">
>                     <xsl:choose>
>                         <xsl:when test="self::*=self::instance">
>                             <xf:instance><!-- copy any instance -->
>                                 <xsl:copy-of select="./*"/>
>                             </xf:instance>
>                         </xsl:when>
>                         <xsl:when test="self::*=self::submission">
>                             <xf:submission><!-- copy submission -->
>                                 <xsl:copy-of select="./attribute::*"/>
>                             </xf:submission>
>                         </xsl:when>
>                     </xsl:choose>
>                 </xsl:for-each>
>             </xf:model>
>         </xsl:if>
>     </xsl:template>
>
>     <xsl:template name="formBody">
>         <xsl:param name="node"/>
>         <div class="form" id="{$node/@id}">
>             <body>
>                 <xsl:for-each select="$node/content/body/child::node()">
>                     <xsl:choose>
>                         <xsl:when test="self::*=self::input">
>                             <xsl:call-template name="formInput"><!-- copy
> any input -->
>                                 <xsl:with-param name="node" select="."/>
>                             </xsl:call-template>
>                         </xsl:when>
>                         <xsl:when test="self::*=self::secret">
>                             <xsl:call-template name="formSecret"><!-- copy
> any secret -->
>                                 <xsl:with-param name="node" select="."/>
>                             </xsl:call-template>
>                         </xsl:when>
>                         <xsl:when test="self::*=self::submit">
>                             <xsl:call-template name="formSubmit"><!-- copy
> any submit -->
>                                 <xsl:with-param name="node" select="."/>
>                             </xsl:call-template>
>                         </xsl:when>
>                         <xsl:when test="self::*=self::legend">
>                             <xsl:copy-of select="."/><!-- copy any legend
> -->
>                         </xsl:when>
>                         <xsl:when test="self::*=self::invite">
>                             <xsl:copy-of select="."/><!-- copy any invite -
> description text -->
>                         </xsl:when>
>                         <xsl:when test="self::*=self::br"><!-- useless but
> here to fix a problem with Firefox -->
>                             <br/>
>                         </xsl:when>
>                         <xsl:when test="self::*=self::select1">
>                             <xsl:call-template name="formSelect1"><!-- copy
> any Select1 -->
>                                 <xsl:with-param name="node" select="."/>
>                             </xsl:call-template>
>                         </xsl:when>
>                         <xsl:when test="self::*=self::select">
>                             <xsl:call-template name="formSelect"><!-- copy
> any Select -->
>                                 <xsl:with-param name="node" select="."/>
>                             </xsl:call-template>
>                         </xsl:when>
>                     </xsl:choose>
>                 </xsl:for-each>
>             </body>
>         </div>
>     </xsl:template>
>
>     <xsl:template name="formInput">
>         <xsl:param name="node"/>
>         <xf:input>
>             <xsl:copy-of select="./attribute::*"/><!-- copy attributes -->
>             <xsl:for-each select="./child::node()">
>                 <xsl:choose>
>                     <xsl:when test="self::*=self::label">
>                         <xsl:call-template name="formLabel"><!-- copy label
> -->
>                             <xsl:with-param name="node" select="."/>
>                         </xsl:call-template>
>                     </xsl:when>
>                     <xsl:when test="self::*=self::message"><!-- copy message
> event -->
>                         <xsl:call-template name="formMessage">
>                             <xsl:with-param name="node" select="."/>
>                         </xsl:call-template>
>                     </xsl:when>
>                     <xsl:otherwise>
>                         <xsl:copy-of select="."/>
>                     </xsl:otherwise>
>                 </xsl:choose>
>             </xsl:for-each>
>         </xf:input>
>     </xsl:template>
>
>     <xsl:template name="formSecret">
>         <xsl:param name="node"/>
>         <xf:secret>
>             <xsl:copy-of select="./attribute::*"/><!-- copy attributes -->
>             <xsl:for-each select="./child::node()">
>                 <xsl:choose>
>                     <xsl:when test="self::*=self::label">
>                         <xsl:call-template name="formLabel"><!-- copy label
> -->
>                             <xsl:with-param name="node" select="."/>
>                         </xsl:call-template>
>                     </xsl:when>
>                     <xsl:when test="self::*=self::message">
>                         <xsl:call-template name="formMessage"><!-- copy
> message event -->
>                             <xsl:with-param name="node" select="."/>
>                         </xsl:call-template>
>                     </xsl:when>
>                     <xsl:otherwise>
>                         <xsl:copy-of select="."/>
>                     </xsl:otherwise>
>                 </xsl:choose>
>             </xsl:for-each>
>         </xf:secret>
>     </xsl:template>
>
>     <xsl:template name="formSubmit">
>         <xsl:param name="node"/>
>         <xf:submit>
>             <xsl:copy-of select="./attribute::*"/><!-- copy attributes -->
>             <xsl:for-each select="./child::node()">
>                 <xsl:choose>
>                     <xsl:when test="self::*=self::label">
>                         <xsl:call-template name="formLabel"><!-- copy label
> -->
>                             <xsl:with-param name="node" select="."/>
>                         </xsl:call-template>
>                     </xsl:when>
>                     <xsl:otherwise>
>                         <xsl:copy-of select="."/>
>                     </xsl:otherwise>
>                 </xsl:choose>
>             </xsl:for-each>
>         </xf:submit>
>     </xsl:template>
>
>     <xsl:template name="formSelect1">
>         <xsl:param name="node"/>
>         <xf:select1>
>             <xsl:copy-of select="./attribute::*"/><!-- copy attributes -->
>             <xsl:for-each select="./child::node()">
>                 <xsl:choose>
>                     <xsl:when test="self::*=self::item">
>                         <xf:item>
>                             <xsl:copy-of select="./attribute::*"/><!-- copy
> attributes -->                            <xsl:for-each
> select="./child::node()">
>                                 <xsl:choose>
>                                     <xsl:when test="self::*=self::label">
>                                         <xsl:call-template
> name="formLabel"><!-- copy label -->
>                                             <xsl:with-param name="node"
> select="."/>
>                                         </xsl:call-template>
>                                     </xsl:when>
>                                     <xsl:when test="self::*=self::value">
>                                         <xsl:call-template name="formValue">
>                                             <xsl:with-param name="node"
> select="."/>
>                                         </xsl:call-template>
>                                     </xsl:when>
>                                     <xsl:otherwise>
>                                         <xsl:copy-of select="."/>
>                                     </xsl:otherwise>
>                                 </xsl:choose>
>                             </xsl:for-each>
>                         </xf:item>
>                     </xsl:when>
>                     <xsl:otherwise>
>                         <xsl:copy-of select="."/>
>                     </xsl:otherwise>
>                 </xsl:choose>
>             </xsl:for-each>
>         </xf:select1>
>     </xsl:template>
>
>     <xsl:template name="formSelect">
>         <xsl:param name="node"/>
>         <xf:select>
>             <xsl:copy-of select="./attribute::*"/><!-- copy attributes -->
>             <xsl:for-each select="./child::node()">
>                 <xsl:choose>
>                     <xsl:when test="self::*=self::item">
>                         <xf:item>
>                             <xsl:copy-of select="./attribute::*"/><!-- copy
> attributes -->
>                             <xsl:for-each select="./child::node()">
>                                 <xsl:choose>
>                                     <xsl:when test="self::*=self::label">
>                                         <xsl:call-template
> name="formLabel"><!-- copy label -->
>                                             <xsl:with-param name="node"
> select="."/>
>                                         </xsl:call-template>
>                                     </xsl:when>
>                                     <xsl:when test="self::*=self::value">
>                                         <xsl:call-template name="formValue">
>                                             <xsl:with-param name="node"
> select="."/>
>                                         </xsl:call-template>
>                                     </xsl:when>
>                                     <xsl:otherwise>
>                                         <xsl:copy-of select="."/>
>                                     </xsl:otherwise>
>                                 </xsl:choose>
>                             </xsl:for-each>
>                         </xf:item>
>                     </xsl:when>
>                     <xsl:otherwise>
>                         <xsl:copy-of select="."/>
>                     </xsl:otherwise>
>                 </xsl:choose>
>             </xsl:for-each>
>         </xf:select>
>     </xsl:template>
>
>     <xsl:template name="formLabel">
>         <xsl:param name="node"/>
>         <xf:label>
>             <xsl:copy-of select="./text()"/>
>         </xf:label>
>     </xsl:template>
>
>     <xsl:template name="formValue">
>         <xsl:param name="node"/>
>         <xf:value>
>             <xsl:copy-of select="./text()"/>
>         </xf:value>
>     </xsl:template>
>
>     <xsl:template name="formMessage">
>         <xsl:param name="node"/>
>         <xf:message>
>             <xsl:copy-of select="./attribute::level"/><!-- copy attribute
> level -->
>             <xsl:copy-of select="./attribute::model"/><!-- copy attribute
> model -->
>             <xsl:attribute name="ev:event" select="./attribute::event"/><!--
> create attribute event with namespace ev: -->
>             <xsl:copy-of select="./text()"/><!-- get event attribute value
> -->
>         </xf:message>
>     </xsl:template>
>
> </xsl:stylesheet>
>
> Rendering with Saxon8B =>
>
> <html xmlns="http://www.w3.org/1999/xhtml"
> xmlns:xf="http://www.w3.org/2002/xforms"
> xmlns:ev="http://www.w3.org/2001/xml-events">
>    <head>
>       <title></title>
>       <xf:model>
>          <xf:instance>
>             <user xmlns="">
>
>                <username></username>
>
>                <password></password>
>
>                <selectTest1></selectTest1>
>
>                <selectTest2></selectTest2>
>
>                <selectTest3></selectTest3>
>
>             </user>
>          </xf:instance>
>          <xf:submission id="subscribe" method="post"
> action="file:///C:/Users//Desktop/Sans%20titre2.xml"></xf:submission>
>       </xf:model>
>    </head>
>    <body>
>       <div class="form" id="form1">
>          <body>
>             <legend xmlns="">System Subscribe</legend>
>             <invite xmlns="">Enter your username and
> password</invite><br></br><xf:input ref="username" incremental="true">
>
>                <xf:label>Username:</xf:label>
>
>                <xf:message level="ephemeral" ev:event="DOMFocusIn">event
> test.</xf:message>
>
>             </xf:input><br></br><xf:secret ref="password"
> incremental="true">
>
>                <xf:label>Password:</xf:label>
>
>             </xf:secret><br></br><xf:select1 ref="selectTest1">
>                <label xmlns="">Select1 test:</label>
>
>                <xf:item>
>
>                   <xf:label>test1</xf:label>
>
>                   <xf:value>t1</xf:value>
>
>                </xf:item>
>
>                <xf:item>
>
>                   <xf:label>test2</xf:label>
>
>                   <xf:value>t2</xf:value>
>
>                </xf:item>
>
>                <xf:item>
>
>                   <xf:label>test3</xf:label>
>
>                   <xf:value>t3</xf:value>
>
>                </xf:item>
>
>             </xf:select1>
>             <xf:select ref="selectTest2" appearance="minimal">
>                <label xmlns="">Select test:</label>
>
>                <xf:item>
>
>                   <xf:label>test 1</xf:label>
>
>                   <xf:value>t1</xf:value>
>
>                </xf:item>
>
>                <xf:item>
>
>                   <xf:label>test 2</xf:label>
>
>                   <xf:value>t2</xf:value>
>
>                </xf:item>
>
>                <xf:item>
>
>                   <xf:label>test 3</xf:label>
>
>                   <xf:value>t3</xf:value>
>
>                </xf:item>
>
>             </xf:select>
>             <xf:select ref="selectTest3" appearance="full">
>                <label xmlns="">Select test 3:</label>
>
>                <xf:item>
>
>                   <xf:label>test1</xf:label>
>
>                   <xf:value>t1</xf:value>
>
>                </xf:item>
>
>                <xf:item>
>
>                   <xf:label>test2</xf:label>
>
>                   <xf:value>t2</xf:value>
>
>                </xf:item>
>
>                <xf:item>
>
>                   <xf:label>test3</xf:label>
>
>                   <xf:value>t3</xf:value>
>
>                </xf:item>
>
>             </xf:select>
>             <xf:submit submission="subscribe">
>
>                <xf:label>Subscribe</xf:label>
>
>             </xf:submit><br></br></body>
>       </div>
>    </body>
> </html>
>
> Just fine!
>
> But rendering in Firefox =>
>
> <html><head><meta content="text/html; charset=UTF-8"
> http-equiv="Content-Type"><title></title><model><instance><user>
>                                 <username></username>
>                                 <password></password>
>                                 <selecttest1></selecttest1>
>                                 <selecttest2></selecttest2>
>                                 <selecttest3></selecttest3>
>                             </user></instance><submission
> action="file:///C:/Users//Desktop/Sans%20titre2.xml" method="post"
> id="subscribe"></submission></model></head><body><div id="form1"
> class="form"><body><legend>System Subscribe</legend><invite>Enter your
> username and password</invite><br><input incremental="true" ref="username">
>
>                         <label>Username:</label>
>                         <message event="" level="ephemeral">event
> test.</message>
>                     <br><secret incremental="true" ref="password">
>                         <label>Password:</label>
>                     </secret><br><select1 ref="selectTest1">
>                         <label>Select1 test:</label>
>                             <item>
>
>                                 <label>test1</label>
>                                 <value>t1</value>
>                             </item>
>                             <item>
>                                 <label>test2</label>
>                                 <value>t2</value>
>                             </item>
>
>                             <item>
>                                 <label>test3</label>
>                                 <value>t3</value>
>                             </item>
>                     </select1><select appearance="minimal"
> ref="selectTest2">
>                         <label>Select test:</label>
>                         <item>
>
>                             <label>test 1</label>
>                             <value>t1</value>
>                         </item>
>                         <item>
>                             <label>test 2</label>
>                             <value>t2</value>
>                         </item>
>
>                         <item>
>                             <label>test 3</label>
>                             <value>t3</value>
>                         </item>
>                     </select><select appearance="full" ref="selectTest3">
>                         <label>Select test 3:</label>
>                         <item>
>
>                             <label>test1</label>
>                             <value>t1</value>
>                         </item>
>                         <item>
>                             <label>test2</label>
>                             <value>t2</value>
>                         </item>
>
>                         <item>
>                             <label>test3</label>
>                             <value>t3</value>
>                         </item>
>                     </select><submit submission="subscribe">
>                         <label>Subscribe</label>
>                     </submit><br></body></div></body></html>"
>
> Select2 and Select3 don't work
> Submit does'nt work either as long as event messages... notice the attribute
> - event - is empty in the Firefox generated source although it was filled in
> the XML and is fine with Saxon 8B.
>
> So, any idea?
>
>
>
> --
> View this message in context: http://www.nabble.com/XForms-generated-by-XSLT-in-Firefox-tf3561767.html#a9947566
> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>

--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: XForms generated by XSLT in Firefox

Josh-2007
Hi Alex,

Thanks for taking a look.
Actually I don't use Orbeon, I'm using the XForms extension of Firefox to get the rendering.
I send my xml file which includes a call to the XSLT transformer.
So I presume it is tranformed by XSLT before being output by Firefox.
The tricky point is the output difference between Saxon8B which is just fine (except the -select- buttons which doesn't work) and the generated source from Firefox (by web developper plug-in).
Firefox :
* put a 'meta' tag
* forget some closing tags ('/input' 'br/')
* doesn't show any of the defined namespaces (xforms and DOM event namespaces)
* doesn't show any prefixe xf: ev:
I'm wondering if the problem doesn't come from the messy transformation I get from Firefox and the lack of namespaces.
I attached the XSL transforme file along with the xml source

XSL-XForms.xsl
xml-form-source.xml


and here, you have the transformation result from Saxon8B and Firefox if you want to run the example:

firefox_source.xml
saxon8B.xml

Cheers,

Josh



<quote author='Alessandro Vernet'>
Hi,

You are using XSLT to generate XForms. So this XSLT has to run before
the XForms engine kicks in. If you are using Orbeon Forms, the XForms
engine is running on the server-side. So sending the XML/XSLT to
Firefox won't work. Usually, on the server-side, you will run XSLT
first, and then XForms, and what gets sent to the browser is "just
HTML". Does this make sense, or have I misunderstood your scenario?

Alex
Reply | Threaded
Open this post in threaded view
|

Re: XForms generated by XSLT in Firefox

Alessandro Vernet
Administrator
Hi Josh,

I don't have much recent experience running XSLT on the browser. For
most of the use cases I deal with, it just seems that running XSLT on
the server provides a more robust solution. You might want to try
asking the question on the Mozilla XForms list:

http://www.nabble.com/Mozilla---XForms-f20741.html

Alex

On 4/12/07, Josh-2007 <[hidden email]> wrote:

>
> Hi Alex,
>
> Thanks for taking a look.
> Actually I don't use Orbeon, I'm using the XForms extension of Firefox to
> get the rendering.
> I send my xml file which includes a call to the XSLT transformer.
> So I presume it is tranformed by XSLT before being output by Firefox.
> The tricky point is the output difference between Saxon8B which is just fine
> (except the -select- buttons which doesn't work) and the generated source
> from Firefox (by web developper plug-in).
> Firefox :
> * put a 'meta' tag
> * forget some closing tags ('/input' 'br/')
> * doesn't show any of the defined namespaces (xforms and DOM event
> namespaces)
> * doesn't show any prefixe xf: ev:
> I'm wondering if the problem doesn't come from the messy transformation I
> get from Firefox and the lack of namespaces.
> I attached the XSL transforme file along with the xml source
>
> http://www.nabble.com/file/7816/XSL-XForms.xsl XSL-XForms.xsl
> http://www.nabble.com/file/7827/xml-form-source.xml xml-form-source.xml
>
>
> and here, you have the transformation result from Saxon8B and Firefox if you
> want to run the example:
>
> http://www.nabble.com/file/7828/firefox_source.xml firefox_source.xml
> http://www.nabble.com/file/7829/saxon8B.xml saxon8B.xml
>
> Cheers,
>
> Josh
>
>
>
>
> Hi,
>
> You are using XSLT to generate XForms. So this XSLT has to run before
> the XForms engine kicks in. If you are using Orbeon Forms, the XForms
> engine is running on the server-side. So sending the XML/XSLT to
> Firefox won't work. Usually, on the server-side, you will run XSLT
> first, and then XForms, and what gets sent to the browser is "just
> HTML". Does this make sense, or have I misunderstood your scenario?
>
> Alex
>
> --
> View this message in context: http://www.nabble.com/XForms-generated-by-XSLT-in-Firefox-tf3561767.html#a9954340
> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.
>
>
>
>
> --
> You receive this message as a subscriber of the [hidden email] mailing list.
> To unsubscribe: mailto:[hidden email]
> For general help: mailto:[hidden email]?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>

--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: XForms generated by XSLT in Firefox

Josh-2007
Hi Alessandro,

Thanks for the information.
Actually I tried another way, I put directly the XForms in my XML main document, so XSLT don't have anything to do except copying the whole lines, and I got the same problem, the submission button doesn't work and when I take a look at the generated source with Web developper, it's not even a well formed xml with missing tags and no namespaces.
I'm installing formsplayer on ie to check if this problem is specific to firefox plug-in or if it's due to a mistake I made.
I'll let you know. In the meantime I'll submit the problem to Mozilla XForm list. Thanks for the advice.

Cheers,

Josh

Alessandro Vernet wrote
Hi Josh,

I don't have much recent experience running XSLT on the browser. For
most of the use cases I deal with, it just seems that running XSLT on
the server provides a more robust solution. You might want to try
asking the question on the Mozilla XForms list:

http://www.nabble.com/Mozilla---XForms-f20741.html

Alex

On 4/12/07, Josh-2007 <oumane2005@yahoo.fr> wrote:
>
> Hi Alex,
>
> Thanks for taking a look.
> Actually I don't use Orbeon, I'm using the XForms extension of Firefox to
> get the rendering.
> I send my xml file which includes a call to the XSLT transformer.
> So I presume it is tranformed by XSLT before being output by Firefox.
> The tricky point is the output difference between Saxon8B which is just fine
> (except the -select- buttons which doesn't work) and the generated source
> from Firefox (by web developper plug-in).
> Firefox :
> * put a 'meta' tag
> * forget some closing tags ('/input' 'br/')
> * doesn't show any of the defined namespaces (xforms and DOM event
> namespaces)
> * doesn't show any prefixe xf: ev:
> I'm wondering if the problem doesn't come from the messy transformation I
> get from Firefox and the lack of namespaces.
> I attached the XSL transforme file along with the xml source
>
> http://www.nabble.com/file/7816/XSL-XForms.xsl XSL-XForms.xsl
> http://www.nabble.com/file/7827/xml-form-source.xml xml-form-source.xml
>
>
> and here, you have the transformation result from Saxon8B and Firefox if you
> want to run the example:
>
> http://www.nabble.com/file/7828/firefox_source.xml firefox_source.xml
> http://www.nabble.com/file/7829/saxon8B.xml saxon8B.xml
>
> Cheers,
>
> Josh
>
>
>
>
> Hi,
>
> You are using XSLT to generate XForms. So this XSLT has to run before
> the XForms engine kicks in. If you are using Orbeon Forms, the XForms
> engine is running on the server-side. So sending the XML/XSLT to
> Firefox won't work. Usually, on the server-side, you will run XSLT
> first, and then XForms, and what gets sent to the browser is "just
> HTML". Does this make sense, or have I misunderstood your scenario?
>
> Alex
>
> --
> View this message in context: http://www.nabble.com/XForms-generated-by-XSLT-in-Firefox-tf3561767.html#a9954340
> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.
>
>
>
>
> --
> You receive this message as a subscriber of the ops-users@objectweb.org mailing list.
> To unsubscribe: mailto:ops-users-unsubscribe@objectweb.org
> For general help: mailto:sympa@objectweb.org?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>


--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the ops-users@objectweb.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: XForms generated by XSLT in Firefox

Josh-2007
In reply to this post by Alessandro Vernet
Hi Alessandro,

Sorry for the delay, I've been quite busy lately.
Just to let you know, I've checked the Mozilla XForms and made some few attempts.
Actually it's due to Transformiix the engine used by Firefox to deal with xslt which doesn't render all ther required elements for XForms.

This is the bug n° 294612 : https://bugzilla.mozilla.org/show_bug.cgi?id=294612

For now, nothing is planned to deal with it as it needs a fix in Transformiix.

I will try using XFormsFilter in eXist which makes the use of Chiba.
Thanks,

Josh

Alessandro Vernet wrote
Hi Josh,

I don't have much recent experience running XSLT on the browser. For
most of the use cases I deal with, it just seems that running XSLT on
the server provides a more robust solution. You might want to try
asking the question on the Mozilla XForms list:

http://www.nabble.com/Mozilla---XForms-f20741.html

Alex

On 4/12/07, Josh-2007 <oumane2005@yahoo.fr> wrote:
>
> Hi Alex,
>
> Thanks for taking a look.
> Actually I don't use Orbeon, I'm using the XForms extension of Firefox to
> get the rendering.
> I send my xml file which includes a call to the XSLT transformer.
> So I presume it is tranformed by XSLT before being output by Firefox.
> The tricky point is the output difference between Saxon8B which is just fine
> (except the -select- buttons which doesn't work) and the generated source
> from Firefox (by web developper plug-in).
> Firefox :
> * put a 'meta' tag
> * forget some closing tags ('/input' 'br/')
> * doesn't show any of the defined namespaces (xforms and DOM event
> namespaces)
> * doesn't show any prefixe xf: ev:
> I'm wondering if the problem doesn't come from the messy transformation I
> get from Firefox and the lack of namespaces.
> I attached the XSL transforme file along with the xml source
>
> http://www.nabble.com/file/7816/XSL-XForms.xsl XSL-XForms.xsl
> http://www.nabble.com/file/7827/xml-form-source.xml xml-form-source.xml
>
>
> and here, you have the transformation result from Saxon8B and Firefox if you
> want to run the example:
>
> http://www.nabble.com/file/7828/firefox_source.xml firefox_source.xml
> http://www.nabble.com/file/7829/saxon8B.xml saxon8B.xml
>
> Cheers,
>
> Josh
>
>
>
>
> Hi,
>
> You are using XSLT to generate XForms. So this XSLT has to run before
> the XForms engine kicks in. If you are using Orbeon Forms, the XForms
> engine is running on the server-side. So sending the XML/XSLT to
> Firefox won't work. Usually, on the server-side, you will run XSLT
> first, and then XForms, and what gets sent to the browser is "just
> HTML". Does this make sense, or have I misunderstood your scenario?
>
> Alex
>
> --
> View this message in context: http://www.nabble.com/XForms-generated-by-XSLT-in-Firefox-tf3561767.html#a9954340
> Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.
>
>
>
>
> --
> You receive this message as a subscriber of the ops-users@objectweb.org mailing list.
> To unsubscribe: mailto:ops-users-unsubscribe@objectweb.org
> For general help: mailto:sympa@objectweb.org?subject=help
> ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
>
>


--
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the ops-users@objectweb.org mailing list.
To unsubscribe: mailto:ops-users-unsubscribe@objectweb.org
For general help: mailto:sympa@objectweb.org?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws
Reply | Threaded
Open this post in threaded view
|

Re: XForms generated by XSLT in Firefox

Ryan Puddephatt
Josh,
    If you don't mind me say, why not use Orbeon? I'm sure it will more than meet your expectations :-)

Ryan

Ryan Puddephatt
Software Engineer
 
Teleflex Group - IT UK
1 Michaelson Square
Livingston
West Lothian
Scotland
EH54 7DP
 
e> [hidden email]
t> +44(0)1506 407 110
f> +44(0)1506 407 108
w> www.teleflex.com

"Measuring programming progress by lines of code is like measuring aircraft building progress by weight." - Bill Gates
"If you lie to the compiler, it will get its revenge." - Henry Spencer
"It's hard enough to find an error in your code when you're looking for it; it's even harder when you've assumed your code is error-free." - Steve McConnell
"If builders built buildings the way programmers wrote programs, then the first woodpecker that came along would destroy civilization." - Gerald Weinberg



Josh-2007 wrote:
Hi Alessandro,

Sorry for the delay, I've been quite busy lately.
Just to let you know, I've checked the Mozilla XForms and made some few
attempts.
Actually it's due to Transformiix the engine used by Firefox to deal with
xslt which doesn't render all ther required elements for XForms.

This is the bug n° 294612 :
https://bugzilla.mozilla.org/show_bug.cgi?id=294612

For now, nothing is planned to deal with it as it needs a fix in
Transformiix.

I will try using XFormsFilter in eXist which makes the use of Chiba.
Thanks,

Josh


Alessandro Vernet wrote:
  
Hi Josh,

I don't have much recent experience running XSLT on the browser. For
most of the use cases I deal with, it just seems that running XSLT on
the server provides a more robust solution. You might want to try
asking the question on the Mozilla XForms list:

http://www.nabble.com/Mozilla---XForms-f20741.html

Alex

On 4/12/07, Josh-2007 [hidden email] wrote:
    
Hi Alex,

Thanks for taking a look.
Actually I don't use Orbeon, I'm using the XForms extension of Firefox to
get the rendering.
I send my xml file which includes a call to the XSLT transformer.
So I presume it is tranformed by XSLT before being output by Firefox.
The tricky point is the output difference between Saxon8B which is just
fine
(except the -select- buttons which doesn't work) and the generated source
from Firefox (by web developper plug-in).
Firefox :
* put a 'meta' tag
* forget some closing tags ('/input' 'br/')
* doesn't show any of the defined namespaces (xforms and DOM event
namespaces)
* doesn't show any prefixe xf: ev:
I'm wondering if the problem doesn't come from the messy transformation I
get from Firefox and the lack of namespaces.
I attached the XSL transforme file along with the xml source

http://www.nabble.com/file/7816/XSL-XForms.xsl XSL-XForms.xsl
http://www.nabble.com/file/7827/xml-form-source.xml xml-form-source.xml


and here, you have the transformation result from Saxon8B and Firefox if
you
want to run the example:

http://www.nabble.com/file/7828/firefox_source.xml firefox_source.xml
http://www.nabble.com/file/7829/saxon8B.xml saxon8B.xml

Cheers,

Josh




Hi,

You are using XSLT to generate XForms. So this XSLT has to run before
the XForms engine kicks in. If you are using Orbeon Forms, the XForms
engine is running on the server-side. So sending the XML/XSLT to
Firefox won't work. Usually, on the server-side, you will run XSLT
first, and then XForms, and what gets sent to the browser is "just
HTML". Does this make sense, or have I misunderstood your scenario?

Alex

--
View this message in context:
http://www.nabble.com/XForms-generated-by-XSLT-in-Firefox-tf3561767.html#a9954340
Sent from the ObjectWeb OPS - Users mailing list archive at Nabble.com.




--
You receive this message as a subscriber of the [hidden email]
mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


      
-- 
Orbeon Forms - Web 2.0 Forms for the Enterprise
http://www.orbeon.com/



--
You receive this message as a subscriber of the [hidden email]
mailing list.
To unsubscribe: [hidden email]
For general help: [hidden email]
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


    

  

-- You receive this message as a subscriber of the [hidden email] mailing list. To unsubscribe: [hidden email] For general help: [hidden email] ObjectWeb mailing lists service home page: http://www.objectweb.org/wws


--
You receive this message as a subscriber of the [hidden email] mailing list.
To unsubscribe: mailto:[hidden email]
For general help: mailto:[hidden email]?subject=help
ObjectWeb mailing lists service home page: http://www.objectweb.org/wws