Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Two things to note.</p> <p>First. Make sure tags are screened in CDATA</p> <pre><code>&lt;?xml version="1.0" encoding="utf-8"?&gt; &lt;?xml-stylesheet type="text/xsl" href="test.html.xsl"?&gt; &lt;favoriteMovies&gt; &lt;favoriteMovie&gt;&lt;![CDATA[the &lt;i&gt;Star Wars&lt;/i&gt; saga]]&gt;&lt;/favoriteMovie&gt; &lt;/favoriteMovies&gt; </code></pre> <p>Second. Disable output escaping:</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:output method="html" omit-xml-declaration="yes" /&gt; &lt;xsl:template match="/"&gt; &lt;html&gt; &lt;head /&gt; &lt;body&gt; &lt;ul&gt; &lt;xsl:for-each select="favoriteMovies/favoriteMovie"&gt; &lt;li&gt;&lt;xsl:value-of select="." disable-output-escaping="yes" /&gt;&lt;/li&gt; &lt;/xsl:for-each&gt; &lt;/ul&gt; &lt;/body&gt; &lt;/html&gt; &lt;/xsl:template&gt; </code></pre> <p>EDIT: managed it with the editor, now the code is shown as it should</p> <p>EDIT2: included changes in your code</p> <p>EDIT3: To whom it may concern, the very domain of the problem in question is about structuring movies information, and not html data. HTML is there for markup purposes only, imagine having, say, <em>html</em> title tag inside favoriteMovie, whereas the same named tag title could be a valid tag in the <em>movies</em> database. These title's CLEARLY have to be interpreted differently. This justifies using CDATA and then disabling output when processing.</p>
 

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