Compilation error on created pages
This is an open discussion with 4 replies, filed under Troubleshooting.
Search
Every page I create - even if it's " default blank" - gets compilation errors as soon as I write a line to import an utility for example.
Post the page and utility XSLT.
It's the default page template with an added import line. To clear things up: on all the pages that were created by Symphony itself on install the errors do not occur. Start, about, archive page...all work perfectly fine.
---- bilder.xsl ---
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:output method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" omit-xml-declaration="yes" encoding="UTF-8" indent="yes" /> <xsl:import href="../utilities/master.xsl"/> <xsl:template match="/"> <h1>lol</h1> </xsl:template> </xsl:stylesheet>
---- master.xsl ----
<?xml version="1.0" encoding="UTF-8"?> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> <xsl:import href="../utilities/page-title.xsl"/> <xsl:import href="../utilities/navigation.xsl"/> <xsl:import href="../utilities/date-time.xsl"/> <xsl:output method="xml" doctype-public="-//W3C//DTD XHTML 1.0 Strict//EN" doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd" omit-xml-declaration="yes" encoding="UTF-8" indent="yes" /> <xsl:variable name="is-logged-in" select="/data/events/login-info/@logged-in"/> <xsl:template match="/"> <html> <head> <title> <xsl:call-template name="page-title"/> </title> <link rel="icon" type="images/png" href="{$workspace}/images/icons/bookmark.png" /> <link rel="stylesheet" type="text/css" media="screen" href="{$workspace}/css/styles.css" /> <link rel="alternate" type="application/rss+xml" href="/rss/" /> </head> <body> <div id="bodywrapper"> <div id="header"> <h1 id="sitetitle"> <a href="{$root}"><xsl:value-of select="$website-name"/></a> </h1> <xsl:apply-templates select="data/navigation"/> </div> <div id="content"> <xsl:apply-templates/> </div> <div id="footer"> <p>Orchestrated by <a class="symphony" href="http://symphony21.com/">Symphony</a><br /> Broadcasted via <a class="rss" href="{$root}/rss/">XML Feed</a></p> </div> </div> </body> </html> </xsl:template> </xsl:stylesheet>
import
's must be in the beginning of a stylesheet. Notice how the following is after the output
element in bilder.xsl?
<xsl:import href="../utilities/master.xsl"/>
Also, since you are importing master.xsl you do not need to re-declare the output element.
Thanks for the help. Together with removing the output element, it took changing the templates match attribute to "data" instead of "/" to get it to work. Otherwise, the import didn't work even if the compilation errors were gone.
/ Johan
Create an account or sign in to comment.
Hello all.
I installed a fresh copy of symphony 2.0 beta revision 5 on my host and everything works fine until i start creating my own pages. Every page I create - even if it's " default blank" - gets compilation errors as soon as I write a line to import an utility for example. It looks like this:
I'm cluelsess. Also (and these may or may not be connected to eachother), all the self-created page's xsl files gets owner and group permission set it to my OS X user account for some reason. The wierd thing is it just started doing that out of the blue one day. Anyone have any clue of what might be wrong here?
Thanks in advance.