Note that there are some explanatory texts on larger screens.

plurals
  1. POxslt not transforming xml correctly in browser
    primarykey
    data
    text
    <p>I have the following XML:</p> <pre><code>&lt;item&gt; &lt;title&gt;Testing WebForm&lt;/title&gt; &lt;link&gt;http://linkurlhere.com&lt;/link&gt; &lt;description&gt; &lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;div style="background-color: white; width: 100%;"&gt; &lt;div id="prize" style="background-color: yellow; color: #660000; font-weight: bold; width: 200px;"&gt;Prize here&lt;/div&gt; &lt;/div&gt; &lt;div id="startDate"&gt;Start Date: January 1, 2013&lt;/div&gt; &lt;div id="endDate"&gt;End Date: January 1, 2014&lt;/div&gt; &lt;p&gt;&lt;/p&gt; &lt;p&gt;Thanks for playing please take the survey - mock intro&lt;/p&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/description&gt; &lt;/item&gt; </code></pre> <p>And I am rendering it with the following XSLT:</p> <pre><code> &lt;xsl:template match="rss/channel"&gt; &lt;div id="surveyList"&gt; &lt;p&gt; Please click on the survey below and complete the survey.&lt;/p&gt; &lt;xsl:for-each select="item"&gt; &lt;div id="surveyItem"&gt; &lt;div id="thePrize"&gt; &lt;xsl:apply-templates select="description" /&gt; &lt;/div&gt; &lt;a id="surveyLink"&gt; &lt;xsl:attribute name="href"&gt; &lt;xsl:value-of select="link" disable-output-escaping="yes" /&gt; &lt;/xsl:attribute&gt; &lt;xsl:attribute name="target"&gt;_blank&lt;/xsl:attribute&gt; &lt;xsl:attribute name="title"&gt;Click to complete this survey&lt;/xsl:attribute&gt; &lt;xsl:value-of select="title" disable-output-escaping="yes" /&gt; &lt;/a&gt; &lt;br /&gt; &lt;/div&gt; &lt;/xsl:for-each&gt; &lt;/div&gt; &lt;/xsl:template&gt; &lt;xsl:template match="rss/channel/item/description" name="description"&gt; &lt;xsl:value-of select=".//div[@id='prize']" disable-output-escaping="yes" /&gt; &lt;/xsl:template&gt; </code></pre> <p>When I run this through an IDE such as Altova, and transform it, it shows up correctly with the div prize text. However, when I build out the webapp and deploy it either locally on tomcat 6.0 or on an actual webserver the prize does not show up, and it is not in the source when I view the page.</p> <p>I have tried multiple browsers to no avail. Is this a simple setup problem with my XSLT page?</p> <p>Thanks.</p> <p>Updated below with complete XML including RSS elements:</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;rss version="2.0" xml:base="http://drupal-survey.url" xmlns:dc="http://purl.org/dc/elements/1.1/"&gt; &lt;channel&gt; &lt;title&gt;drupal-survey.url&lt;/title&gt; &lt;link&gt;http://drupal-survey.url&lt;/link&gt; &lt;description&gt;&lt;/description&gt; &lt;language&gt;en&lt;/language&gt; &lt;item&gt; &lt;title&gt;Testing WebForm&lt;/title&gt; &lt;link&gt;urlLink here&lt;/link&gt; &lt;description&gt; &lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt; &lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt; &lt;div style="background-color: white; width: 100%;"&gt; &lt;div id="prize" style="background-color: yellow; color: #660000; font-weight: bold; width: 200px;"&gt;$1000 Gift Card to McDonald&amp;#039;s&lt;/div&gt; &lt;/div&gt; &lt;div id="startDate"&gt;Start Date: January 1, 2013&lt;/div&gt; &lt;div id="endDate"&gt;End Date: January 1, 2014&lt;/div&gt; &lt;p&gt;Thanks for playing please take the survey - mock intro&lt;/p&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/description&gt; &lt;pubDate&gt;Mon, 25 Feb 2013 19:12:48 +0000&lt;/pubDate&gt; &lt;dc:creator&gt;admin&lt;/dc:creator&gt; &lt;guid isPermaLink="false"&gt;6 at http://drupal-survey.url&lt;/guid&gt; &lt;/item&gt; &lt;item&gt; &lt;title&gt;sss162 test&lt;/title&gt; &lt;link&gt;http://drupal-survey.url/sss162/test&lt;/link&gt; &lt;description&gt;&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt;&lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;p&gt;This is a testing paragraph&lt;/p&gt; &lt;p&gt;this is also&lt;/p&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/description&gt; &lt;pubDate&gt;Thu, 10 May 2012 19:24:43 +0000&lt;/pubDate&gt; &lt;dc:creator&gt;sss162&lt;/dc:creator&gt; &lt;guid isPermaLink="false"&gt;4 at http://drupal-survey.url&lt;/guid&gt; &lt;/item&gt; &lt;item&gt; &lt;title&gt;Orientation Survey&lt;/title&gt; &lt;link&gt;http://drupal-survey.url&lt;/link&gt; &lt;description&gt;&lt;div class="field field-name-body field-type-text-with-summary field-label-hidden"&gt; &lt;div class="field-items"&gt;&lt;div class="field-item even" property="content:encoded"&gt;&lt;div id="startDate"&gt;Start Date: January 1, 2013&lt;/div&gt; &lt;div id="endDate"&gt;End Date: January 1, 2014&lt;/div&gt; &lt;p&gt;This may be the brief explanation paragraph.&lt;/p&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/description&gt; &lt;pubDate&gt;Thu, 10 May 2012 17:11:38 +0000&lt;/pubDate&gt; &lt;dc:creator&gt;admin&lt;/dc:creator&gt; &lt;guid isPermaLink="false"&gt;2 at http://drupal-survey.url&lt;/guid&gt; &lt;/item&gt; &lt;/channel&gt; &lt;/rss&gt; </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload