XSL Trouble
- Login to post comments
Sat, 03/03/2012 - 16:09
Okay, so I am making a better version of my UnderSnake XSL, for reasons explained here (comment #20). Problem is gootool cannot merge, it says:
Addin format exception in UnderSnake:
Error tranforming res/islands/island5.xml.xsl:
Impossible to compile stylesheet (com.goofans.gootool.v)
Also, here is the xsl code:
<xsl:output encoding="UTF-8"/> <!--Select all nodes--> <xsl:template match="node()|@*"> <xsl:copy> <xsl:apply-templates select="node()|@*"/> </xsl:copy> </xsl:template> <xsl:template match="/island[1]/@name"> <xsl:attribute name="name">UNDERSNAKE</xsl:attribute> </xsl:template> <xsl:template match="/island[1]/@map"> <xsl:attribute name="map">UnderSnake</xsl:attribute> </xsl:template> <xsl:template match="/island[1]/text()[1]"> </xsl:template> <xsl:template match="/island[1]/level[1]"/> <xsl:template match="/island[1]/text()[2]"/> <xsl:template match="/island[1]/level[2]"/> <xsl:template match="/island[1]/text()[3]"/> <xsl:template match="/island[1]/level[3]"/> <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]"> <xsl:element name="{name()}"> <xsl:apply-templates select="@*"/> <level id="DepthDirection" name="LEVEL_NAME_DEPTHDIRECTION" text="LEVEL_TEXT_DEPTHDIRECTION" ocd="moves,11"/> <level id="SurvivalSupport" depends="DepthDirection" name="LEVEL_NAME_SURVIVALSUPPORT" text="LEVEL_TEXT_SURVIVALSUPPORT" ocd="moves,8"/> <level id="AutomaticAscension" depends="SurvivalSupport" name="LEVEL_NAME_AUTOMATICASCENSION" text="LEVEL_TEXT_AUTOMATICASCENSION" ocd="time,70"/> <level id="FlyingAndFalling" depends="ClimbingConnection,DangerousDangling" name="LEVEL_NAME_FLYINGANDFALLING" text="LEVEL_TEXT_FLYINGANDFALLING"/> <level id="DangerousDangling" depends="UnderSnakeLevel" name="LEVEL_NAME_DANGEROUSDANGLING" text="LEVEL_TEXT_DANGEROUSDANGLING" ocd="moves,15"/> <level id="StalacstaticSleep" depends="AutomaticAscension" name="LEVEL_NAME_STALACSTATICSLEEP" text="LEVEL_TEXT_STALACSTATICSLEEP" ocd="balls,11"/> <level id="ClimbingConnection" depends="StalacstaticSleep" name="LEVEL_NAME_CLIMBINGCONNECTION" text="LEVEL_TEXT_CLIMBINGCONNECTION" ocd="moves,14"/> <level id="UnderSnakeLevel" depends="AutomaticAscension" name="LEVEL_NAME_UNDERSNAKELEVEL" text="LEVEL_TEXT_UNDERSNAKELEVEL" ocd="moves,13"/> <level id="TremblingTrust" depends="FlyingAndFalling" name="LEVEL_NAME_TREMBLINGTRUST" text="LEVEL_TEXT_TREMBLINGTRUST" ocd="moves,1"/> <level id="SecondSuicide" depends="TremblingTrust" name="LEVEL_NAME_SECONDSUICIDE" text="LEVEL_TEXT_SECONDSUICIDE" ocd="moves,9"/> </xsl:element> </xsl:template> </xsl:stylesheet>
You see, instead of transforming existing levels and copying the rest, this is supposed to delete all <level>
entities and THEN copying my own <level>
, this would avoid problems such as the one described in the comment linked above.
I'm not very good with XSL, can anyone help me with this?
That was the idea I had too.
Here is what i've done so far:
The only thing what's missing there is to change the map and island name attribute. Having little trouble with it but I'm on it.
on the run | keep on running | two-stroke-engine
I also suck with XSL, and Notepad++ isn't giving any syntax errors.
All I can suggest is to make sure that the XML you're using as the source is the island.xml from your original WoG installation, and that your new XML isn't effected by any other addins.
Sorry, that's all my usefulness
New GooFans Rules | My Addins
The original xml is indeed from a fresh wog install, and Undersnake is the only addin in Gootool. What do I do
Thanks Goomatz btw!
Check out my SoundCloud, MomoSoundWaves
Ok I got it:
on the run | keep on running | two-stroke-engine
Thanks! I'll test it tomorrow! I's strange though, when I first did it manually, it looked kind of like what you have here, there must have been a mistake somewhere. This means I can add cutscenes!
Check out my SoundCloud, MomoSoundWaves
I already tested it It's working
Plus I learned a bit more about xsl
edit:
I can tell you a thing or two about little typos crashing up a xsl file.
on the run | keep on running | two-stroke-engine
Goomatz, you are truly awesome!
EDIT: Typos? What where?
EDIT 2: I'm starting to wonder if it wouldn't be a good idea to explain all this in the book page of Chapters and Islands (or if you want/can can someone give me authorisation to edit it myself?)
Check out my SoundCloud, MomoSoundWaves
Sorry, can't give you permission. Seriously though, I really don't have the tools to do so. If you like, you can email me with your changes, and I can edit them in for you. My address is puggsoy *at* gmail *dot* com.
New GooFans Rules | My Addins
Ok, I'll see.
Check out my SoundCloud, MomoSoundWaves
It is already explained here: http://goofans.com/developers/addin-file-format/merge-directory
All I know about merging is from there. It's not about islands but levels but you can transfer it. But go ahead it is easier to make a chapter with it.
on the run | keep on running | two-stroke-engine
I mean like give a template xsl/xml for chapters/islands.
EDIT: I tested the xsl and it doesn't work for me so I'll go with overcompiling. Unfortunately, though I can add existing cutscenes, Gootool refuses to copy the goomod because it says it is unsupported even though my bintls are in the override directory. However, my resources are obviously in the compile directory so I'll investigate, at earliest next week... My movies are ready though, first and last level... I might make one for Dangerous Dangling...
Check out my SoundCloud, MomoSoundWaves
You place ALL files in the override directory unless they're an xml or xsl.
I tweet like a bird
I have a lame website
Momo can you post the xsl you used. I'm 100% sure the one I posted is working. You also could send me an e-mail (goomatz(at) gmx.de) with your goomod and I'll have a look at it.
Red, I don't get it, why should he put xml and xsl in override?
on the run | keep on running | two-stroke-engine
I tweet like a bird
I have a lame website
Oh, indeed you said unless. Don't know how I could overread it.
on the run | keep on running | two-stroke-engine
I know, the movie resources are in xml format. The xsl I used was yours except I changed it to clear only the 4 existing levels, which crashed, so I changed it back, I might have killed it by doing so, I'll try both.
Check out my SoundCloud, MomoSoundWaves
Try
edit: wait. I think you should rather delete all levels in general with
<xsl:template match="/island/level"/>
as the game crashes if there is an uncompleted level which doesn't have a button.on the run | keep on running | two-stroke-engine
I know, I tested both...
Check out my SoundCloud, MomoSoundWaves