5 users online. Create an account or sign in to join them.Users
Misplaced Import Element
This is an open discussion with 8 replies, filed under General.
Search
You’ve misplaced your <xsl:import /> or <xsl:include /> elements as they must go before <xsl:output />.
Yeah, but I can’t see why?
When I create a new page in Symphony, that is basically the code I have, but I generally change it to this:
<?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/master.xsl"/> <xsl:template match="data"> hello world </xsl:template> </xsl:stylesheet>
And it works - but I would rather not have to do that.
You can edit the default page XSLT in /symphony/template/page.xsl.
ok, but this is off the shelf right? So what do I need to do to make it work? You say the import element needs to go outside of the - but it is isn’t it?
Sorry, I don’t think I understand what your problem is… Is it your import element or the default XSLT code?
Well what is wrong with my initial code? And what would I need to do to make it work?
I tried your initial code and it worked after I moved the xsl:import statement above the xsl:output statement.
ah I see, so it goes before the output element? I need to read up on this output element are refresh my mind.
I’ve missed xslt - and i’ve quickly forgotten stuff.
Create an account or sign in to comment.
Hi,
Why would this give me an error? Please excuse any ignorance here - been wasting the last 9 months of my life working with Modx and Interspire - so looking to brush up on my Symphony skills.