Erik,

        I am using your example <
http://sourceforge.net/mailarchive/forum.php?thread_id=5802986&forum_id=42
083 > to try to attach an xml document (originally instance data) to an
e-mail.  But I keep getting 

Cannot�read�from�file�/uploads/XForms_data_2004-11-12T10_28_56.183-05_00.x
ml

I tried absolute path and relative path but neither allows me to read from
the file.  The file is on the disk when I look but I am not sure the file
is written and closed prior to trying to read it.  Any ideas?  Here is my
xpl:

        <p:processor name="oxf:xslt">
                <p:input name="data" href="#instance"/>
                <p:input name="config">
                        <config xsl:version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
                                <xsl:variable name="nocache1"
select="''"/>
                                <xsl:variable name="nocache2"
select="document($nocache1)"/>
                                <xsl:variable name="myDate">
                                        <xsl:value-of
select="current-dateTime()"/>
                                </xsl:variable>
                                <file>XForms_data_<xsl:value-of
select="translate($myDate,':','_')"/>.xml</file>
        
<directory>/opt/tomcat/webapps/orbeon/WEB-INF/resources/selfreg/uploads</d
irectory>
                        </config>
                </p:input>
                <p:output name="data" id="myfile"/>
        </p:processor>
        <p:processor name="oxf:file-serializer">
                <p:input name="config" href="#myfile"/>
                <p:input name="data" href="#instance"/>
        </p:processor>
        <p:processor name="oxf:xslt">
                <p:input name="data" href="#myfile"/>
                <p:input name="config">
                        <config xsl:version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
                                <url>oxf:/uploads/<xsl:value-of
select="/config/file"/>
                                </url>
                                <content-type>text/xml</content-type>
                        </config>
                </p:input>
                <p:output name="data" id="myfile2"/>
        </p:processor>
        <p:processor name="oxf:url-generator">
                <p:input name="config" href="#myfile2"/>
                <p:output name="data" id="file" debug="file"/>
        </p:processor>
        <p:processor name="oxf:xslt">
                <p:input name="data" href="#file"/>
                <p:input name="config">
                        <message xsl:version="2.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
                                <smtp-host>localhost</smtp-host>
                                <from>
        
<email>[EMAIL PROTECTED]</email>
                                        <name>John Doe</name>
                                </from>
                                <to>
                                        <email>[EMAIL PROTECTED]</email>
                                        <name>Bob Smith</name>
                                </to>
                                <subject>Orbeon test e-mail messages (from
the servlet)</subject>
                                <body>
                                        <part name="part1"
content-type="text/plain">
        
<xsl:text>Hello!</xsl:text>
                                        </part>
                                        <part name="part2"
content-type="text/xml">
                                                <!--#data-->
                                                <xsl:copy-of
select="/*/text()"/>
                                        </part>
                                </body>
                        </message>
                </p:input>
                <p:output name="data" id="message"/>
        </p:processor>
        <p:processor name="oxf:email">
                <p:input name="data" href="#message"/>
        </p:processor>

TIA,
Greg


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id065&op=click
_______________________________________________
orbeon-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/orbeon-user

Reply via email to