xsl-list
[Top] [All Lists]

RE: [xsl] XSLT 1.0 n-queens and questions

2012-04-20 16:28:02
Scott, thanks for the Unicode chess piece pointers!

In a 2009 posting Martin helped me to get the .gif pieces correctly placed
from a stylesheet (quirks mode):
www.biglist.com/lists/lists.mulberrytech.com/xsl-list/archives/200907/msg00180.html


I just took the stylesheet for displaying a chess position and modifyed it
to use "your" unicode characters instead of .gifs.

You may see the result here:
http://stamm-wilbrandt.de/en/xsl-list/chess/bw/p2n.xml

It uses a (modified) stylesheet:
http://stamm-wilbrandt.de/en/xsl-list/chess/bw/boardAN.xsl

The previous board view can be seen here:
http://stamm-wilbrandt.de/en/xsl-list/chess/p2n.xml


Under Linux the new view looks perfect.
But I tried on a Windows 2003 server as well on a Windows XP machine, and
these unicode characters all get displayed as empty rectangles :-(
So the advantage of the .gif approach is a guaranteed outcome ...


I have two questions.

1)
While the chess pieces are fine, I was not able to find charcter(s) for
the empty fields -- the characters chosen above are at least from the
right size, but look not really "empty" (rectangles).
Which Unicode character will fit the size of the chess pieces and be either
complete white or complete black?

2)
With  style="font-size: 64"  the following chess pieces get really big:
http://stamm-wilbrandt.de/en/xsl-list/chess/bw/bw.html

What needs to be changed in boardAN.xsl to resize the chess pieces there?
I tried at least 5 different options and none worked.
Is this another problem with quirks mode?


Mit besten Gruessen / Best wishes,

Hermann Stamm-Wilbrandt
Level 3 support for XML Compiler team and 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


                                                                                
                                                               
  From:       Scott Trenda <Scott(_dot_)Trenda(_at_)oati(_dot_)net>             
                                                                                
                                                                                
                                                               
  To:         xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com,                 
                                                                                
                                                                                
                                                               
  Date:       04/20/2012 04:30 PM                                               
                                                               
                                                                                
                                                               
  Subject:    RE: [xsl] XSLT 1.0 n-queens and questions                         
                                                               
                                                                                
                                                               





Nice work. I don't have any node-set() suggestions, just a comment about
the chessboard representation. You don't need to use images at all here.
Unicode actually contains all the characters for chess pieces, at
codepoints 2654-265F (9812-9823). White queen is 2655 (9813) and black
queen is 265B (9819). Could simplify your code a little.

~ Scott


-----Original Message-----
From: Hermann Stamm-Wilbrandt [mailto:STAMMW(_at_)de(_dot_)ibm(_dot_)com]
Sent: Friday, April 20, 2012 5:26 AM
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: [xsl] XSLT 1.0 n-queens and questions


Hello,

I posted a XSLT 1.0 implementation for n-queens running in all big5
browsers
https://www.ibm.com/developerworks/mydeveloperworks/blogs/HermannSW/entry/n_queens_xsl_xml14


It produces all solutions for 4<=n<=9, nicely grouped.

I have two questions on the solution:

1)
Grouping is done by two solutions considered equivalent if one can be
transformed into the other by rotations and/or mirroring.

I did not find a way to make this "equivalence" available in xsl:key for
using Muenchian grouping -- can anybody think of how Muenchian grouping be
used instead the "handmade" duplicate elimination in n-queens.xsl.xml?

2)
I made much use of exslt:node-set() function although the templates itself
use xsl:call-template and xsl:apply-templates.

Is a more "functional" solution without so many exslt:node-set() calls
possible in XSLT 1.0?


Mit besten Gruessen / Best wishes,

Hermann Stamm-Wilbrandt
Level 3 support for XML Compiler team and 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


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--



--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--





--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>