Alessandro Vernet wrote:


So I am not sure why you observe a different behavior with your application. Unfortunately, I can't give you a better answer without being able to reproduce the problem here.


Alex

Hi Alex,

To help you reproduce the problem I have made the simplest example I could think of that exhibits the problem. Attached is an xforms-model.xml file and a view.xpl for the same page. Put an entry in a page view controller that uses these 2 files. The important thing about the example is that the output from the xslt contains unmatched text nodes: it is not well formed xml. The problem is that orbeon studio displays the output incorrectly. When the output of the xslt is saved to disk using the file serialiser you get:

action
<message xmlns:oxf="http://www.orbeon.com/oxf/processors"; xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"; xmlns:p="http://www.orbeon.com/oxf/pipeline";></message>
Note the unmatched text node 'action'. But when displayed in Orbeon Studio using a debug attribute (in either the console or the event editor) you get:


<message xmlns:oxf="http://www.orbeon.com/oxf/processors"; xmlns:xxforms="http://orbeon.org/oxf/xml/xforms"; xmlns:p="http://www.orbeon.com/oxf/pipeline";></message>

No 'action' node.  Hope this helps,

David Sinclair.
<xforms:model xmlns:xforms="http://www.w3.org/2002/xforms";>
    <xforms:instance>
        <form>
        	<ui>
        		<action>action</action>
        		<message/>
        	</ui>
        </form>
    </xforms:instance>
    <xforms:submission method="post"/>
</xforms:model>
<p:config xmlns:p="http://www.orbeon.com/oxf/pipeline"; 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; 
xmlns:oxf="http://www.orbeon.com/oxf/processors"; 
xmlns:xxforms="http://orbeon.org/oxf/xml/xforms";>
        <p:param type="input" name="instance" debug="VIEW INSTANCE"/>
        <p:param type="output" name="data"/>
           
    <!-- nonsense xslt that will result in unmatched text nodes in the output 
-->
        <p:processor name="oxf:xslt">
                <p:input name="data" href="#instance"/>
                <p:input name="config">
                        <xsl:stylesheet version="2.0" 
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; >                
                                <xsl:template match="message">
                    <message/>
                </xsl:template>
            </xsl:stylesheet>  
        </p:input>  
        <p:output name="data" id="xml"/>
        </p:processor>

    <!-- save the results to disk -->    
    <p:processor name="oxf:file-serializer" 
xmlns:p="http://www.orbeon.com/oxf/pipeline";>
        <p:input name="config">
            <config>
                <file>test.xml</file>
                <directory>c:/tmp</directory>
            </config>            
        </p:input>        
        <p:input name="data" href="#xml" debug="THE XML"/>
  </p:processor>
    
  <!-- return the same results -->
  <p:processor name="oxf:identity">
      <p:input name="data" href="#xml"/>
      <p:output name="data" ref="data"/>
  </p:processor>
    
</p:config>

Reply via email to