Subject: [xsl] Need debug help xslt+svg From: Hermann Stamm-Wilbrandt <STAMMW@xxxxxxxxxx> Date: Wed, 1 Feb 2012 12:51:40 +0100 |
Hello, last year I visited a science museum with my kids. There was an area with different puzzles. I liked the "snake cube" puzzle, 27 wooden cubes hold together by an elastic band (not visible), see this photo: http://stamm-wilbrandt.de/en/xsl-list/cube/111029_140526.jpg The task was to fold the cubes to finally build a 3x3x3 cube. We bought a small version of that puzzle at the museum shop. I was able to solve the puzzle and wanted to do a 3D demonstration of the solution steps. I was really surprised how easy it is to generate graphics in the browser with SVG. I did a handmade 3D view by drawing the little cubes in the right order resulting in removal of all hidden stuff. Of course this was done with XSLT. Although I do not use IE browser I installed IE9 on my home computer just to verify that it really can display SVG. By David Carlisle's exslt-node-set-function blog posting the exslt:node-set() calls work fine even in IE. The problem I need debug help is step 6 of the animation: http://stamm-wilbrandt.de/en/xsl-list/cube/snake.00.xml Clicking on the link gives you the start. The clicking next 5 times gives fine results. When clicking the 6th time you can see the problem, one of the cubes is not rotated correctly. This happens exactly when the cube id of the cube where the rotation should be done decreases for the first time. This is a smaller example for debugging, problem in 2nd step: http://stamm-wilbrandt.de/en/xsl-list/cube/small.00.xml I added xsl:message output to view.xsl and the problem is that the 3rd cube does not get the coordinates which are correctly computed for step 1 as basis for step 2. I have no idea why this happens and appreciate any help. Interestingly IE9 does not do step 2 but reports an XSLT execution error in browser console, but no details on where&why. This is console output for small.01.xml: xsl:message - 1:0/0/0 : id0x000000000261afc0 | 0/0/1 : id0x000000000261b000 | 0/0/2 : id0x000000000261b040 | 1/0/2 : id0x000000000261af80 | xsl:message - 0:1/-1/0 : id0x00000000051dd040 | 1/-1/1 : id0x00000000051dd5c0 | 1/-1/2 : id0x00000000053d8940 | 1/0/2 : id0x00000000053d8a40 | 1/-1/2 is correct coordinate after first rotation for 3rd cube. This is console output for small.02.xml: xsl:message - 2:0/0/0 : id0x000000000bb3b680 | 0/0/1 : id0x000000000bb3b740 | 0/0/2 : id0x000000000bb3b7c0 | 1/0/2 : id0x000000000bb3b540 | xsl:message - 1:1/-1/0 : id0x000000000de03380 | 1/-1/1 : id0x000000000de03480 | 0/0/2 : id0x000000000de03940 | 1/0/2 : id0x000000000de23140 | xsl:message - 0:3/-1/2 : id0x000000000e9fa680 | 2/-1/2 : id0x000000000e9fac40 | 0/0/2 : id0x000000000ea01040 | 1/0/2 : id0x000000000ea01140 | The 3rd cube in middle line is 0/0/2 but should be 1/-1/2 ... All files are available under http://stamm-wilbrandt.de/en/xsl-list/cube ftp> dir 227 Entering Passive Mode (93,90,177,145,163,97). 150 Opening ASCII mode data connection for file list drwxr-xr-x 2 web138 web138 4096 Feb 1 11:09 . drwxr-xr-x 20 web138 web138 4096 Dec 1 10:12 .. -rw-r--r-- 1 web138 web138 178592 Feb 1 11:09 111029_140526.jpg -rw-r--r-- 1 web138 web138 88 Feb 1 10:47 small.00.xml -rw-r--r-- 1 web138 web138 88 Feb 1 10:47 small.01.xml -rw-r--r-- 1 web138 web138 88 Feb 1 10:47 small.02.xml -rw-r--r-- 1 web138 web138 1452 Feb 1 10:47 small.xml -rw-r--r-- 1 web138 web138 88 Feb 1 10:47 snake.00.xml -rw-r--r-- 1 web138 web138 88 Feb 1 10:47 snake.01.xml -rw-r--r-- 1 web138 web138 88 Feb 1 10:47 snake.02.xml -rw-r--r-- 1 web138 web138 88 Feb 1 10:47 snake.03.xml -rw-r--r-- 1 web138 web138 88 Feb 1 10:47 snake.04.xml -rw-r--r-- 1 web138 web138 88 Feb 1 10:47 snake.05.xml -rw-r--r-- 1 web138 web138 88 Feb 1 10:47 snake.06.xml -rw-r--r-- 1 web138 web138 1452 Feb 1 10:47 snake.xml -rw-r--r-- 1 web138 web138 7370 Feb 1 10:47 view.xsl 226 Transfer complete. ftp> Mit besten Gruessen / Best wishes, Hermann Stamm-Wilbrandt Level 3 support for XML Compiler team, Fixpack team lead WebSphere DataPower SOA Appliances https://www.ibm.com/developerworks/mydeveloperworks/blogs/HermannSW/ ---------------------------------------------------------------------- IBM Deutschland Research & Development GmbH Vorsitzende des Aufsichtsrats: Martina Koederitz Geschaeftsfuehrung: Dirk Wittkopp Sitz der Gesellschaft: Boeblingen Registergericht: Amtsgericht Stuttgart, HRB 243294
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Thread | Re: [xsl] Need debug help xslt+svg, Martin Honnen | |
Date | Re: [xsl] Need debug help xslt+svg, Martin Honnen | |
Month |