Hi Winona, 
Did you try the serialize() function with the xf:ouput element ? You could also 
add a xf:dialog with the serialized view before saving (see sample below)
Best, 
Josselin

<?xml-stylesheet href="xsltforms.xsl" type="text/xsl"?>
<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";
    lang="en">
    <head>
        <title>serialize() with XForms</title>
        <xf:model>
            <xf:instance>
                <foo xmlns="">
                    <bar/>
                </foo>
            </xf:instance>
        </xf:model>
    </head>
    <body>
        <xf:input ref="bar">
            <xf:label>Enter your name</xf:label>
        </xf:input>
        <xf:trigger>
            <xf:label>Save</xf:label>
            <xf:action ev:event="DOMActivate">
                <xf:show dialog="serializedView"/>
            </xf:action>
        </xf:trigger>
        <xf:dialog id="serializedView">
            <xf:output value="serialize(/foo)"/>
            <xf:trigger>
                <xf:label>Cancel</xf:label>
                <xf:hide ev:event="DOMActivate" dialog="serializedView"/>
            </xf:trigger>
            <xf:submit submission="submit">
                <xf:label>Save</xf:label>
            </xf:submit>
        </xf:dialog>
    </body>
</html>



> Le 23 mai 2022 à 15:05, Winona Salesky <wsale...@gmail.com> a écrit :
> 
> Does anyone here have clever way to preview the working XML instance? I would 
> like users to be able to see what the XML content looks like before saving 
> it. 
> Thanks!
> -Winona
> 
> _______________________________________________
> Xsltforms-support mailing list
> Xsltforms-support@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/xsltforms-support

_______________________________________________
Xsltforms-support mailing list
Xsltforms-support@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xsltforms-support

Reply via email to