Clarity

  • 1.  XOG and GEL Email Clarity v13

    Posted Apr 24, 2013 04:10 PM
    I posted this in another thread, but I also see the thread has been marked resolved.

    This post is a bit dated, but I don't see the specific answer out there. To Chris' point, what if you want to paste the contents of a XOG into an email? Prior to v13, we used this to give to our test team. Now, all XML files are showing up unformatted and unusable.

    Here is my example:

    <gel:parse var="dataload">
    XML Statement
    </gel:parse>

    <gel:set asString="true" select="$dataload" var="Vdataload"/>
    <gel:log>
    <gel:expr select="$dataload"/>
    </gel:log>

    <gel:email blah blah>
    ${Vdataload}
    </gel:email>

    Prior to v13, that worked. Now it returns all the values with no XML markup.

    I have even tried:

    <gel:email blah blah>
    <![CDATA[
    ${Vdataload}


    ]]>
    </gel:email>

    to no avail.

    Any new insight on how to get a XOG file into an email without saving to disk and attaching?

    Thanks.


  • 2.  RE: XOG and GEL Email Clarity v13

     
    Posted Apr 26, 2013 01:48 PM
    Hi All,

    Any insight into this one?

    Thanks!
    Chris


  • 3.  RE: XOG and GEL Email Clarity v13
    Best Answer

    Posted Apr 26, 2013 06:54 PM
    Here's an example, change the from / fromName / to entries in the gel:email tag first though:
    <gel:script 
      xmlns:gel="jelly:com.niku.union.gel.GELTagLibrary"
      xmlns:util="jelly:util"
    >
    
      <gel:parse var="testxml">
        <someroot>
          <somexml>hello, world!</somexml>
        </someroot>
      </gel:parse>
    
    <gel:set asString="true" select="$testxml" var="testxml2" />
    <util:replace new="&amp;lt;" old="&lt;" value="${testxml2}" var="testxml3" />
    
    <gel:email from="blah" fromName="blah" to="blah" subject="HTML test">
    Testing html format email:&lt;br>
    &lt;div style="white-space: pre">
    ${testxml3}
    &lt;/div>
    </gel:email>
    
    
    </gel:script>
    Results in:
    Testing html format email:
    
    <?xml version="1.0" encoding="UTF-8"?>
    <someroot>
      <somexml>hello, world!</somexml>
    </someroot>