Re: crosswordplayer FIXMEs

Hi L,

L wrote:

> Thanks for all of the help! Specifically for detailed emails from  
> Tobias Reif and Thomas DeWeese, quoted below. And especially to Jim Ley  
> and #svg.

>> 1. Batik Squiggle says that the CSS has an error:

>  CSS & Batik Squiggle :
> In Batik Squiggle, ids which are used in both CSS and SVG must be  
> unique in the SVG. This is much more strict than the ASV viewer, but  
> seems reasonable and correct to me. However, it does seem that CSS has  
> .bla and  SVG has <rect id="bla" class="bla"> should not generate an  
> error.

    I guess the point is that CSS 'class' can be repeated XML 'id's
must be unique.  So in the above the rect should be:

<rect class="bla" ... />

    No need to set ID (unless you want to refer to it with
getElementById, in which case it really must be unique otherwise
which of the elements with the id does it return?).

>     svgRoot.addEventListener('click',handle_click,false)
>     svgRoot.addEventListener('keydown',handle_key,false)
> 
> keyup events are preferable, as they only register once per key, but  
> they do not work on Batik at all.
> keypress events do not include DELETE, TAB, Left Arrow ...

    'keyup' works fine for me. You are right that keypress
doesn't get delete, or arrows (hmm!, I'll try and see what is up
here).

> On Dec 2, 2003, at 2:59 PM, Thomas DeWeese wrote:
> 
>>
>>    Recent version of Batik now only produce a warning and continues
>> to display the document.
> 
> I downloaded and have been testing with Batik 1.5, is this the "recent"  
> version or does "recent" refer to a build from cvs?

    Sorry, recent refers to CVS.


> Thanks, this code is much better. Technically, it should have worked as  
> it was. And allows for better catching of 'file loaded' status.  
> Especially as I'd like to add a couple of retrys to the getURL process.  
> Note that parseXML now returns a Document Fragment, not a Document.

     This was a little disjointed and I'm not sure I followed it.

>>   4) The CSS for text.clue's uses .3em - to get this right I have
>>      to use .09em in Batik.  This may indicate that Batik is using
>>      the wrong base value to calculate em sizes in this case
>>     (.3*.3 = 0.9 so if one of the parent elements has
>>     font-size=".3em" and Batik misses it then you might see
>>     this issue).
> 
> I haven''t had time to look at this yet. Am hoping there is some way  
> that works in both.

    I now believe this to be an Adobe bug.  I took a long look at
the document structure and as far as I could tell no parent had
.3em as it's font-size.  I suspect this has to do with the fact
that this is a text with sub tspans.  My suggestion for fixing it
would be to move away from 'em' and to a 'user space' value.  In
most cases if the UA has a larger initial value for font size
the document will just become totally unreadable because the text
is allocated rendering space in user space units.  At least if the
text stays in it's assigned location the user can zoom the document
to get larger text.

    My guess is that the default em is ~10 userspace units.

> SVG private attribute:
> 
> I am using this to create a "binding" between a JS object and a SVG  
> object. Then I 'pretend' that the two objects are one SVGJS object. It  
> works in Safari. I am not having much luck with using the private  
> attribute  in Batik. And so, even though the crossword does build  
> correctly (except for the lager clues), much of the functionality is  
> missing. 

    I noticed some sort of problem here although I have no idea why.

> Including the crossword and control menu "show" functions. In  
> this case, the functions change the "display" value to "inherit" or  
> "none". While it is changed in the DOM, the change is not reflected in  
> the viewer. I wanted to put up crosswordplayer 1.0b3 for FIXMEs and  
> have it working with Batik, but i have to admit defeat at the moment.

     These are working for me.  It is possible that I tweaked something
in bindings.js...

> <script type="text/ecmascript"> <![CDATA[
> [...]
> var svgjsNS = "http://schema.koonts.com/svgjs"
> [...]
> 
> Following are results of tests of get and set attrubute, run in order  
> of a1..a5. Batik and Safari differ in interpretation.
> Here, results are from log messages following calls to has,set,get  
> attrubute:

    So follow everything here except what 'a5, a1' means.  To get
what you want you should use AttributeNS(svgjsNS, 'binding', 'foo');
You should also be able to use
AttributeNS(svgjsNS, 'svgjs:binding', 'foo');

     I do this and it works fine in ASV and Batik.

    According to XML they both refer to the attribute 'binding' but
the second one has the prefix 'svgjs', and the qname is
'svgjs:binding'.

> 
> GET after SET in BATIK and SAFARI                   BATIK               
> SAFARI
> AttributeNS(svgjsNS, 'binding', 'a1')                   a5, 
> a1              a5,  a1
> Attribute('binding', 'a2')                                  
> a2                  a5,  a2
> Attribute('svgjs:binding', 'a3')                        
> a3                  a3
> AttributeNS('svgjs', 'binding', 'a4')                  a4            a4
> AttributeNS(svgjsNS, 'svgjs:binding', 'a5')        no attribute        
> no  attribute
> 
> Here I am guessing at the NAMESPACE:
> 
> SET in BATIK's DOM Viewer                       NAMESPACE?  NAME         
>        VALUE
>                                                             
> svgNS(default)   xmlns:svgjs      http://schema.koonts.com/svgjs
> AttributeNS(svgjsNS, 'binding', 'a1')           svgjsNS         
> binding              a1
> Attribute('binding', 'a2')                              svgNS(default)   
> binding             a2
> Attribute('svgjs:binding', 'a3')                    svgNS(default)   
> svgjs:binding   a3
> AttributeNS('svgjs', 'binding', 'a4')               
> svgjs                 binding             a4
> AttributeNS(svgjsNS, 'svgjs:binding', 'a5')    svgjsNS               
> svgjs:binding   a5 (replaces? binding a1)
> 

Received on Thursday, 11 December 2003 13:43:37 UTC