Note that there are some explanatory texts on larger screens.

plurals
  1. POTurning XSLT into a simple HTML snippet
    primarykey
    data
    text
    <p>The XML</p> <pre><code> &lt;?xml version="1.0" encoding="utf-8" ?&gt; &lt;data&gt; &lt;events /&gt; &lt;tour&gt; &lt;section id="3" handle="tour"&gt;Tour&lt;/section&gt; &lt;entry id="15"&gt; &lt;title handle="dummy-entry-1"&gt;Dummy Entry 1&lt;/title&gt; &lt;description mode="formatted"&gt;Lorem ipsum dolor sit amet...&lt;/description&gt; &lt;photo size="24 KB" path="/images/tour" type="image/jpeg"&gt; &lt;filename&gt;no-image.jpg&lt;/filename&gt; &lt;meta creation="2010-03-07T17:00:24-08:00" width="1000" height="1000" /&gt; &lt;/photo&gt; &lt;/entry&gt; &lt;/tour&gt; &lt;/data&gt; </code></pre> <p>The XSLT</p> <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt; &lt;xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"&gt; &lt;xsl:template match="/data/tour/entry"&gt; &lt;img src="{filename}"/&gt; &lt;h2&gt;{heading}&lt;/h2&gt; {description} &lt;/xsl:template&gt; &lt;/xsl:stylesheet&gt; </code></pre> <p>Here is the code I am working with. I am a newbie to XSLT and I suppose I am not understanding how it transforms my XML into HTML entirely. This snippet of code I plan on loading via AJAX, so I really all I need it to output is a blank html document consisting only of these three items.</p> <p>I realize I am omitting the xsl:output tag and that is because I really don't understand how I can get this to just simply match that information to my tags in my xml without adding , tags etc. All it outputs is a string of text in an html document.</p> <p>If it helps, I am working in the Symphony CMS environment.</p>
    singulars
    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.
 

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