-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Bob,

I've looked at the JavaScripts for the documentation, and the XML was not well 
formed... also, I the process of fixing the JavaScript code.js, I found two 
database errors...

The diff is:

diff -u jmoldoc.orig/cmds.js jmoldoc/cmds.js
- --- jmoldoc.orig/cmds.js      2004-10-18 02:41:44.000000000 +0200
+++ jmoldoc/cmds.js     2004-11-05 10:44:22.254546000 +0100
@@ -59,7 +59,7 @@
 newCmd('.loop','','anim','Causes the script to restart at the beginning, with 
an optional time delay.','1','.on','','')
 newCmd('','','','','1','._time_delay','','')
 newCmd('.move','','anim','The move command provides powerful animation 
capabilities. It allows you to specify rotations, zooming, and translations 
to be performed in a specified period of time. xRot, yRot, and zRot are 
rotations about the cartesian axes in degrees. Zoom specifies a zoom factor 
(there is a good chance this is not currently implemented properly) xTrans, 
yTrans, and zTrans are translations in the range -100 to 100. If you do not 
know what slab is, just put in a zero. see the slab command for more 
information.  
','11','._drotx','._droty','._drotz','._dzoom','._dtransx','._dtransy','._dtransz','._dSlab','._floatSecondsTotal','._move_fps{30}','._move_maxAccel{5}')
- -newCmd('.moveto','','anim','<img align="right" src="examples/moveto.gif">The 
moveto command rotates the molecule to a predefined orientation. The first 
parameter specifies the number of seconds during which the molecule should 
rotate smoothly from the current orientation to the new orientation. A 0 for 
this first parameter specifies an instantaneous reorientation. The next three 
parameters (x, y, and z) define the axis relative to the default orientation 
about which the molecule should be rotated. The fifth parameter defines the 
counterclockwise (right-hand) rotation in degrees about this axis. "moveto 0 
0 0 0 0" rotates the model to the default orientation (equivalent to 
"reset"). If the fifth parameter is 0 but any one of x, y, or z is nonzero, 
then no reorientation occurs (because the axis has been specified, but the 
rotation is 0 degrees). In conjunction with "show orientation" this command 
allows reading and restoring specific user-specified 
orientations.','5','._inttime','._coordinate','._coordinate','._coordinate','._cwrotation','','','','','','')
+newCmd('.moveto','','anim','<img align="right" 
src="examples/moveto.gif" />The moveto command rotates the molecule to a 
predefined orientation. The first parameter specifies the number of seconds 
during which the molecule should rotate smoothly from the current orientation 
to the new orientation. A 0 for this first parameter specifies an 
instantaneous reorientation. The next three parameters (x, y, and z) define 
the axis relative to the default orientation about which the molecule should 
be rotated. The fifth parameter defines the counterclockwise (right-hand) 
rotation in degrees about this axis. "moveto 0 0 0 0 0" rotates the model to 
the default orientation (equivalent to "reset"). If the fifth parameter is 0 
but any one of x, y, or z is nonzero, then no reorientation occurs (because 
the axis has been specified, but the rotation is 0 degrees). In conjunction 
with "show orientation" this command allows reading and restoring specific 
user-specified 
orientations.','5','._inttime','._coordinate','._coordinate','._coordinate','._cwrotation','','','','','','')
 
 
 newCmd('.slab','','slabdepth',' Slab and Depth together control the 
percentage of the molecule to be displayed based on clipping planes. "slab 
on" turns slab/depth on. "slab 50"  shows the back 50% of the molecule. "slab 
25" show the back 25% of the molecule.','1','._on_off','','')
diff -u jmoldoc.orig/code.js jmoldoc/code.js
- --- jmoldoc.orig/code.js      2004-10-28 17:00:27.000000000 +0200
+++ jmoldoc/code.js     2004-11-05 10:42:42.882644000 +0100
@@ -182,28 +182,29 @@
        if(!dowritexml)shead+="<tr xml=hr><td colspan=\"5\"><hr /></td></tr 
xml=/hr></table xml=/headlist>"
        s=shead+s
  }
  if(dowritexml){
        s=s.replace(/ valign\=\"top\"/g,"")
        s=s.replace(/\<table\>/g," ")
        s=s.replace(/\<td\>/g," ")
        s=s.replace(/\<tr\>/g," ")
        s=s.replace(/\<blockquote\>/g," ")
        s=s.replace(/\<\/table\>/g," ")
        s=s.replace(/\<\/td\>/g," ")
        s=s.replace(/\<\/tr\>/g," ")
        s=s.replace(/\<\/blockquote\>/g," ")
        s=s.replace(/td xml\=/g,"")
        s=s.replace(/tr xml\=/g,"")
        s=s.replace(/table xml\=/g,"")
        s=s.replace(/i xml\=/g,"")
        s=s.replace(/b xml\=/g,"")
        s=s.replace(/\<\/\//g,"</")
        s=s.replace(/\</g,"&lt;")
+       s=s.replace(/\[\&lt\;/g,"\[\&amp\;lt\;")
        s=s.replace(/\&lt\;cmd/g,"<br />&lt;cmd")
        s=s.replace(/\&lt\;\/cmd/g,"<br />&lt;/cmd")
        s=s.replace(/\&lt\;jmol/g,"<br /><br />&lt;jmol")
        s=s.replace(/\&lt\;\/jmol/g,"<br />&lt;/jmol")
  }
  document.write(s)
 }
 
@@ -383,15 +384,15 @@
  var scr=Examples[swhat].script
  if(scr){
        if(scr.indexOf("||")<0)scr=scr.replace(/\;/g,"||")
        scr="&nbsp;&nbsp;&nbsp;"+scr.replace(/\|\|/g,"<br />&nbsp;&nbsp;&nbsp;")
        if(dowritexml)scr="<cmdscript><br />"+scr+"</cmdscript>"
        s+=(dowritexml?scr:"<tr><td class=example>"+scr+"</td></tr>")
  }
  if(Examples[swhat].html){
        s+=(dowritexml?"<cmdhtml>":"<tr><td>&nbsp;&nbsp;&nbsp;See ")    
        S=Examples[swhat].html.split(",")
        for(var i=0;i<S.length;i++){
- -             s+="<a target=_blank href=examples/"+S[i]+">"+S[i]+"</a>&nbsp;"
+               s+="<a target=\"_blank\" href=\"examples/"+S[i]+"\">"+S[i]+"</a>&nbsp;"
        }
        s+=(dowritexml?"</cmdhtml>":"</td></tr>")
  }
diff -u jmoldoc.orig/defs.js jmoldoc/defs.js
- --- jmoldoc.orig/defs.js      2004-10-16 15:11:08.000000000 +0200
+++ jmoldoc/defs.js     2004-11-05 10:44:34.314767000 +0100
@@ -74,7 +74,7 @@
 newDef('._xoffset','(integer)','x-offset','the x-offset')
 newDef('._xyz','.x,.y,.z','"x" or "y" or "z"','')
 newDef('._yoffset','(integer)','y-offset','the y-offset')
- -newDef('._backbone_radius','(decimal)[<=4.0]','backbond-radius','the radius 
of the backbone')
+newDef('._backbone_radius','(decimal)[<=4.0]','backbone-radius','the radius 
of the backbone')
 newDef('._trace_radius','(decimal)[<=4.0]','trace-radius','the radius of the 
trace')
 newDef('._mesh_radius','(decimal)[<=4.0]','mesh-radius','the overall radius 
of the mesh')
 newDef('._cartoon_radius','(decimal)[<=4.0]','cartoon-radius','the radius of 
the cartoon elements')



In other words; the two db errors:
- -moveto did not have the close tag for the <img> element.
- -typo: backbond instead of backbone

The problem with the XML wellformedness:
1. s+="<a target=\"_blank\" href=\"examples/"+S[i]+"\">"+S[i]+"</a>&nbsp;"
which licked the quotes...
2. [<=4.0], as in the def _backbone, needs to be escaped with the added line:
s=s.replace(/\[\&lt\;/g,"\[\&amp\;lt\;")

Bob, these files are not yet in CVS, right?

Ok, my next step will be to convert this XML output to DocBook XML...

Egon



- -- 
[EMAIL PROTECTED]
- ---------------------------------------
CDK: http://cdk.sf.net/
JChemPaint: http://jchempaint.sf.net/
Jmol: http://www.jmol.org/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.0.7 (SunOS)

iD8DBQFBi1VCd9R8I9Yza6YRAqSkAJ4rAqKnSYx00aQN38qYgqS5C3rHVQCffmiv
kBd5Xuu4U3PjAaTaqM0ZJ20=
=PS/Q
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by:
Sybase ASE Linux Express Edition - download now for FREE
LinuxWorld Reader's Choice Award Winner for best database on Linux.
http://ads.osdn.com/?ad_idU88&alloc_id065&op=click
_______________________________________________
Jmol-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to