Confusion about the Templates on island.xml.xsl
- Login to post comments
Wed, 05/30/2012 - 13:20
Now I was trying to make the chapter my self and it seems quite easy (I edited Puggsoy island) but there is one problem - What exactly is this used for and what's it for? If I can't find out my chapter may crash or even the addin won't upload on the gootool so I need explenation of it.
<xsl:template match="/island[1]/level[3]/@ocd"/> <xsl:template match="/island[1]/text()[4]"/> <xsl:template match="/island[1]/level[4]"/> <xsl:template match="/island[1]/text()[5]"/> <xsl:template match="/island[1]/level[5]"/> <xsl:template match="/island[1]/text()[6]"/> <xsl:template match="/island[1]/level[6]"/> <xsl:template match="/island[1]/text()[7]"/> <xsl:template match="/island[1]/level[7]"/> <xsl:template match="/island[1]/text()[8]"/> <xsl:template match="/island[1]/level[8]"/> <xsl:template match="/island[1]/text()[9]"/> <xsl:template match="/island[1]/level[9]"/> <xsl:template match="/island[1]/text()[10]"/> <xsl:template match="/island[1]/level[10]"/> <xsl:template match="/island[1]/text()[11]"/> <xsl:template match="/island[1]/level[11]"/>
That's why I prefer hand written xsl files, they are easier to understand.
Those lines are deleting the elements in the island.xml.
First thing you would need to do is define the level names and subtext in the text.xml file.
Second the islandx.xsl:
I'm assume you want to delete every existing level and than add your own ones.
Here is an easy template you could use.
edit: just forgot the deleting line.
edit2: found another syntax error in the example. I wrote
text="LEVEL_NAME_YOURLEVELSUBTEXT1"
instead oftext="LEVEL_TEXT_YOURLEVELSUBTEXT1"
on the run | keep on running | two-stroke-engine
Sorry but it confuses me even more - what exactly is Level Subtext? Is it the subtitle of your levels or is it where you write the names of the texts of your levels? Ahh but it confuses you even more - If I had a straight example like there was an example for Merging levels I would have started to make my second chapter but you guys just want to confuse me - give me an example of a chapter and random levels put together cause then I suppose all will crash... But your example is good - but I don't have to leave lines between them do I cause then the island.xml.xsl will crash, right? So basically I'l follow your instructions and I hopw it works - I understand that you gave me an example for 2 levels of chapter in island.xsl right but I think I'll be able to input 10 level information - doesn't even look that hard if you look at it like that and this is exactly what I was waiting from AP and puggsoy - if there is anyone else asking of how to make chapter tell them that you have to edit your island.xml.xsl in merge directory and give them this link to find out an example of how to edit it. I'll do the same.
Really? Hah. The reason we don't have a straightforward example is because it isn't straightforward. Making chapters is mindblowingly difficult and you have to know precisely what you're doing because there's a lot of ways you can go wrong. A knowledge of how XML and XSL work will help you a whole lot more than an example will.
That being said, hopefully soon I'll get together a tutorial for making chapters, along with some new guidelines for doing so. But in the meantime, do whatever goomatz says. He knows what he's doing, unlike me.
IRC | Chapter Tutorial | Reference Guide
Wih level subtext i meant the text displayed below the level name when the level loads.
A good example for a chapter would be the under snake by momo1524.
And yes, you can add as many levels as you want. Just add a line for each where the first two are.
Sorry I don't get it. Do you want to put empty lines between the levels? If so, this shouldn't be a problem.
on the run | keep on running | two-stroke-engine