Puzzling xsl problem

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">
<xsl:eek:utput 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><xsl:eek:therwise>Valued
Customer</xsl:eek:therwise></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><xsl:eek:therwise>a customer
service representative</xsl:eek:therwise></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\"><xsl:eek:utput 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
 
G

Guest

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">
<xsl:eek:utput 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><xsl:eek:therwise>Valued
Customer</xsl:eek:therwise></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><xsl:eek:therwise>a customer
service representative</xsl:eek:therwise></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\"><xsl:eek:utput 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

Yes, it is used to transformate XML document from the file 1. To see
sample output you can open xslt in Visual Studio, go to XML - Show
XSLT output.

This will result the following being displayed

<P>Dear
Valued
Customer
,</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
a customer
service representative
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>
 
C

CS ADNT

Thanks for confirmation, but how could I use the 'slugs', they represent
things as contact/@ownerid ?



"Anon User" <> a écrit dans le message de
groupe de discussion :
(e-mail address removed)...
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">
<xsl:eek:utput 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><xsl:eek:therwise>Valued
Customer</xsl:eek:therwise></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><xsl:eek:therwise>a customer
service representative</xsl:eek:therwise></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\"><xsl:eek:utput 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

Yes, it is used to transformate XML document from the file 1. To see
sample output you can open xslt in Visual Studio, go to XML - Show
XSLT output.

This will result the following being displayed

<P>Dear
Valued
Customer
,</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
a customer
service representative
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>
 
G

Guest

Thanks for confirmation, but how could I use the 'slugs', they represent
things as contact/@ownerid ?

"Anon User" <[email protected]> a écrit dans le message de
groupe de discussion :
(e-mail address removed)...


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">
<xsl:eek:utput 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><xsl:eek:therwise>Valued
Customer</xsl:eek:therwise></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><xsl:eek:therwise>a customer
service representative</xsl:eek:therwise></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\"><xsl:eek:utput 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
Yes, it is used to transformate XML document from the file 1. To see
sample output you can open xslt in Visual Studio, go to XML - Show
XSLT output.
This will result the following being displayed
<P>Dear
Valued
Customer
,</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
a customer
service representative
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>- Hide quoted text -

- Show quoted text -

What do you mean?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,968
Messages
2,570,152
Members
46,697
Latest member
AugustNabo

Latest Threads

Top