C
CS ADNT
Hello,
I am trying to understand how these 2 kind of files could be used.
Context: template used to generate crm email from objects
file 1
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xslutput method="text" indent="no"/>
<xsl:template match="/data">
<![CDATA[<P>Dear ]]>
<xsl:choose><xsl:when test="contact/fullname"><xsl:value-of
select="contact/fullname" /></xsl:when><xsltherwise>Valued
Customer</xsltherwise></xsl:choose>
<![CDATA[,</P> <P>We have not heard from you for a while. We wanted to check
in and make sure that you are still having a great experience using our
product(s). We have asked ]]>
<xsl:choose><xsl:when test="contact/ownerid/@name"><xsl:value-of
select="contact/ownerid/@name" /></xsl:when><xsltherwise>a customer
service representative</xsltherwise></xsl:choose>
<![CDATA[ to contact you next week to get your feedback on the product(s)
you are currently using and to give you details about our upcoming
products.</P> <P>Thank you.</P>]]>
</xsl:template></xsl:stylesheet>
file 2
<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"
version=\"1.0\"><xslutput method=\"text\" indent=\"no\"/><xsl:template
match=\"template\"><xsl:for-each select=\"*\">"+
"<xsl:apply-templates select=\".\"
/></xsl:for-each></xsl:template><xsl:template match=\"text\"><xsl:value-of
select=\".\" /></xsl:template>"+
"<xsl:template match=\"slugs\"><![CDATA[<span
class=\"dataslug\"><span style=\"display:none;\"
id=\"DataSlug\">{!]]><xsl:for-each select=\"slug\"><xsl:value-of
select=\"entity\" />:<xsl:value-of select=\"attribute\"
/>;</xsl:for-each><xsl:value-of select=\"default\" />"+
"<![CDATA[}</span>{!]]><xsl:for-each
select=\"slug\"><xsl:value-of select=\"entity/@displayname\"
/>:<xsl:value-of select=\"attribute/@displayname\"
/>;</xsl:for-each><xsl:value-of select=\"default\"
/><![CDATA[}</span>]]></xsl:template></xsl:stylesheet>";
seems that file2 is used to display an html string from file 1 in the
template editor
Any Xsl expert advice welcome on which instructions to use.
CS
I am trying to understand how these 2 kind of files could be used.
Context: template used to generate crm email from objects
file 1
<?xml version="1.0" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xslutput method="text" indent="no"/>
<xsl:template match="/data">
<![CDATA[<P>Dear ]]>
<xsl:choose><xsl:when test="contact/fullname"><xsl:value-of
select="contact/fullname" /></xsl:when><xsltherwise>Valued
Customer</xsltherwise></xsl:choose>
<![CDATA[,</P> <P>We have not heard from you for a while. We wanted to check
in and make sure that you are still having a great experience using our
product(s). We have asked ]]>
<xsl:choose><xsl:when test="contact/ownerid/@name"><xsl:value-of
select="contact/ownerid/@name" /></xsl:when><xsltherwise>a customer
service representative</xsltherwise></xsl:choose>
<![CDATA[ to contact you next week to get your feedback on the product(s)
you are currently using and to give you details about our upcoming
products.</P> <P>Thank you.</P>]]>
</xsl:template></xsl:stylesheet>
file 2
<xsl:stylesheet xmlns:xsl=\"http://www.w3.org/1999/XSL/Transform\"
version=\"1.0\"><xslutput method=\"text\" indent=\"no\"/><xsl:template
match=\"template\"><xsl:for-each select=\"*\">"+
"<xsl:apply-templates select=\".\"
/></xsl:for-each></xsl:template><xsl:template match=\"text\"><xsl:value-of
select=\".\" /></xsl:template>"+
"<xsl:template match=\"slugs\"><![CDATA[<span
class=\"dataslug\"><span style=\"display:none;\"
id=\"DataSlug\">{!]]><xsl:for-each select=\"slug\"><xsl:value-of
select=\"entity\" />:<xsl:value-of select=\"attribute\"
/>;</xsl:for-each><xsl:value-of select=\"default\" />"+
"<![CDATA[}</span>{!]]><xsl:for-each
select=\"slug\"><xsl:value-of select=\"entity/@displayname\"
/>:<xsl:value-of select=\"attribute/@displayname\"
/>;</xsl:for-each><xsl:value-of select=\"default\"
/><![CDATA[}</span>]]></xsl:template></xsl:stylesheet>";
seems that file2 is used to display an html string from file 1 in the
template editor
Any Xsl expert advice welcome on which instructions to use.
CS