hmath-commits Mailing List for HMath - MathML Wiki/BLOG (Page 4)
Status: Pre-Alpha
Brought to you by:
jsurfer
You can subscribe to this list here.
| 2004 |
Jan
|
Feb
(28) |
Mar
(121) |
Apr
(49) |
May
(11) |
Jun
(3) |
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|---|
|
From: Klaus H. <js...@us...> - 2004-03-28 17:34:42
|
Update of /cvsroot/hmath/org.hmath.server/WEB-INF/src/META-INF/services In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25636/WEB-INF/src/META-INF/services Modified Files: org.radeox.macro.Macro Log Message: parser changes Index: org.radeox.macro.Macro =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/WEB-INF/src/META-INF/services/org.radeox.macro.Macro,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** org.radeox.macro.Macro 20 Mar 2004 10:11:55 -0000 1.2 --- org.radeox.macro.Macro 28 Mar 2004 17:23:23 -0000 1.3 *************** *** 38,41 **** --- 38,42 ---- org.snipsnap.render.macro.LabelSearchMacro #hmath Macros + org.hartmath.server.macro.AppletMacro org.hartmath.server.macro.CodeMacro org.hartmath.server.macro.EvalMacro |
|
From: Klaus H. <js...@us...> - 2004-03-28 17:32:39
|
Update of /cvsroot/hmath/org.hmath.server/static In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25411/static Modified Files: math.css Log Message: JavaScript buttons for MSIE Index: math.css =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/static/math.css,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** math.css 20 Mar 2004 10:16:53 -0000 1.2 --- math.css 28 Mar 2004 17:21:19 -0000 1.3 *************** *** 6,10 **** http://www.hartlage.de:8080/hmath/space/start Version: Silver Owl 160 HMath ! Last modified on Sun, 14 Mar 2004 */ --- 6,10 ---- http://www.hartlage.de:8080/hmath/space/start Version: Silver Owl 160 HMath ! Last modified on Sat, 20 Mar 2004 */ *************** *** 99,103 **** {font-size:0.7em; line-height:1em;} ! Cap::before, Cup::before, Int::before, Prod::before, Sum::before {display:block; font-size:2.5em; --- 99,103 ---- {font-size:0.7em; line-height:1em;} ! Cap:before, Cup:before, Int:before, Prod:before, Sum:before {display:block; font-size:2.5em; *************** *** 108,112 **** font-size:0.7em; line-height:1em;} ! x + x::before {display:block; font-size:2.5em; --- 108,112 ---- font-size:0.7em; line-height:1em;} ! x + x:before {display:block; font-size:2.5em; *************** *** 117,150 **** m InT x, m Int, r InT x, r Int {margin-left:1.25em;} ! m x + x::before, m Cap::before, m Cup::before, m Int::before, m Prod::before, m Sum::before {margin-left:-0.7em; line-height:0.2em;} ! m InT x + x::before, m Int::before, r InT x + x::before, r Int::before {margin-left:-0.5em;} ! Cap::before, CaP x + x::before {content:"\2229";} ! Cup::before, CuP x + x::before {content:"\222A";} ! Int::before, InT x + x::before {content:"\222B";} ! Int[double]::before, InT[double] x + x::before {content:"\222C";} ! Int[triple]::before, InT[triple] x + x::before {content:"\222D";} ! Int[contour]::before, InT[contour] x + x::before {content:"\222E";} ! Int[doubles]::before, InT[doubles] x + x::before {content:"\222F";} ! Int[triples]::before, InT[triples] x + x::before {content:"\2230";} ! Int[orient]::before, InT[orient] x + x::before {content:"\2232";} ! Prod::before, ProD x + x::before {content:"\03A0";} ! Prod[direct]::before, ProD[direct] x + x::before {content:"\2297";} ! Sum::before, SuM x + x::before {content:"\03A3";} ! Sum[direct]::before, SuM[direct] x + x::before {content:"\2295";} sum, prod, int, dint, tint, cint, dcint, tcint, ocint --- 117,150 ---- m InT x, m Int, r InT x, r Int {margin-left:1.25em;} ! m x + x:before, m Cap:before, m Cup:before, m Int:before, m Prod:before, m Sum:before {margin-left:-0.7em; line-height:0.2em;} ! m InT x + x:before, m Int:before, r InT x + x:before, r Int:before {margin-left:-0.5em;} ! Cap:before, CaP x + x:before {content:"\2229";} ! Cup:before, CuP x + x:before {content:"\222A";} ! Int:before, InT x + x:before {content:"\222B";} ! Int[double]:before, InT[double] x + x:before {content:"\222C";} ! Int[triple]:before, InT[triple] x + x:before {content:"\222D";} ! Int[contour]:before, InT[contour] x + x:before {content:"\222E";} ! Int[doubles]:before, InT[doubles] x + x:before {content:"\222F";} ! Int[triples]:before, InT[triples] x + x:before {content:"\2230";} ! Int[orient]:before, InT[orient] x + x:before {content:"\2232";} ! Prod:before, ProD x + x:before {content:"\03A0";} ! Prod[direct]:before, ProD[direct] x + x:before {content:"\2297";} ! Sum:before, SuM x + x:before {content:"\03A3";} ! Sum[direct]:before, SuM[direct] x + x:before {content:"\2295";} sum, prod, int, dint, tint, cint, dcint, tcint, ocint *************** *** 168,182 **** {font-size:0.7em; line-height:1em;} ! Lim::before, Res::before, Sur::before {display:block; font-size:1.45em; line-height:1.5em; padding-top:0.7em;} ! Lim::before {content:"lim"; text-align:left;} ! Res::before {content:"res"} ! Sur::before {content:"sup"} g --- 168,182 ---- {font-size:0.7em; line-height:1em;} ! Lim:before, Res:before, Sur:before {display:block; font-size:1.45em; line-height:1.5em; padding-top:0.7em;} ! Lim:before {content:"lim"; text-align:left;} ! Res:before {content:"res"} ! Sur:before {content:"sup"} g *************** *** 198,213 **** {display:table-cell; padding:0 8px;} ! M > r::before, M > r::after, ! v > r::before, v > r::after {display:table-cell; content:"\A0"; border-bottom:solid 1px; ! border-left:double 3px; border-top:hidden;} ! M > r::after, v > r::after {border-left:none; ! border-right:double 3px;} ! M > r:first-child::before, M > r:first-child::after, ! v > r:first-child::before, v > r:first-child::after {border-top:solid 1px;} de --- 198,232 ---- {display:table-cell; padding:0 8px;} ! M > r:before, M > r:after, ! v > r:before, v > r:after {display:table-cell; content:"\A0"; border-bottom:solid 1px; ! border-left:solid 1px; border-top:hidden;} ! M > r:after, v > r:after {border-left:none; ! border-right:solid 1px;} ! M[rbrace] > r:after, v[rbrace] > r:after ! {border-right:double 3px;} ! M[rsolid] > r:after, v[rsolid] > r:after ! {border-top:none!important; ! border-right:solid 1px; ! border-bottom:none;} ! M[rdouble] > r:after, v[rdouble] > r:after ! {border-top:none!important; ! border-right:double 3px; ! border-bottom:none;} ! M[lbrace] > r:before, v[lbrace] > r:before ! {border-left:double 3px;} ! M[lsolid] > r:before, v[lsolid] > r:before ! {border-top:none!important; ! border-bottom:none;} ! M[ldouble] > r:before, v[ldouble] > r:before ! {border-top:none!important; ! border-left:double 3px; ! border-bottom:none;} ! M > r:first-child:before, M > r:first-child:after, ! v > r:first-child:before, v > r:first-child:after {border-top:solid 1px;} de *************** *** 219,224 **** e {page-break-inside:avoid;} - root - {background-color:white;} } --- 238,241 ---- *************** *** 231,235 **** border-width:1px 0 1px 1px; vertical-align:middle; ! content:"\00A0";} Sb:after {border-width:1px 1px 1px 0;} \ No newline at end of file --- 248,253 ---- border-width:1px 0 1px 1px; vertical-align:middle; ! content:"\00A0"; ! white-space:pre;} Sb:after {border-width:1px 1px 1px 0;} \ No newline at end of file |
|
From: Klaus H. <js...@us...> - 2004-03-28 17:32:25
|
Update of /cvsroot/hmath/org.hmath.server/static In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25372/static Added Files: wikibits.js Log Message: JavaScript buttons for MSIE --- NEW FILE: wikibits.js --- <!-- // bbCode control by // subBlue design // www.subBlue.com // Startup variables var imageTag = false; var theSelection = false; // Check for Browser & Platform for PC & IE specific bits // More details from: http://www.mozilla.org/docs/web-developer/sniffer/browser_type.html var clientPC = navigator.userAgent.toLowerCase(); // Get client info var clientVer = parseInt(navigator.appVersion); // Get browser version var is_ie = ((clientPC.indexOf("msie") != -1) && (clientPC.indexOf("opera") == -1)); var is_nav = ((clientPC.indexOf('mozilla')!=-1) && (clientPC.indexOf('spoofer')==-1) && (clientPC.indexOf('compatible') == -1) && (clientPC.indexOf('opera')==-1) && (clientPC.indexOf('webtv')==-1) && (clientPC.indexOf('hotjava')==-1)); var is_win = ((clientPC.indexOf("win")!=-1) || (clientPC.indexOf("16bit") != -1)); var is_mac = (clientPC.indexOf("mac")!=-1); // Helpline messages b_help = "Bold text: __Text__ (alt+b)"; i_help = "Italic text: ~~Text~~ (alt+i)"; s_help = "Strikethrough text: --Text-- (alt+s)"; q_help = "Quote a text: {quote}Text{quote} (alt+q)"; c_help = "Show source: {code}source{code} (alt+c)"; m_help = "List: <math>LaTeX formula</math> (alt+m)"; p_help = "Insert image: {image:picture.png} (alt+p)"; w_help = "Insert URL: {link:The HMath home page|http://www.hmath.org } (alt+w)"; // Define the bbCode tags bbcode = new Array(); bbtags = new Array('__','__','~~','~~','--','--','{quote}','{quote}','{code}','{code}','<math>','</math>','{list}','{list}','{image:','}','{link:','}'); imageTag = false; // Shows the help messages in the helpline window function helpline(help) { document.f.helpbox.value = eval(help + "_help"); } // Replacement for arrayname.length property function getarraysize(thearray) { for (i = 0; i < thearray.length; i++) { if ((thearray[i] == "undefined") || (thearray[i] == "") || (thearray[i] == null)) return i; } return thearray.length; } // Replacement for arrayname.push(value) not implemented in IE until version 5.5 // Appends element to the array function arraypush(thearray,value) { thearray[ getarraysize(thearray) ] = value; } // Replacement for arrayname.pop() not implemented in IE until version 5.5 // Removes and returns the last element of an array function arraypop(thearray) { thearraysize = getarraysize(thearray); retval = thearray[thearraysize - 1]; delete thearray[thearraysize - 1]; return retval; } function checkForm() { formErrors = false; if (document.f.content.value.length < 2) { formErrors = "Sie müssen zu Ihrem Beitrag einen Text eingeben."; } if (formErrors) { alert(formErrors); return false; } else { bbstyle(-1); //formObj.preview.disabled = true; //formObj.submit.disabled = true; return true; } } function emoticon(text) { text = ' ' + text + ' '; if (document.f.content.createTextRange && document.f.content.caretPos) { var caretPos = document.f.content.caretPos; caretPos.text = caretPos.text.charAt(caretPos.text.length - 1) == ' ' ? text + ' ' : text; document.f.content.focus(); } else { document.f.content.value += text; document.f.content.focus(); } } function bbfontstyle(bbopen, bbclose) { if ((clientVer >= 4) && is_ie && is_win) { theSelection = document.selection.createRange().text; if (!theSelection) { document.f.content.value += bbopen + bbclose; document.f.content.focus(); return; } document.selection.createRange().text = bbopen + theSelection + bbclose; document.f.content.focus(); return; } else { document.f.content.value += bbopen + bbclose; document.f.content.focus(); return; } storeCaret(document.f.content); } function bbstyle(bbnumber) { donotinsert = false; theSelection = false; bblast = 0; if (bbnumber == -1) { // Close all open tags & default button names while (bbcode[0]) { butnumber = arraypop(bbcode) - 1; document.f.content.value += bbtags[butnumber + 1]; buttext = eval('document.f.addbbcode' + butnumber + '.value'); eval('document.f.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"'); } imageTag = false; // All tags are closed including image tags :D document.f.content.focus(); return; } if ((clientVer >= 4) && is_ie && is_win) theSelection = document.selection.createRange().text; // Get text selection if (theSelection) { // Add tags around selection document.selection.createRange().text = bbtags[bbnumber] + theSelection + bbtags[bbnumber+1]; document.f.content.focus(); theSelection = ''; return; } // Find last occurance of an open tag the same as the one just clicked for (i = 0; i < bbcode.length; i++) { if (bbcode[i] == bbnumber+1) { bblast = i; donotinsert = true; } } if (donotinsert) { // Close all open tags up to the one just clicked & default button names while (bbcode[bblast]) { butnumber = arraypop(bbcode) - 1; document.f.content.value += bbtags[butnumber + 1]; buttext = eval('document.f.addbbcode' + butnumber + '.value'); eval('document.f.addbbcode' + butnumber + '.value ="' + buttext.substr(0,(buttext.length - 1)) + '"'); imageTag = false; } document.f.content.focus(); return; } else { // Open tags if (imageTag && (bbnumber != 14)) { // Close image tag before adding another document.f.content.value += bbtags[15]; lastValue = arraypop(bbcode) - 1; // Remove the close image tag from the list document.f.addbbcode14.value = "Img"; // Return button back to normal state imageTag = false; } // Open tag document.f.content.value += bbtags[bbnumber]; if ((bbnumber == 14) && (imageTag == false)) imageTag = 1; // Check to stop additional tags after an unclosed image tag arraypush(bbcode,bbnumber+1); eval('document.f.addbbcode'+bbnumber+'.value += "*"'); document.f.content.focus(); return; } storeCaret(document.post.message); } // Insert at Claret position. Code from // http://www.faqts.com/knowledge_base/view.phtml/aid/1052/fid/130 function storeCaret(textEl) { if (textEl.createTextRange) textEl.caretPos = document.selection.createRange().duplicate(); } |
|
From: Klaus H. <js...@us...> - 2004-03-28 17:32:00
|
Update of /cvsroot/hmath/org.hmath.server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25277 Modified Files: edit.jsp Log Message: JavaScript buttons for MSIE Index: edit.jsp =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/edit.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** edit.jsp 9 Mar 2004 20:16:01 -0000 1.1 --- edit.jsp 28 Mar 2004 17:20:41 -0000 1.2 *************** *** 4,8 **** ** @version $Id$ --%> ! <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> --- 4,8 ---- ** @version $Id$ --%> ! <%@ taglib uri="http://hartmath.org/hartmath" prefix="hm" %> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> *************** *** 19,26 **** <s:check roles="Authenticated" permission="Edit" > <div class="snip-input"> ! <form class="form" name="f" method="post" action="exec/store" enctype="multipart/form-data"> ! <table> ! <tr><td><textarea name="content" type="text" cols="80" rows="20"><c:out value="${content}" escapeXml="true"/></textarea></td></tr> ! <tr><td class="form-buttons"> <input value="Preview" name="preview" type="submit"/> <input value="Save" name="save" type="submit"/> --- 19,59 ---- <s:check roles="Authenticated" permission="Edit" > <div class="snip-input"> ! <form class="form" name="f" method="post" action="exec/store" enctype="multipart/form-data"> ! <table width="600" border="0" cellspacing="0" cellpadding="2"> ! <hm:browser type="mathplayer"> ! <tr align="center" valign="middle"> ! <td colspan="1"><span class="genmed"> ! <input type="button" class="button" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 40px" onClick="bbstyle(0)" onMouseOver="helpline('b')" /> ! </span></td> ! <td colspan="1"><span class="genmed"> ! <input type="button" class="button" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 40px" onClick="bbstyle(2)" onMouseOver="helpline('i')" /> ! </span></td> ! <td><span class="genmed"> ! <input type="button" class="button" accesskey="s" name="addbbcode4" value=" s " style="width: 40px" onClick="bbstyle(4)" onMouseOver="helpline('s')" /> ! </span></td> ! <td><span class="genmed"> ! <input type="button" class="button" accesskey="q" name="addbbcode6" value="Quote" style="width: 60px" onClick="bbstyle(6)" onMouseOver="helpline('q')" /> ! </span></td> ! <td><span class="genmed"> ! <input type="button" class="button" accesskey="c" name="addbbcode8" value="Code" style="width: 60px" onClick="bbstyle(8)" onMouseOver="helpline('c')" /> ! </span></td> ! <td><span class="genmed"> ! <input type="button" class="button" accesskey="m" name="addbbcode10" value="Math" style="width: 60px" onClick="bbstyle(10)" onMouseOver="helpline('m')" /> ! </span></td> ! <td><span class="genmed"> ! <input type="button" class="button" accesskey="p" name="addbbcode14" value="Img" style="width: 50px" onClick="bbstyle(14)" onMouseOver="helpline('p')" /> ! </span></td> ! <td><span class="genmed"> ! <input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 50px" onClick="bbstyle(16)" onMouseOver="helpline('w')" /> ! </span></td> ! </tr> ! <tr> ! <td colspan="9"> <span class="gensmall"> ! <input type="text" name="helpbox" size="45" maxlength="100" style="width:600px; font-size:10px" class="helpline" value="2 modes: (1)Press button appends tag to text (2)Select text + Press button " /> ! </span></td> ! </tr> ! </hm:browser> ! <tr><td colspan="9"><textarea name="content" type="text" cols="100" rows="20" style="width:600px" class="post" onselect="storeCaret(this);" onclick="storeCaret(this);" onkeyup="storeCaret(this);"><c:out value="${content}" escapeXml="true"/></textarea></td></tr> ! <tr><td colspan="9" class="form-buttons"> <input value="Preview" name="preview" type="submit"/> <input value="Save" name="save" type="submit"/> |
|
From: Klaus H. <js...@us...> - 2004-03-28 17:31:45
|
Update of /cvsroot/hmath/org.hmath.server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25245 Modified Files: main.jsp Log Message: JavaScript buttons for MSIE Index: main.jsp =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/main.jsp,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** main.jsp 20 Mar 2004 14:35:54 -0000 1.4 --- main.jsp 28 Mar 2004 17:20:26 -0000 1.5 *************** *** 22,25 **** --- 22,27 ---- </hm:browser> <hm:browser type="css"> + <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<c:out value='${app.configuration.locale}'/>"> </hm:browser> *************** *** 27,31 **** <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> - <html xmlns:m="http://www.w3.org/1999/xhtml" lang="<c:out value='${app.configuration.locale}'/>" xml:lang="<c:out value='${app.configuration.locale}'/>"> </hm:browser> --- 29,32 ---- *************** *** 59,63 **** --- 60,66 ---- <!-- title of this document --> <title><c:out value="${app.configuration.name}" default="SnipSnap"/> :: <c:out value="${snip.name}"/></title> + <!-- <script type="text/javascript" src="static/mathml.js"></script> --> <hm:browser type="mathplayer"> + <script type="text/javascript" src="static/wikibits.js"></script> <object id="showEqn" classid="clsid:32F66A20-7614-11D4-BD11-00104BD3F987"> <!--comment required to prevent this becoming an empty tag--> |
|
From: Klaus H. <js...@us...> - 2004-03-28 17:31:31
|
Update of /cvsroot/hmath/org.hmath.server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25212 Modified Files: new.jsp Log Message: JavaScript buttons for MSIE Index: new.jsp =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/new.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** new.jsp 9 Mar 2004 20:16:01 -0000 1.1 --- new.jsp 28 Mar 2004 17:20:12 -0000 1.2 *************** *** 4,13 **** ** @version $Id$ --%> ! <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <%@ taglib uri="http://snipsnap.com/snipsnap" prefix="s" %> ! <div class="snip-wrapper"> <div class="snip-title"><h1 class="snip-name"><fmt:message key="snip.create"/></h1></div> <form class="form" name="f" method="post" action="exec/store" enctype="multipart/form-data"> --- 4,14 ---- ** @version $Id$ --%> ! <%@ taglib uri="http://hartmath.org/hartmath" prefix="hm" %> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <%@ taglib uri="http://snipsnap.com/snipsnap" prefix="s" %> + <%@ page import="org.radeox.util.Encoder"%> ! <div class="snip-wrapper"> <div class="snip-title"><h1 class="snip-name"><fmt:message key="snip.create"/></h1></div> <form class="form" name="f" method="post" action="exec/store" enctype="multipart/form-data"> *************** *** 33,39 **** <div class="snip-content"> <div class="snip-input"> ! <table> ! <tr><td><textarea name="content" type="text" cols="80" rows="20"><c:out value="${content}" escapeXml="true"/></textarea></td></tr> ! <tr><td class="form-buttons"> <input value="<fmt:message key="dialog.preview"/>" name="preview" type="submit"/> <input value="<fmt:message key="dialog.save"/>" name="save" type="submit"/> --- 34,73 ---- <div class="snip-content"> <div class="snip-input"> ! <table width="600" border="0" cellspacing="0" cellpadding="2"> ! <hm:browser type="mathplayer"> ! <tr align="center" valign="middle"> ! <td colspan="1"><span class="genmed"> ! <input type="button" class="button" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 40px" onClick="bbstyle(0)" onMouseOver="helpline('b')" /> ! </span></td> ! <td colspan="1"><span class="genmed"> ! <input type="button" class="button" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 40px" onClick="bbstyle(2)" onMouseOver="helpline('i')" /> ! </span></td> ! <td><span class="genmed"> ! <input type="button" class="button" accesskey="s" name="addbbcode4" value=" s " style="width: 40px" onClick="bbstyle(4)" onMouseOver="helpline('s')" /> ! </span></td> ! <td><span class="genmed"> ! <input type="button" class="button" accesskey="q" name="addbbcode6" value="Quote" style="width: 60px" onClick="bbstyle(6)" onMouseOver="helpline('q')" /> ! </span></td> ! <td><span class="genmed"> ! <input type="button" class="button" accesskey="c" name="addbbcode8" value="Code" style="width: 60px" onClick="bbstyle(8)" onMouseOver="helpline('c')" /> ! </span></td> ! <td><span class="genmed"> ! <input type="button" class="button" accesskey="m" name="addbbcode10" value="Math" style="width: 60px" onClick="bbstyle(10)" onMouseOver="helpline('m')" /> ! </span></td> ! <td><span class="genmed"> ! <input type="button" class="button" accesskey="p" name="addbbcode14" value="Img" style="width: 50px" onClick="bbstyle(14)" onMouseOver="helpline('p')" /> ! </span></td> ! <td><span class="genmed"> ! <input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 50px" onClick="bbstyle(16)" onMouseOver="helpline('w')" /> ! </span></td> ! </tr> ! <tr> ! <td colspan="9"> <span class="gensmall"> ! <input type="text" name="helpbox" size="45" maxlength="100" style="width:600px; font-size:10px" class="helpline" value="2 modes: (1)Press button appends tag to text (2)Select text + Press button " /> ! </span></td> ! </tr> ! </hm:browser> ! <tr><td colspan="9"><textarea name="content" type="text" cols="80" rows="20" style="width:600px" class="post" onselect="storeCaret(this);" onclick="storeCaret(this);"><c:out value="${content}" escapeXml="true"/></textarea></td></tr> ! <tr><td colspan="9" class="form-buttons"> <input value="<fmt:message key="dialog.preview"/>" name="preview" type="submit"/> <input value="<fmt:message key="dialog.save"/>" name="save" type="submit"/> |
|
From: Klaus H. <js...@us...> - 2004-03-28 17:31:08
|
Update of /cvsroot/hmath/org.hmath.server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25133 Modified Files: post.jsp Log Message: JavaScript buttons for MSIE Index: post.jsp =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/post.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** post.jsp 9 Mar 2004 20:16:01 -0000 1.1 --- post.jsp 28 Mar 2004 17:19:49 -0000 1.2 *************** *** 4,8 **** ** @version $Id$ --%> ! <%@ taglib uri="http://snipsnap.com/snipsnap" prefix="s" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> --- 4,8 ---- ** @version $Id$ --%> ! <%@ taglib uri="http://hartmath.org/hartmath" prefix="hm" %> <%@ taglib uri="http://snipsnap.com/snipsnap" prefix="s" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> *************** *** 16,24 **** <div class="preview"><div class="snip-content"><c:out value="${preview}" escapeXml="false"/></div></div> </c:if> ! <form class="form" method="post" action="exec/storepost" enctype="multipart/form-data"> ! <table> ! <tr><td>Title<br/><input name="title" value="<c:out value="${title}" escapeXml="false"/>"/></td></tr> ! <tr><td><textarea name="content" type="text" cols="80" rows="20"><c:out value="${content}" escapeXml="true"/></textarea></td></tr> ! <tr><td class="form-buttons"> <input value="<fmt:message key="dialog.preview"/>" name="preview" type="submit"/> <input value="<fmt:message key="weblog.post"/>" name="save" type="submit"/> --- 16,57 ---- <div class="preview"><div class="snip-content"><c:out value="${preview}" escapeXml="false"/></div></div> </c:if> ! <form class="form" name="f" method="post" action="exec/storepost" enctype="multipart/form-data"> ! <table width="600" border="0" cellspacing="0" cellpadding="2"> ! <hm:browser type="mathplayer"> ! <tr align="center" valign="middle"> ! <td colspan="1"><span class="genmed"> ! <input type="button" class="button" accesskey="b" name="addbbcode0" value=" B " style="font-weight:bold; width: 40px" onClick="bbstyle(0)" onMouseOver="helpline('b')" /> ! </span></td> ! <td colspan="1"><span class="genmed"> ! <input type="button" class="button" accesskey="i" name="addbbcode2" value=" i " style="font-style:italic; width: 40px" onClick="bbstyle(2)" onMouseOver="helpline('i')" /> ! </span></td> ! <td><span class="genmed"> ! <input type="button" class="button" accesskey="s" name="addbbcode4" value=" s " style="width: 40px" onClick="bbstyle(4)" onMouseOver="helpline('s')" /> ! </span></td> ! <td><span class="genmed"> ! <input type="button" class="button" accesskey="q" name="addbbcode6" value="Quote" style="width: 60px" onClick="bbstyle(6)" onMouseOver="helpline('q')" /> ! </span></td> ! <td><span class="genmed"> ! <input type="button" class="button" accesskey="c" name="addbbcode8" value="Code" style="width: 60px" onClick="bbstyle(8)" onMouseOver="helpline('c')" /> ! </span></td> ! <td><span class="genmed"> ! <input type="button" class="button" accesskey="m" name="addbbcode10" value="Math" style="width: 60px" onClick="bbstyle(10)" onMouseOver="helpline('m')" /> ! </span></td> ! <td><span class="genmed"> ! <input type="button" class="button" accesskey="p" name="addbbcode14" value="Img" style="width: 50px" onClick="bbstyle(14)" onMouseOver="helpline('p')" /> ! </span></td> ! <td><span class="genmed"> ! <input type="button" class="button" accesskey="w" name="addbbcode16" value="URL" style="text-decoration: underline; width: 50px" onClick="bbstyle(16)" onMouseOver="helpline('w')" /> ! </span></td> ! </tr> ! <tr> ! <td colspan="9"> <span class="gensmall"> ! <input type="text" name="helpbox" size="45" maxlength="100" style="width:600px; font-size:10px" class="helpline" value="2 modes: (1)Press button appends tag to text (2)Select text + Press button " /> ! </span></td> ! </tr> ! </hm:browser> ! <tr><td colspan="9">Title<br/><input name="title" value="<c:out value="${title}" escapeXml="false"/>"/></td></tr> ! <tr><td colspan="9"><textarea name="content" type="text" cols="80" rows="20" style="width:600px" class="post" onselect="storeCaret(this);" onclick="storeCaret(this);"><c:out value="${content}" escapeXml="true"/></textarea></td></tr> ! <tr><td colspan="9" class="form-buttons"> <input value="<fmt:message key="dialog.preview"/>" name="preview" type="submit"/> <input value="<fmt:message key="weblog.post"/>" name="save" type="submit"/> |
|
From: Klaus H. <js...@us...> - 2004-03-21 17:45:56
|
Update of /cvsroot/hmath/org.hmath.server/WEB-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13285/WEB-INF Modified Files: hartmath-taglib.tld Log Message: misc changes Index: hartmath-taglib.tld =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/WEB-INF/hartmath-taglib.tld,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** hartmath-taglib.tld 20 Mar 2004 10:15:36 -0000 1.1 --- hartmath-taglib.tld 21 Mar 2004 17:35:47 -0000 1.2 *************** *** 54,63 **** <rtexprvalue>true</rtexprvalue> </attribute> - - <attribute> - <name>content</name> - <required>false</required> - <rtexprvalue>true</rtexprvalue> - </attribute> </tag> --- 54,57 ---- |
|
From: Klaus H. <js...@us...> - 2004-03-21 17:28:22
|
Update of /cvsroot/hmath/org.hmath.server/WEB-INF/src/org/hartmath/server/filter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9101/WEB-INF/src/org/hartmath/server/filter Modified Files: WikipediaFilter.java Log Message: misc changes Index: WikipediaFilter.java =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/WEB-INF/src/org/hartmath/server/filter/WikipediaFilter.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** WikipediaFilter.java 20 Mar 2004 14:32:20 -0000 1.3 --- WikipediaFilter.java 21 Mar 2004 17:18:08 -0000 1.4 *************** *** 33,37 **** import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; ! import org.hartmath.server.taglib.BrowserSniffer; import org.hartmath.tex2mml.TeXParser; import org.radeox.api.engine.ImageRenderEngine; --- 33,37 ---- import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; ! import org.hartmath.server.taglib.MathSniffer; import org.hartmath.tex2mml.TeXParser; import org.radeox.api.engine.ImageRenderEngine; *************** *** 418,421 **** --- 418,422 ---- protected int getNextToken() throws InvalidInputException { + boolean startOfIndent = false; fWhiteStartPosition = 0; fWhiteStart = false; *************** *** 439,442 **** --- 440,459 ---- } break; + case ':' : + + if (fCurrentPosition >= 2) { + char beforeChar = fSource[fCurrentPosition - 2]; + if (beforeChar == '\n' || beforeChar == '\r') { + startOfIndent = true; + } + } else { + startOfIndent = true; + } + if (startOfIndent) { + copyWhite(fWhiteStart, fWhiteStartPosition, 1); + fWhiteStart = false; + continue; + } + break; case '\\' : // special characters follow copyWhite(fWhiteStart, fWhiteStartPosition, 1); *************** *** 462,472 **** copyWhite(fWhiteStart, fWhiteStartPosition, 1); fWhiteStart = false; int startMathPosition = fCurrentPosition; ! ! if (readUntilChar('$')) { ! String mathContent = new String(fSource, startMathPosition, fCurrentPosition - startMathPosition - 1); ! if (mathContent != null) { ! handleTeXMath(mathContent); ! continue; } } --- 479,502 ---- copyWhite(fWhiteStart, fWhiteStartPosition, 1); fWhiteStart = false; + startOfIndent = false; int startMathPosition = fCurrentPosition; ! if (getNextChar('$')) { ! startMathPosition = fCurrentPosition; ! copyWhite(fWhiteStart, fWhiteStartPosition, 2); ! fWhiteStart = false; ! if (readUntilString("$$")) { ! String mathContent = new String(fSource, startMathPosition, fCurrentPosition - startMathPosition - 2); ! if (mathContent != null) { ! handleTeXMath(mathContent, false); ! continue; ! } ! } ! } else { ! if (readUntilChar('$')) { ! String mathContent = new String(fSource, startMathPosition, fCurrentPosition - startMathPosition - 1); ! if (mathContent != null) { ! handleTeXMath(mathContent, true); ! continue; ! } } } *************** *** 878,882 **** copyWhite(fWhiteStart, fWhiteStartPosition, fCurrentPosition - htmlStartPosition + 1); fWhiteStart = false; ! handleTeXMath(mathContent); continue; } --- 908,917 ---- copyWhite(fWhiteStart, fWhiteStartPosition, fCurrentPosition - htmlStartPosition + 1); fWhiteStart = false; ! if (startOfIndent) { ! startOfIndent = false; ! handleTeXMath(mathContent, false); ! } else { ! handleTeXMath(mathContent, true); ! } continue; } *************** *** 886,889 **** --- 921,925 ---- } + startOfIndent = false; fCurrentPosition = htmlStartPosition; // detect special html tags *************** *** 924,927 **** --- 960,964 ---- fWhiteStartPosition = fCurrentPosition - 1; } + startOfIndent = false; } // -----------------end switch while try-------------------- *************** *** 933,959 **** } ! private void handleTeXMath(String mathContent) { // TODO clean this up Map map = Application.get().getParameters(); HttpServletRequest request = (HttpServletRequest) map.get("request"); ! BrowserSniffer sniffy = BrowserSniffer.getBrowserDetection(request); switch (sniffy.getBrowserId()) { ! case BrowserSniffer.GECKOID : ! case BrowserSniffer.MSIEID : ! case BrowserSniffer.MATHPLAYERID : ! fResult.append("<m:math><m:mstyle mathcolor=\"Black\" displaystyle=\"true\">"); ! fTeXParser.initialize(mathContent); ! fTeXParser.parse2MML(fResult); ! fResult.append("</m:mstyle></m:math>"); break; ! case BrowserSniffer.NETSCAPEID ://older netscape newer are detected as Gecko ! fResult.append(fResult); break; default : ! fResult.append("<m>"); ! fTeXParser.initialize(mathContent); ! fTeXParser.parse2CSS(fResult); ! fResult.append("</m>"); } } --- 970,1009 ---- } ! private void handleTeXMath(String mathContent, boolean inlineExpression) { // TODO clean this up Map map = Application.get().getParameters(); HttpServletRequest request = (HttpServletRequest) map.get("request"); ! MathSniffer sniffy = MathSniffer.getBrowserDetection(request); switch (sniffy.getBrowserId()) { ! case MathSniffer.XMLID : ! case MathSniffer.MATHPLAYERID : ! if (inlineExpression) { ! fResult.append("<m:math><m:mstyle mathcolor=\"Black\" displaystyle=\"true\">"); ! fTeXParser.initialize(mathContent); ! fTeXParser.parse2MML(fResult); ! fResult.append("</m:mstyle></m:math>"); ! } else { ! fResult.append("<dl><dd><m:math><m:mstyle mathcolor=\"Black\" displaystyle=\"true\">"); ! fTeXParser.initialize(mathContent); ! fTeXParser.parse2MML(fResult); ! fResult.append("</m:mstyle></m:math></dd></dl>"); ! } break; ! case MathSniffer.CSSID : ! if (inlineExpression) { ! fResult.append("<m>"); ! fTeXParser.initialize(mathContent); ! fTeXParser.parse2CSS(fResult, true); ! fResult.append("</m>"); ! } else { ! fResult.append("<e>"); ! fTeXParser.initialize(mathContent); ! fTeXParser.parse2CSS(fResult, true); ! fResult.append("</e>"); ! } break; default : ! fResult.append(fResult); } } |
|
From: Klaus H. <js...@us...> - 2004-03-21 17:09:44
|
Update of /cvsroot/hmath/org.hartmath.tex2mml/src/org/hartmath/tex2mml In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4903/src/org/hartmath/tex2mml Modified Files: TeX2MathMLFactory.java TeXParser.java Log Message: misc changes Index: TeX2MathMLFactory.java =================================================================== RCS file: /cvsroot/hmath/org.hartmath.tex2mml/src/org/hartmath/tex2mml/TeX2MathMLFactory.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** TeX2MathMLFactory.java 19 Mar 2004 20:19:03 -0000 1.5 --- TeX2MathMLFactory.java 21 Mar 2004 16:58:58 -0000 1.6 *************** *** 72,77 **** } ! public void convert2CSS(Node node, StringBuffer buf) { ! node.convert2CSS(buf, false); } --- 72,77 ---- } ! public void convert2CSS(Node node, StringBuffer buf, boolean noTags) { ! node.convert2CSS(buf, noTags); } *************** *** 330,333 **** --- 330,334 ---- CONSTANT_SYMBOLS.put("int", new Operator(toEntity('\u222B'), CONSTANT, intAttr)); + // CONSTANT_SYMBOLS.put("oint", new Operator("∮", CONSTANT, ointAttr)); CONSTANT_SYMBOLS.put("oint", new Operator(toEntity('\u222E'), CONSTANT, ointAttr)); Index: TeXParser.java =================================================================== RCS file: /cvsroot/hmath/org.hartmath.tex2mml/src/org/hartmath/tex2mml/TeXParser.java,v retrieving revision 1.4 retrieving revision 1.5 diff -C2 -d -r1.4 -r1.5 *** TeXParser.java 19 Mar 2004 20:19:03 -0000 1.4 --- TeXParser.java 21 Mar 2004 16:58:58 -0000 1.5 *************** *** 257,264 **** } ! public void parse2CSS(StringBuffer buffer) { Node node = createNode(); if (node != null) { ! MML_FACTORY.convert2CSS(node, buffer); } } --- 257,264 ---- } ! public void parse2CSS(StringBuffer buffer, boolean noTags) { Node node = createNode(); if (node != null) { ! MML_FACTORY.convert2CSS(node, buffer, noTags); } } |
|
From: Klaus H. <js...@us...> - 2004-03-21 17:09:07
|
Update of /cvsroot/hmath/org.hartmath.tex2mml/src/org/hartmath/tex2css/reflection/convert In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4903/src/org/hartmath/tex2css/reflection/convert Added Files: Sqrt.java Log Message: misc changes --- NEW FILE: Sqrt.java --- package org.hartmath.tex2css.reflection.convert; import org.hartmath.tex2mml.IRowCSSConverter; import org.hartmath.tex2mml.Row; public class Sqrt implements IRowCSSConverter { /* * (non-Javadoc) * * @see org.hartmath.tex2mml.IRowConverter#convert(java.lang.StringBuffer, org.hartmath.tex2mml.Row, * org.hartmath.tex2mml.TeX2MathMLFactory) */ public boolean convert(StringBuffer buf, Row row) { if (row.size() == 1) { buf.append("("); row.get(0).convert2CSS(buf, false); buf.append(")<t>1/2</t>"); return true; } return false; } } |
|
From: Klaus H. <js...@us...> - 2004-03-20 14:45:53
|
Update of /cvsroot/hmath/org.hmath.server/WEB-INF/src/org/hartmath/server/taglib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18425/WEB-INF/src/org/hartmath/server/taglib Modified Files: BrowserTag.java BrowserSniffer.java HeaderTag.java Added Files: MathSniffer.java Log Message: misc changes Index: BrowserTag.java =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/WEB-INF/src/org/hartmath/server/taglib/BrowserTag.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** BrowserTag.java 12 Mar 2004 20:50:50 -0000 1.2 --- BrowserTag.java 20 Mar 2004 14:35:54 -0000 1.3 *************** *** 9,24 **** import javax.servlet.jsp.tagext.BodyTagSupport; - import org.snipsnap.app.Application; - /** ! * Java JSP taglib interface to detect the clients browser type ! * */ public class BrowserTag extends BodyTagSupport { private String fType; ! private String fContent = null; ! public static String MSIE = "msie"; ! public static String NETSCAPE = "netscape"; ! /** * Returns "msie" for Internet Explorer; "netscape" otherwise --- 9,22 ---- import javax.servlet.jsp.tagext.BodyTagSupport; /** ! * Java JSP taglib interface to detect the clients browser type ! * */ public class BrowserTag extends BodyTagSupport { private String fType; ! // private String fContent = null; ! public static String MSIE = "msie"; ! public static String NETSCAPE = "netscape"; ! /** * Returns "msie" for Internet Explorer; "netscape" otherwise *************** *** 27,84 **** * @return */ ! public static String getBrowserType(HttpServletRequest request) { ! String userAgentString = request.getHeader("User-Agent"); ! String browser = new String(""); ! if (userAgentString != null) { ! if ((userAgentString.indexOf("MSIE") == -1) && (userAgentString.indexOf("msie") == -1)) { ! browser = NETSCAPE; ! } else { ! browser = MSIE; ! } ! ! } ! return browser; ! } ! private String getBrowserVersion(HttpServletRequest request) { ! String userAgentString = request.getHeader("User-Agent"); ! String version = new String(""); ! if (userAgentString != null) { ! if ((userAgentString.indexOf("MSIE") == -1) && (userAgentString.indexOf("msie") == -1)) { ! int verPos = userAgentString.indexOf("/"); ! if (verPos != -1) ! version = userAgentString.substring(verPos + 1, verPos + 5); ! } else { ! String tempStr = userAgentString.substring(userAgentString.indexOf("MSIE"), userAgentString.length()); ! version = tempStr.substring(4, tempStr.indexOf(";")); ! } ! } ! return version; ! } public int doAfterBody() throws JspException { // log("doPost"); ! BodyContent body = getBodyContent(); ! JspWriter out = body.getEnclosingWriter(); ! String bodyData = body.getString(); HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); ! // HttpSession session = request.getSession(true); ! String browserType = getBrowserType(request); ! // System.out.println(browserType); ! // System.out.println(fType); ! if (browserType.equalsIgnoreCase(fType)) { ! if (fContent != null) { ! pageContext.getResponse().setContentType(fContent+"; "+Application.get().getConfiguration().getEncoding()); } - try { - out.print(bodyData); - } catch (IOException e) { - } } return SKIP_BODY; } /** * @return --- 25,105 ---- * @return */ ! // public static String getBrowserType(HttpServletRequest request) { ! // String userAgentString = request.getHeader("User-Agent"); ! // String browser = new String(""); ! // if (userAgentString != null) { ! // if ((userAgentString.indexOf("MSIE") == -1) && (userAgentString.indexOf("msie") == -1)) { ! // browser = NETSCAPE; ! // } else { ! // browser = MSIE; ! // } ! // ! // } ! // return browser; ! // } ! // private String getBrowserVersion(HttpServletRequest request) { ! // String userAgentString = request.getHeader("User-Agent"); ! // String version = new String(""); ! // if (userAgentString != null) { ! // if ((userAgentString.indexOf("MSIE") == -1) && (userAgentString.indexOf("msie") == -1)) { ! // int verPos = userAgentString.indexOf("/"); ! // if (verPos != -1) ! // version = userAgentString.substring(verPos + 1, verPos + 5); ! // } else { ! // String tempStr = userAgentString.substring(userAgentString.indexOf("MSIE"), userAgentString.length()); ! // version = tempStr.substring(4, tempStr.indexOf(";")); ! // } ! // } ! // return version; ! // } public int doAfterBody() throws JspException { // log("doPost"); ! HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); ! MathSniffer bd = MathSniffer.getBrowserDetection(request); ! int browserId = bd.getBrowserId(); ! String browserType = getType().toLowerCase(); ! if (browserType.length() >= 3 && browserType.length() <= 10) { ! int index = 0; ! switch (browserType.length()) { ! case 3 : ! if (browserType.equals("xml") && browserId == MathSniffer.XMLID) { ! // "Gecko"; ! printBody(); ! } else if (browserType.indexOf("css") != (-1) && browserId == MathSniffer.CSSID) { ! // "Opera" "Safari" ! printBody(); ! } ! break; ! case 6 : ! if (browserType.indexOf("others") != (-1) && browserId == MathSniffer.OTHERSID) { ! // all other cases ! printBody(); ! } ! break; ! case 10 : ! if (browserType.equals("mathplayer") && browserId == MathSniffer.MATHPLAYERID) { ! // "MSIE" + "Mathplayer" ! printBody(); ! } ! break; } } return SKIP_BODY; } + private void printBody() { + BodyContent body = getBodyContent(); + JspWriter out = body.getEnclosingWriter(); + try { + out.print(body.getString()); + } catch (IOException e) { + + } + } /** * @return *************** *** 95,111 **** } ! /** ! * @return ! */ ! public String getContent() { ! return fContent; ! } ! ! /** ! * @param string ! */ ! public void setContent(String string) { ! fContent = string; ! } } --- 116,132 ---- } ! // /** ! // * @return ! // */ ! // public String getContent() { ! // return fContent; ! // } ! // ! // /** ! // * @param string ! // */ ! // public void setContent(String string) { ! // fContent = string; ! // } } Index: BrowserSniffer.java =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/WEB-INF/src/org/hartmath/server/taglib/BrowserSniffer.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** BrowserSniffer.java 12 Mar 2004 20:50:50 -0000 1.1 --- BrowserSniffer.java 20 Mar 2004 14:35:54 -0000 1.2 *************** *** 62,66 **** public static final String MSPIE = "MSPIE"; public static final String NETSCAPE = "Mozilla"; ! public static final String MOZILLA = "Gecko"; public static final String SAFARI = "Safari"; public static final String KONQUEROR = "Konqueror"; --- 62,66 ---- public static final String MSPIE = "MSPIE"; public static final String NETSCAPE = "Mozilla"; ! public static final String GECKO = "Gecko"; public static final String SAFARI = "Safari"; public static final String KONQUEROR = "Konqueror"; *************** *** 71,75 **** public static final int MSPIEID = 4; public static final int NETSCAPEID = 5; ! public static final int MOZILLAID = 6; public static final int SAFARIID = 7; public static final int KONQUERORID = 8; --- 71,75 ---- public static final int MSPIEID = 4; public static final int NETSCAPEID = 5; ! public static final int GECKOID = 6; public static final int SAFARIID = 7; public static final int KONQUERORID = 8; *************** *** 260,267 **** this.browserId = KONQUERORID; this.version = parseVersion(KONQUEROR); ! } else if (userAgent.indexOf(MOZILLA) != -1) { // "Revision builds"/Netscape ab 6.0(???) // this.browser = MOZILLA; ! this.browserId = MOZILLAID; this.version = parseVersion("rv:"); --- 260,267 ---- this.browserId = KONQUERORID; this.version = parseVersion(KONQUEROR); ! } else if (userAgent.indexOf(GECKO) != -1) { // "Revision builds"/Netscape ab 6.0(???) // this.browser = MOZILLA; ! this.browserId = GECKOID; this.version = parseVersion("rv:"); *************** *** 468,472 **** */ public boolean isModernMozilla() { ! return (browserId == MOZILLAID); } --- 468,472 ---- */ public boolean isModernMozilla() { ! return (browserId == GECKOID); } *************** *** 478,482 **** */ public boolean isMozilla() { ! return (browserId == MOZILLAID); } --- 478,482 ---- */ public boolean isMozilla() { ! return (browserId == GECKOID); } --- NEW FILE: MathSniffer.java --- package org.hartmath.server.taglib; /* * * Copyright (C) Johannes Lietz, joh...@da... Modified by Klaus Hartlage * * This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as * published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. * * You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * */ import java.io.Serializable; import java.util.regex.Matcher; import java.util.regex.Pattern; import javax.servlet.http.HttpServletRequest; /** * detect how the browser can show math documents */ public class MathSniffer implements Serializable { static final long serialVersionUID = 7731753920913450421L; public static final int OTHERSID = 1; public static final int CSSID = 2; public static final int XMLID = 3; public static final int MATHPLAYERID = 4; // MSIE+MathPlayer private static final String OPERA = "Opera"; private static final String LYNX = "Lynx"; private static final String MSIE = "MSIE"; private static final String MSPIE = "MSPIE"; private static final String NETSCAPE = "Mozilla"; private static final String GECKO = "Gecko"; private static final String SAFARI = "Safari"; private static final String KONQUEROR = "Konqueror"; public static final String WIN = "Win"; public static final String MAC = "Mac"; public static final String UNIX = "Unix"; public static final String WIN_CE = "Windows CE"; public static final String UNKNOWN = "Unknown"; public static final String DEFAULT_SESSION_ATTRIBUTENAME = "org.hartmath.server.taglib.MathSniffer"; private String userAgent = null; private int browserId = 0; private String platform = null; private String accept = null; private String acceptLanguage = null; private String acceptCharset = null; private float version = 0; private boolean bot = false; private boolean aol = false; /** * Creates new BrowserDetection from Request(User-Agent). * * @param request */ public MathSniffer(HttpServletRequest request) { this.userAgent = request.getHeader("User-Agent"); this.accept = request.getHeader("Accept"); if (this.accept != null) this.accept = this.accept.toLowerCase(); this.acceptLanguage = request.getHeader("Accept-Language"); if (this.acceptLanguage != null) this.acceptLanguage = this.acceptLanguage.toLowerCase(); this.acceptCharset = request.getHeader("Accept-Charset"); if (this.acceptCharset != null) this.acceptCharset = this.acceptCharset.toLowerCase(); detect(); } /** * Creates new BrowserDetection from Request(User-Agent) and adds it to the Session as "attributeName". * * @param request * the HttpServletRequest * @param attributeName * the Name used for the session attribute */ public static void setBrowserDetection(HttpServletRequest request, String attributeName) { if (request.getSession(true).getAttribute(attributeName) == null) getBrowserDetection(request, attributeName); } /** * Creates new BrowserDetection a given User-Agent String * * @param userAgent * the userAgent * @deprecated please use BrowserDetection(HttpServletRequest request) instead */ public MathSniffer(String userAgent) { this.userAgent = userAgent; detect(); } /** * Creates new BrowserDetection from Request(User-Agent) and adds it to the Session as DEFAULT_SESSION_ATTRIBUTENAME. * * @param request * the HttpServletRequest */ public static MathSniffer getBrowserDetection(HttpServletRequest request) { return getBrowserDetection(request, DEFAULT_SESSION_ATTRIBUTENAME); } /** * Creates new BrowserDetection from Request(User-Agent) and adds it to the Session as "sessionAttributeName". * * @param request * the HttpServletRequest * @param sessionAttributeName * the Name of the Sessionattribute for the BrowserDetection object */ public static MathSniffer getBrowserDetection(HttpServletRequest request, String sessionAttributeName) { MathSniffer bd = (MathSniffer) request.getSession(true).getAttribute(sessionAttributeName); if (bd == null) { bd = new MathSniffer(request); request.setAttribute(sessionAttributeName, bd); } return bd; } /** * Standalone Testcode * * @param args */ public static void main(String[] args) { MathSniffer bd = new MathSniffer( //"Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.0) // Opera 7.01 [en] "); //"Lynx/2.8.3rel.1 libwww-FM/2.14"); //"Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.3) // Gecko/20030312"); //"Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:0.9.4.1) // Gecko/20020508 Netscape6/6.2.3"); //"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0) "); //"Mozilla/2.0 (compatible; MSIE 3.01; Windows 3.1)"); //"Mozilla/4.75 [en] (Windows NT 5.0; U) "); //"Mozilla/2.0 (Macintosh; U; 68K)"); //"Mozilla/5.0 (Windows; U; Win98; en-US; m18) Gecko/20010131 // Netscape6/6.0"); //"Mozilla/1.1 (compatible; MSPIE 1.1; Windows CE)"); //"Mozilla/4.0 (compatible; MSIE 5.5; Windows 98*)"); //"Mozilla/4.0 (compatible; MSIE 4.0b2; Windows 95)"); //"Mozilla/5.0 (Macintosh; U; PPC Mac OS X; en-us) AppleWebKit/60 (like Gecko) Safari/60"); "Mozilla/3.04 (WinNT; U)"); // System.out.println(bd.getBrowser()); System.out.println(bd.getPlatform()); System.out.println(bd.getVersion()); } private void detect() { if (this.userAgent == null) { return; } this.browserId = OTHERSID; /////////////////////////////////////////////////// // Search-Engine /////////////////////////////////////////////////// String ua = this.userAgent.toLowerCase(); if (ua.indexOf("bot") != -1 || ua.indexOf("seek") != -1 || ua.indexOf("slurp") != -1 || ua.indexOf("spider") != -1 || ua.indexOf("crawl") != -1 || ua.indexOf("search") != -1 || ua.indexOf("teoma") != -1 || ua.indexOf("sleuth") != -1 || ua.indexOf("search") != -1 || ua.indexOf("find") != -1 || ua.indexOf("fireball") != -1 || ua.indexOf("scooter") != -1 || ua.indexOf("altavista") != -1 || ua.indexOf("netcraft") != -1 || ua.indexOf("gulliver") != -1 || ua.indexOf("ferret") != -1 || ua.indexOf("informant") != -1) { this.bot = true; return; } this.aol = this.userAgent.indexOf("AOL") != -1; /////////////////////////////////////////////////// // Browser und Version feststellen /////////////////////////////////////////////////// if (userAgent.indexOf(OPERA) != -1) { // this.browser = OPERA; this.browserId = CSSID; this.version = parseVersion(OPERA); } else if (userAgent.indexOf("MathPlayer") != -1) { this.browserId = MATHPLAYERID; this.version = parseVersion(MSIE); } else if (userAgent.indexOf(MSIE) != -1) { // this.browser = MSIE; // assumes MathPlayer plugin is installed this.browserId = MATHPLAYERID; this.version = parseVersion(MSIE); } else if (userAgent.indexOf(SAFARI) != -1) { // this.browser = SAFARI; this.browserId = CSSID; this.version = parseVersion(SAFARI); } else if (userAgent.indexOf(MSPIE) != -1) { // this.browser = MSPIE; this.browserId = MATHPLAYERID; this.version = parseVersion(MSPIE); } else if (userAgent.indexOf(KONQUEROR) != -1) { // this.browser = KONQUEROR; this.browserId = OTHERSID; this.version = parseVersion(KONQUEROR); } else if (userAgent.indexOf(GECKO) != -1) { // "Revision builds"/Netscape ab 6.0(???) // this.browser = MOZILLA; this.browserId = XMLID; this.version = parseVersion("rv:"); // "Milestone Builds"/Netscape 6.0, z.B. "m18" if (this.version == 5) this.version = (float) 0.5; } else if (userAgent.indexOf(NETSCAPE) != -1) { // this.browser = NETSCAPE; this.browserId = OTHERSID; this.version = parseVersion(NETSCAPE); } else if (userAgent.indexOf(LYNX) != -1) { // this.browser = LYNX; this.browserId = OTHERSID; this.version = parseVersion(LYNX); } else { // System.out.println("###\n### No Browsername found for:\n### " + this.userAgent + "\n###"); } /////////////////////////////////////////////////// // Platform feststellen /////////////////////////////////////////////////// if (userAgent.indexOf(WIN_CE) != -1) { this.platform = WIN_CE; } else if (userAgent.indexOf(WIN) != -1) { this.platform = WIN; } else if (userAgent.indexOf(MAC) != -1 || userAgent.indexOf("PPC") != -1) { this.platform = MAC; } else if ( userAgent.indexOf(UNIX) != -1 || userAgent.indexOf("Linux") != -1 || userAgent.indexOf("X11") != -1 || userAgent.indexOf("libwww") != -1 || userAgent.indexOf("SunOS") != -1) { this.platform = UNIX; } else { System.out.println("###\n### No Browser-Platform found for:\n### " + this.userAgent + "\n###"); } } private float parseVersion(String searchPattern) { try { String str = this.userAgent.substring(this.userAgent.indexOf(searchPattern) + searchPattern.length()); Pattern pattern = Pattern.compile("[0-9\\.]{2,}"); Matcher matcher = pattern.matcher(str); if (matcher.find()) { String versionString = matcher.group().trim(); if (versionString.indexOf(".") != -1) { String major = versionString.substring(0, versionString.indexOf(".")); Pattern dot = Pattern.compile("\\."); Matcher m = dot.matcher(versionString.substring(versionString.indexOf("."))); StringBuffer sb = new StringBuffer(); boolean result = m.find(); while (result) { m.appendReplacement(sb, ""); result = m.find(); } m.appendTail(sb); return Float.parseFloat(major + "." + sb.toString()); } else { return Float.parseFloat(versionString); } } } catch (Exception e) { e.printStackTrace(); } if (!this.bot) System.out.println("###\n### No Browser-Version found for:\n### " + this.userAgent + "\n###"); return 0; } /** * Tests if a browser explicitely accepts a given mime type. "*.*" is ignored. * * @param mimeType * a RFC mimetype such as "text/html", "application/xhtml+xml" or "image/gif" * @return true if the browser explicitely accepts a given mime type. * @since 1.1 */ public boolean acceptsMimeType(String mimeType) { if (mimeType == null) return false; mimeType = mimeType.toLowerCase(); return this.accept != null && this.accept.indexOf(mimeType) > -1; } /** * Tests if a browser explicitely accepts a given mime type and preferes to receive it over the second one. "*.*" is ignored. <b> * Note</b> that I assume that we do not pay attention to quantity statements such as "application/xhtml+xml;q=0.99" yet but * only the given order. Safari e.g. does not give a special order to its mimetypes, only quantity statement, so it does not work * with Safari! * * @param mimeType1 * a RFC mimetype such as "text/html", "application/xhtml+xml" or "image/gif" * @param mimeType2 * a RFC mimetype such as "text/html", "application/xhtml+xml" or "image/gif" * @return true if the browser explicitely accepts a given mime type. * @since 1.1 */ public int prefersMimeType(String mimeType1, String mimeType2) { if (this.accept == null || (!this.acceptsMimeType(mimeType1) && !this.acceptsMimeType(mimeType2))) return 0; else if ( this.acceptsMimeType(mimeType1) && !this.acceptsMimeType(mimeType2) || this.accept.indexOf(mimeType1) < this.accept.indexOf(mimeType2)) return 1; else return 2; } /** * Tests if a browser explicitely accepts a given language. * * @param language * a ISO language such as "en", "en-us" or "de" * @return true if the browser explicitely accepts a given language. * @since 1.1 */ public boolean acceptsLanguage(String language) { if (language == null) return false; language = language.toLowerCase(); return this.acceptLanguage != null && this.acceptLanguage.indexOf(language) > -1; } /** * Tests if a browser explicitely accepts a given character set. * * @param charset * a ISO language such as "utf-8", "ISO-8859-1" or "windows-1252" * @return true if the browser explicitely accepts a given language. * @since 1.1 */ public boolean acceptsCharset(String charset) { if (charset == null) return false; charset = charset.toLowerCase(); return this.acceptCharset != null && this.acceptCharset.indexOf(charset) > -1; } /** * @return String */ public String getPlatform() { return (platform != null) ? platform : UNKNOWN; } /** * @return String */ public String getUserAgent() { return (userAgent != null) ? userAgent : UNKNOWN; } /** * @return float the version number, e.g. 5.01 or 6.23 */ public float getVersion() { return version; } /** * @return boolean isMac */ public boolean isMac() { return (platform != null && platform.equals(MAC)); } /** * @return boolean isUnix */ public boolean isUnix() { return (platform != null && platform.equals(UNIX)); } /** * @return boolean isWin */ public boolean isWin() { return (platform != null && platform.equals(WIN)); } /** * @return boolean isWindowsCE */ public boolean isWindowsCE() { return (platform != null && platform.equals(WIN_CE)); } /** * @return isAol. * @since 1.1 */ public boolean isAol() { return aol; } /** * @return Returns the browserId. */ public int getBrowserId() { return browserId; } } Index: HeaderTag.java =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/WEB-INF/src/org/hartmath/server/taglib/HeaderTag.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** HeaderTag.java 20 Mar 2004 10:10:35 -0000 1.2 --- HeaderTag.java 20 Mar 2004 14:35:54 -0000 1.3 *************** *** 1,7 **** package org.hartmath.server.taglib; - import java.io.IOException; - - import javax.servlet.ServletException; import javax.servlet.http.HttpServletRequest; import javax.servlet.jsp.JspException; --- 1,4 ---- *************** *** 23,56 **** // String bodyData = body.getString(); HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); ! BrowserSniffer bd = BrowserSniffer.getBrowserDetection(request); ! // String appURL = Application.get().getConfiguration().getPath(); // ""; ! try { ! switch (bd.getBrowserId()) { ! case BrowserSniffer.MOZILLAID : ! pageContext.getResponse().setContentType("text/xml" + "; charset=" + Application.get().getConfiguration().getEncoding()); ! request.getRequestDispatcher("gecko_header.jsp").include(request, pageContext.getResponse()); ! break; ! case BrowserSniffer.SAFARIID : ! case BrowserSniffer.OPERAID : ! pageContext.getResponse().setContentType( ! "application/xhtml+xml" + "; charset=" + Application.get().getConfiguration().getEncoding()); ! request.getRequestDispatcher("opera_header.jsp").include(request, pageContext.getResponse()); ! break; ! case BrowserSniffer.NETSCAPEID : // old netscape newers are detected as Gecko ! case BrowserSniffer.MATHPLAYERID : ! case BrowserSniffer.MSIEID : ! pageContext.getResponse().setContentType("text/html" + "; charset=" + Application.get().getConfiguration().getEncoding()); ! request.getRequestDispatcher("msie_header.jsp").include(request, pageContext.getResponse()); ! break; ! default : ! pageContext.getResponse().setContentType("text/html" + "; charset=" + Application.get().getConfiguration().getEncoding()); ! request.getRequestDispatcher("msie_header.jsp").include(request, pageContext.getResponse()); ! break; ! } ! } catch (ServletException e) { ! e.printStackTrace(); ! } catch (IOException e) { ! e.printStackTrace(); } return SKIP_BODY; --- 20,50 ---- // String bodyData = body.getString(); HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); ! MathSniffer bd = MathSniffer.getBrowserDetection(request); ! // String appURL = Application.get().getConfiguration().getPath(); // ""; ! // try { ! switch (bd.getBrowserId()) { ! case MathSniffer.XMLID : ! pageContext.getResponse().setContentType("text/xml" + "; charset=" + Application.get().getConfiguration().getEncoding()); ! // request.getRequestDispatcher("gecko_header.jsp").include(request, pageContext.getResponse()); ! break; ! case MathSniffer.CSSID : ! pageContext.getResponse().setContentType( ! "application/xhtml+xml" + "; charset=" + Application.get().getConfiguration().getEncoding()); ! // request.getRequestDispatcher("opera_header.jsp").include(request, pageContext.getResponse()); ! break; ! case MathSniffer.MATHPLAYERID : ! pageContext.getResponse().setContentType("text/html" + "; charset=" + Application.get().getConfiguration().getEncoding()); ! // request.getRequestDispatcher("msie_header.jsp").include(request, pageContext.getResponse()); ! break; ! case MathSniffer.OTHERSID : ! pageContext.getResponse().setContentType("text/html" + "; charset=" + Application.get().getConfiguration().getEncoding()); ! // request.getRequestDispatcher("msie_header.jsp").include(request, pageContext.getResponse()); ! break; } + // } catch (ServletException e) { + // e.printStackTrace(); + // } catch (IOException e) { + // e.printStackTrace(); + // } return SKIP_BODY; |
|
From: Klaus H. <js...@us...> - 2004-03-20 14:45:52
|
Update of /cvsroot/hmath/org.hmath.server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18425 Modified Files: main.jsp Log Message: misc changes Index: main.jsp =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/main.jsp,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** main.jsp 20 Mar 2004 10:16:02 -0000 1.3 --- main.jsp 20 Mar 2004 14:35:54 -0000 1.4 *************** *** 1,3 **** ! <%@ taglib uri="http://hartmath.org/hartmath" prefix="hm" %><hm:header /> <%-- ** Main layout template. --- 1,4 ---- ! <%@ taglib uri="http://hartmath.org/hartmath" prefix="hm" %><hm:header /><hm:browser type="xml"><?xml version='1.0' encoding='iso-8859-1'?></hm:browser><hm:browser type="css"><?xml version='1.0' encoding='iso-8859-1'?></hm:browser> ! <%-- ** Main layout template. *************** *** 13,16 **** --- 14,70 ---- <%@ taglib uri="http://snipsnap.com/snipsnap" prefix="s" %> + <hm:browser type="xml"> + <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" + "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" [ + <!ENTITY mathml "http://www.w3.org/1998/Math/MathML"> + ]> + <html xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns="http://www.w3.org/1999/xhtml" xml:lang="<c:out value='${app.configuration.locale}'/>"> + </hm:browser> + <hm:browser type="css"> + <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<c:out value='${app.configuration.locale}'/>"> + </hm:browser> + <hm:browser type="mathplayer"> + <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + + <html xmlns:m="http://www.w3.org/1999/xhtml" lang="<c:out value='${app.configuration.locale}'/>" xml:lang="<c:out value='${app.configuration.locale}'/>"> + </hm:browser> + <hm:browser type="others"> + <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" + "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> + + <html xmlns:m="http://www.w3.org/1999/xhtml" lang="<c:out value='${app.configuration.locale}'/>" xml:lang="<c:out value='${app.configuration.locale}'/>"> + </hm:browser> + <head> + <!-- base of this document to make all links relative --> + <base href="<c:out value='${app.configuration.url}/'/>"/> + <!-- content type and generator --> + <meta http-equiv="Content-Type" content="text/html; charset=<c:out value='${app.configuration.encoding}'/>"/> + <meta http-equiv="Generator" content="SnipSnap/<c:out value="${app.configuration.version}"/>"/> + <!-- dublin core classification and geographic location information --> + <s:dublinCore snip="${snip}"/> + <s:geoUrl/> + <!-- aggregrator related info --> + <link rel="EditURI" type="application/rsd+xml" title="RSD" href="<c:out value='${app.configuration.url}/exec/rsd'/>"/> + <link rel="alternate" type="application/rss+xml" title="RSS" href="<c:out value='${app.configuration.url}/exec/rss'/>"/> + <link rel="index" href="<c:out value='${app.configuration.url}/space/snipsnap-index'/>"/> + <!-- icons and stylesheet --> + <link rel="shortcut icon" href="<c:out value='${app.configuration.url}/favicon.ico'/>"/> + <link rel="icon" href="<c:out value='${app.configuration.url}/favicon.ico'/>"/> + <link rel="STYLESHEET" type="text/css" href="<c:out value='${app.configuration.url}/theme/default.css'/>" /> + <link rel="STYLESHEET" type="text/css" href="<c:out value='${app.configuration.url}/theme/print.css'/>" media="print" /> + <hm:browser type="css"> + <link rel="STYLESHEET" type="text/css" href="static/math.css" /> + </hm:browser> + <!-- title of this document --> + <title><c:out value="${app.configuration.name}" default="SnipSnap"/> :: <c:out value="${snip.name}"/></title> + <hm:browser type="mathplayer"> + <object id="showEqn" classid="clsid:32F66A20-7614-11D4-BD11-00104BD3F987"> + <!--comment required to prevent this becoming an empty tag--> + </object> + <?import NAMESPACE="M" IMPLEMENTATION="#showEqn"?> + </hm:browser> + </head> + <body> <div id="page-logo"> |
|
From: Klaus H. <js...@us...> - 2004-03-20 14:45:52
|
Update of /cvsroot/hmath/org.hmath.server/WEB-INF/src/org/hartmath/server/macro In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18425/WEB-INF/src/org/hartmath/server/macro Modified Files: MMLMacro.java Log Message: misc changes Index: MMLMacro.java =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/WEB-INF/src/org/hartmath/server/macro/MMLMacro.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** MMLMacro.java 9 Mar 2004 20:13:06 -0000 1.1 --- MMLMacro.java 20 Mar 2004 14:35:54 -0000 1.2 *************** *** 9,12 **** --- 9,13 ---- import org.hartmath.core.eval.MathMLUtilities; import org.hartmath.server.taglib.BrowserTag; + import org.hartmath.server.taglib.MathSniffer; import org.radeox.macro.parameter.MacroParameter; import org.snipsnap.app.Application; *************** *** 39,45 **** Map map = Application.get().getParameters(); HttpServletRequest request = (HttpServletRequest) map.get("request"); ! String browser = BrowserTag.getBrowserType(request); // TODO optimize this code; create a new MathMLUtilities once for every session! ! if (browser == BrowserTag.MSIE) { if (MATHML_UTILITY_MSIE == null) { MATHML_UTILITY_MSIE = new MathMLUtilities("MMLMacro", true); --- 40,48 ---- Map map = Application.get().getParameters(); HttpServletRequest request = (HttpServletRequest) map.get("request"); ! // String browser = BrowserTag.getBrowserType(request); ! MathSniffer bd = MathSniffer.getBrowserDetection(request); ! int browserId = bd.getBrowserId(); // TODO optimize this code; create a new MathMLUtilities once for every session! ! if (browserId == MathSniffer.MATHPLAYERID) { if (MATHML_UTILITY_MSIE == null) { MATHML_UTILITY_MSIE = new MathMLUtilities("MMLMacro", true); |
|
From: Klaus H. <js...@us...> - 2004-03-20 14:42:20
|
Update of /cvsroot/hmath/org.hmath.server/WEB-INF/src/org/hartmath/server/filter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17808/WEB-INF/src/org/hartmath/server/filter Modified Files: WikipediaFilter.java Log Message: misc changes Index: WikipediaFilter.java =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/WEB-INF/src/org/hartmath/server/filter/WikipediaFilter.java,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** WikipediaFilter.java 20 Mar 2004 10:10:34 -0000 1.2 --- WikipediaFilter.java 20 Mar 2004 14:32:20 -0000 1.3 *************** *** 940,944 **** switch (sniffy.getBrowserId()) { ! case BrowserSniffer.MOZILLAID : case BrowserSniffer.MSIEID : case BrowserSniffer.MATHPLAYERID : --- 940,944 ---- switch (sniffy.getBrowserId()) { ! case BrowserSniffer.GECKOID : case BrowserSniffer.MSIEID : case BrowserSniffer.MATHPLAYERID : |
|
From: Klaus H. <js...@us...> - 2004-03-20 10:28:00
|
Update of /cvsroot/hmath/org.hmath.server/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9777/util Added Files: snip-base.jsp mainbuttons.jsp buttons.jsp attachments.jsp Log Message: misc changes --- NEW FILE: mainbuttons.jsp --- <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <%@ taglib uri="http://snipsnap.com/snipsnap" prefix="s" %> [ <c:choose> <c:when test="${snip.name==app.configuration.startSnip}"><span class="inactive"><fmt:message key="menu.start"/></span></c:when> <c:otherwise><a href="space/<c:out value='${app.configuration.startSnip}'/>"><fmt:message key="menu.start"/></a></c:otherwise> </c:choose> | <a href="space/snipsnap-index"><fmt:message key="menu.index"/></a> | <s:check roles="Authenticated"><fmt:message key="menu.loggedIn"><fmt:param value="${app.user.login}"/></fmt:message> | <a href="exec/authenticate?logoff=true"><fmt:message key="menu.logoff"/></a></s:check> <s:check roles="Authenticated" invert="true"><a href="exec/login.jsp"><fmt:message key="menu.login"/></a> <c:if test="${app.configuration.allowRegister}"> <fmt:message key="menu.or"/> <a href="exec/register.jsp"><fmt:message key="menu.register"/></a> </c:if> </s:check> <s:check snip="${requestScope.snip}" roles="Owner:Editor"> | <c:choose> <c:when test="${snip.weblog}"> <a href="exec/post.jsp?name=<c:out value='${requestScope.snip}'/>"> <fmt:message key="menu.post"/></a> </c:when> <c:otherwise> <a href="exec/post.jsp?name=<c:out value='${app.configuration.startSnip}'/>"> <fmt:message key="menu.post"/></a> </c:otherwise> </c:choose> </s:check> <c:if test="${app.user.admin}"> | <a href="admin/configure"><fmt:message key="menu.setup"/></a></c:if> ] --- NEW FILE: snip-base.jsp --- <%-- ** Displays the snip content if it's not a weblog and the header --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <%@ taglib uri="http://snipsnap.com/snipsnap" prefix="s" %> <%-- Snip header, displayed only when snip is not a weblog --%> <c:if test="${snip.name != app.configuration.startSnip}"> <div class="snip-path"><s:path snip="${snip}"/></div> </c:if> <c:choose> <c:when test="${snip.notWeblog}"> <div class="snip-title"> <c:if test="${snip.notWeblog}"> <h1 class="snip-name"><c:out value="${snip.title}"/> <c:if test="${snip.comment}"> <span class="snip-commented-snip"><s:image name="commented"/> <a href="comments/<c:out value='${snip.commentedSnip.nameEncoded}'/>"><c:out value='${snip.commentedSnip.name}'/></a></span> </c:if> </h1> </c:if> <div class="snip-info"> <c:out value="${snip.modified}" escapeXml="false"/> <fmt:message key="snip.viewed"> <fmt:param value="${snip.access.viewCount}"/> </fmt:message> <fmt:message key="snip.version"> <fmt:param value="${snip.version}"/> </fmt:message> </div> <div class="snip-buttons"><c:import url="util/buttons.jsp"/></div> </div> </c:when> <c:otherwise> <%-- TODO this is an ugly hack to let owners edit their buttons (see util/buttons.jsp) --%> <s:check permission="Edit" roles="Owner:Editor" snip="${snip}"> <div class="snip-buttons">[<a href="exec/edit?name=<c:out value='${snip.nameEncoded}'/>"><fmt:message key="menu.edit"/></a>]</div> </s:check> </c:otherwise> </c:choose> <%-- Snip content --%> <div class="snip-content"> <c:if test="${snip.notWeblog}"> <div class="snip-meta"> <div class="snip-label"> <div> <s:check roles="Authenticated" permission="Edit" snip="${snip}">[<a href="exec/labels?snipname=<c:out value='${snip.nameEncoded}'/>"><fmt:message key="menu.labels.add"/></a>]</s:check> <s:check roles="Authenticated" permission="Edit" snip="${snip}" invert="true"><span class="inactive"><fmt:message key="menu.labels"/></span></s:check> </div> <table> <c:forEach items="${snip.labels.all}" var="label"> <tr><c:out value="${label.listProxy}" escapeXml="false"/></tr> </c:forEach> </table> </div> <div class="snip-attachments"> <div> <s:check roles="Authenticated" permission="Edit" snip="${snip}">[<a href="exec/upload?name=<c:out value='${snip.nameEncoded}'/>"><fmt:message key="menu.attachments.add"/></a>]</s:check> <s:check roles="Authenticated" permission="Edit" snip="${snip}" invert="true"><span class="inactive"><fmt:message key="menu.attachments"/></span></s:check> </div> <c:out value="${snip.attachmentString}" escapeXml="false" /> </div> </div> </c:if> <c:out value="${snip.XMLContent}" escapeXml="false" /> </div> --- NEW FILE: attachments.jsp --- <%-- ** Snip display template. ** @author Matthias L. Jugel ** @version $Id: attachments.jsp,v 1.2 2003/02/24 14:11:09 leo Exp $ --%> <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://snipsnap.com/snipsnap" prefix="s" %> <s:check roles="Owner,Editor"> <script language="Javascript" type="text/javascript"> <!-- function showHide(obj) { if (document.layers) { current = (document.layers[obj].display == 'none') ? 'block' : 'none'; document.layers[obj].display = current; } else if (document.all) { current = (document.all[obj].style.display == 'none') ? 'block' : 'none'; document.all[obj].style.display = current; } else if (document.getElementById) { vista = (document.getElementById(obj).style.display == 'none') ? 'block' : 'none'; document.getElementById(obj).style.display = vista; } } // --> </script> <a href="#" onClick="showHide('files'); return false;">Show Attached Files</a><p/> <div id="files" class="snip-attachments" style="display: none"> </div> </s:check> --- NEW FILE: buttons.jsp --- <%@ taglib uri="http://java.sun.com/jstl/core" prefix="c" %> <%@ taglib uri="http://java.sun.com/jstl/fmt" prefix="fmt" %> <%@ taglib uri="http://snipsnap.com/snipsnap" prefix="s" %> <%-- [<a href="http://www.google.com/search?q=<c:out value='${snip.nameEncoded}'/>">google</a>] [<a href="http://www.daypop.com/search?q=<c:out value='${snip.nameEncoded}'/>">daypop</a>] --%> <c:if test="${snip.version > 1}"> [<a href="exec/diff?name=<c:out value='${snip.nameEncoded}'/>&oldVersion=<c:out value="${snip.version-1}"/>&newVersion=<c:out value="${snip.version}"/>"><fmt:message key="menu.diff"/></a>] [<a href="exec/history?name=<c:out value='${snip.nameEncoded}'/>"><fmt:message key="menu.history"/></a>] </c:if> <s:check roles="Admin">[<a href="exec/remove?name=<c:out value='${snip.nameEncoded}'/>" onClick="return confirm('<fmt:message key="dialog.deleteSnipSure"/>');"><fmt:message key="menu.delete"/></a>]</s:check> <s:check roles="Admin,Editor" permission="Edit" snip="${snip}"> <s:check roles="Admin"> <s:checkObject roles="Admin" permission="Edit" snip="${snip}" invert="true"> [<a href="exec/lock?name=<c:out value='${snip.nameEncoded}'/>"><fmt:message key="menu.lock"/></a>] </s:checkObject> <s:checkObject roles="Admin" permission="Edit" snip="${snip}"> [<a href="exec/lock?name=<c:out value='${snip.nameEncoded}'/>&unlock=true"><fmt:message key="menu.unlock"/></a>] </s:checkObject> </s:check> <s:check roles="Admin" invert="true"> <s:checkObject roles="Editor" permission="Edit" snip="${snip}" invert="true"> [<a href="exec/lock?name=<c:out value='${snip.nameEncoded}'/>"><fmt:message key="menu.lock"/></a>] </s:checkObject>> <s:checkObject roles="Editor" permission="Edit" snip="${snip}"> [<a href="exec/lock?name=<c:out value='${snip.nameEncoded}'/>&unlock=true"><fmt:message key="menu.unlock"/></a>] </s:checkObject> </s:check> </s:check> <s:check roles="Authenticated" permission="Edit" snip="${snip}">[<a href="raw/<c:out value='${snip.nameEncoded}'/>"><fmt:message key="menu.view"/></a>]</s:check> <s:check roles="Authenticated" permission="Edit" snip="${snip}">[<a href="exec/edit?name=<c:out value='${snip.nameEncoded}'/>"><fmt:message key="menu.edit"/></a>]</s:check> <s:check roles="Authenticated" permission="Edit" snip="${snip}">[<a href="exec/new?parent=<c:out value='${snip.nameEncoded}'/>"><fmt:message key="menu.new"/></a>]</s:check> <s:check roles="Editor">[<a href="exec/copy?snip=<c:out value='${snip.nameEncoded}'/>"><fmt:message key="menu.copy"/></a>]</s:check> <s:check roles="Authenticated" permission="Edit" snip="${snip}" invert="true"><span class="inactive">[<fmt:message key="menu.edit"/>]</span></s:check> [<a href="rdf/<c:out value='${snip.nameEncoded}'/>">rdf</a>] <%-- keep extra --%> <s:check roles="Editor"><div class="permissions"><c:out value="${snip.permissions}"/></div></s:check> |
|
From: Klaus H. <js...@us...> - 2004-03-20 10:27:46
|
Update of /cvsroot/hmath/org.hmath.server/util In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9710/util Log Message: Directory /cvsroot/hmath/org.hmath.server/util added to the repository |
|
From: Klaus H. <js...@us...> - 2004-03-20 10:26:52
|
Update of /cvsroot/hmath/org.hmath.server/static In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9580/static Modified Files: math.css Log Message: misc changes Index: math.css =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/static/math.css,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** math.css 12 Mar 2004 21:05:02 -0000 1.1 --- math.css 20 Mar 2004 10:16:53 -0000 1.2 *************** *** 3,13 **** http://rmi.acnet.ge/~gch/ mailto: se...@op... ! Version: Silver Owl 118 ! Last modified on Sun, 5 Feb 2004 */ ! /* Document Canvas */ ! ! root {display:block; font-family:serif; --- 3,13 ---- http://rmi.acnet.ge/~gch/ mailto: se...@op... ! For HMath Project ! http://www.hartlage.de:8080/hmath/space/start ! Version: Silver Owl 160 HMath ! Last modified on Sun, 14 Mar 2004 */ ! div#page-content {display:block; font-family:serif; *************** *** 15,94 **** line-height:1.5em; text-align:justify;} - - /* Document Hat */ - - abs, ads, aut, hat, key, msc, pac, ref - {display:block;} - abs, ads, key, msc, pac, ref - {font-size:0.8em; - line-height:1.2em; - margin:1mm 0;} - hat - {margin:1em 3cm 1em 2cm;} - - /* Document Structure */ - - b, C, dl, E, e, H, h, ml, nl, P, p, Q, r, rl, S, sl - {display:block;} - b - {font-weight:normal;} - c - {font-weight:bold;} e ! {margin:2mm 0 2mm 3cm; line-height:2em; text-align:left;} e[id]:before ! {content:"(" attr(id) ")"; ! display:block; ! margin-bottom:-2em; ! text-align:right;} ! H, h ! {font-size:1.2em; ! font-weight:bold; ! text-align:left; ! margin:1ex 0;} ! H ! {font-size:1.4em;} ! i ! {display:list-item; ! font-style:normal;} ! L ! {display:block;} m ! {white-space:nowrap;} o {text-decoration:overline;} - P, C, Q - {border-bottom:dotted 1px;} - p - {text-indent:1em; - margin:0;} - p e, p m - {text-indent:0;} - rl - {margin-left:1cm; - text-align:left;} - rl i - {list-style-type:decimal;} - sl i - {list-style-type:disc;} - S - {border:dashed 1px; - padding:1mm;} - s - {font-weight:bold; - text-decoration:none;} u {text-decoration:underline;} - w - {font-style:italic;} /* Inline mathematical expressions */ ! CaP, CuP, f, InT, ProD, SuM ! {display:inline-table; ! display:-moz-inline-box; ! -moz-box-orient:vertical; line-height:1.5em; margin:0 2px; --- 15,38 ---- line-height:1.5em; text-align:justify;} e ! {display:block; ! margin:2mm 0 2mm 3cm; line-height:2em; text-align:left;} e[id]:before ! {content:"(" counter(equation) ")"; ! counter-increment:equation; ! float:right;} m ! {white-space:nowrap;} o {text-decoration:overline;} u {text-decoration:underline;} /* Inline mathematical expressions */ ! Cap, CaP, Cup, CuP, f, Int, InT, Prod, ProD, SuM, Sum ! {display:inline-block; line-height:1.5em; margin:0 2px; *************** *** 96,100 **** vertical-align:middle;} ! /* Fractions */ r {display:block; --- 40,46 ---- vertical-align:middle;} ! /* Fractions */ ! f ! {display:inline-table;} r {display:block; *************** *** 110,115 **** line-height:1.2em; font-size:0.8em;} ! f r + r ! {border-top: solid 1px;} /* Indeces */ --- 56,61 ---- line-height:1.2em; font-size:0.8em;} ! f r:first-child ! {border-bottom: solid 1px;} /* Indeces */ *************** *** 117,615 **** {position:relative; top:0.7ex;} ! l, t, fl, ft {font-size:0.7em;} t {position:relative; top:-1ex;} ! /* Indexed Operators */ x {display:block; font-size:0.7em; line-height:1em;} ! x + x:before {display:block; font-size:2.5em; line-height:1.1em;} ! CaP x + x:before {content:"\2229";} ! CuP x + x:before {content:"\222A";} ! InT x + x:before {content:"\222B";} ! InT[t="d"] x + x:before {content:"\222C";} ! InT[t="t"] x + x:before {content:"\222D";} ! InT[t="c"] x + x:before {content:"\222E";} ! InT[t="dc"] x + x:before {content:"\222F";} ! InT[t="tc"] x + x:before {content:"\2230";} ! InT[t="oc"] x + x:before {content:"\2232";} ! ProD x + x:before {content:"\03A0";} ! ProD[t="d"] x + x:before {content:"\2297";} ! SuM x + x:before {content:"\03A3";} ! SuM[t="d"] x + x:before {content:"\2295";} sum, prod, int, dint, tint, cint, dcint, tcint, ocint {font-size:1.8em; ! vertical-align:middle;} /* Over and under scripts */ ! D ! {display:inline-table; ! display:-moz-inline-box; ! -moz-box-orient:vertical; line-height:1.5em; text-align:center; vertical-align:middle;} g {display:block;} ! /* Linking Extensions */ ! ! go[at]:before ! {content:"(";} ! go[at]:after ! {content:")";} ! go[on] ! {border:dashed 1px black;} ! go[to] ! {border:solid 1px black;} ! ! /* Media Groups */ - @media screen, projection - { - c, go, s, h, H - {color:maroon;} - e, i, m - {color:navy;} - root - {background-color:silver;} - } @media print { ! e, S {page-break-inside:avoid;} root {background-color:white;} } - /* Generated Content */ ! As:before ! {content:"\2329"} ! As:after ! {content:"\232A"} ! db:before, db:after ! {content:"\2225"} ! k:before ! {content:"{"} ! k:after ! {content:"}"} ! ! Gamma:before {content:"\0393"} ! Delta:before {content:"\0394"} ! Theta:before {content:"\0398"} ! Lambda:before {content:"\039B"} ! Xi:before {content:"\039E"} ! Pi:before {content:"\03A0"} ! Sigma:before {content:"\03A3"} ! Phi:before {content:"\03A6"} ! Psi:before {content:"\03A8"} ! Omega:before {content:"\03A9"} ! alpha:before {content:"\03B1"} ! beta:before {content:"\03B2"} ! gamma:before {content:"\03B3"} ! delta:before {content:"\03B4"} ! epsilon:before {content:"\03B5"} ! zeta:before {content:"\03B6"} ! eta:before {content:"\03B7"} ! theta:before {content:"\03B8"} ! iota:before {content:"\03B9"} ! kappa:before {content:"\03BA"} ! lambda:before {content:"\03BB"} ! mu:before {content:"\03BC"} ! nu:before {content:"\03BD"} ! xi:before {content:"\03BE"} ! pi:before {content:"\03C0"} ! rho:before {content:"\03C1"} ! sigma:before {content:"\03C3"} ! tau:before {content:"\03C4"} ! upsilon:before {content:"\03C5"} ! phi:before {content:"\03C6"} ! chi:before {content:"\03C7"} ! psi:before {content:"\03C8"} ! omega:before {content:"\03C9"} ! ! ! forall:before {content:"\2200"} ! comp:before {content:"\2201"} ! part:before {content:"\2202"} ! exist:before {content:"\2203"} ! nexist:before {content:"\2204"} ! empty:before {content:"\2205"} ! nabla:before {content:"\2207"} ! in:before {content:"\2208"} ! notin:before {content:"\2209"} ! ni:before {content:"\220B"} ! notni:before {content:"\220C"} ! prod:before {content:"\03A0"} ! sum:before {content:"\03A3"} ! mn:before {content:"\2212"} ! pm:before {content:"\00B1"} ! mp:before {content:"\2213"} ! ast:before {content:"\2217"} ! radic:before {content:"\221A"} ! prop:before {content:"\221D"} ! inf:before {content:"\221E"} ! mid:before {content:"\2223"} ! nmid:before {content:"\2224"} ! par:before {content:"\2225"} ! npar:before {content:"\2226"} ! and:before {content:"\2227"} ! or:before {content:"\2228"} ! cap:before {content:"\2229"} ! cup:before {content:"\222A"} ! int:before {content:"\222B"} ! dint:before {content:"\222C"} ! tint:before {content:"\222D"} ! cint:before {content:"\222E"} ! dcint:before {content:"\222F"} ! tcint:before {content:"\2230"} ! ocint:before {content:"\2232"} ! sim:before {content:"\223C"} ! nsim:before {content:"\2241"} ! sime:before {content:"\2243"} ! cong:before {content:"\2245"} ! as:before {content:"\2248"} ! nas:before {content:"\2249"} ! ase:before {content:"\224A"} ! eldot:before {content:"\2252"} ! erdot:before {content:"\2253"} ! cole:before {content:"\2254"} ! ecol:before {content:"\2255"} ! cire:before {content:"\2257"} ! ande:before {content:"\2259"} ! ore:before {content:"\225A"} ! aste:before {content:"\225B"} ! trie:before {content:"\225C"} ! queste:before {content:"\225F"} ! ne:before {content:"\2260"} ! eq:before {content:"\2261"} ! neq:before {content:"\2262"} ! lt:before {content:"\003C"} ! gt:before {content:"\003E"} ! le:before {content:"\2264"} ! ge:before {content:"\2265"} ! Le:before {content:"\2266"} ! Ge:before {content:"\2267"} ! Lt:before {content:"\226A"} ! Gt:before {content:"\226B"} ! nlt:before {content:"\226E"} ! ngt:before {content:"\226F"} ! la:before {content:"\2272"} ! ga:before {content:"\2273"} ! lg:before {content:"\2276"} ! gl:before {content:"\2277"} ! pr:before {content:"\227A"} ! sc:before {content:"\227B"} ! prce:before {content:"\227C"} ! sce:before {content:"\227D"} ! pra:before {content:"\227E"} ! sca:before {content:"\227F"} ! npr:before {content:"\2280"} ! nsc:before {content:"\2281"} ! subs:before {content:"\2282"} ! sups:before {content:"\2283"} ! nsub:before {content:"\2284"} ! nsup:before {content:"\2285"} ! sube:before {content:"\2286"} ! supe:before {content:"\2287"} ! cupdot:before {content:"\228D"} ! cupplus:before {content:"\228E"} ! Subs:before {content:"\228F"} ! Sups:before {content:"\2290"} ! Sube:before {content:"\2291"} ! Supe:before {content:"\2292"} ! scap:before {content:"\2293"} ! scup:before {content:"\2294"} ! oplus:before {content:"\2295"} ! otimes:before {content:"\2297"} ! Star:before {content:"\22C6"} ! bull:before {content:"\2022"} ! divide:before {content:"\00F7"} ! times:before {content:"\00D7"} ! frasl:before {content:"\2044"} ! ! ! Cmath:before {content:"\2102"} ! Hmath:before {content:"\210D"} ! Nmath:before {content:"\2115"} ! Pmath:before {content:"\2119"} ! Qmath:before {content:"\211A"} ! Rmath:before {content:"\211D"} ! Zmath:before {content:"\2124"} ! Im:before {content:"\2111"} ! Re:before {content:"\211C"} ! hbar:before {content:"\210F"} ! aleph:before {content:"\2135"} ! ang:before {content:"\2220"} ! Ang:before {content:"\2221"} ! AnG:before {content:"\221F"} ! lang:before {content:"\2329"} ! rang:before {content:"\232A"} ! lceil:before {content:"\2308"} ! lfloor:before {content:"\230A"} ! perp:before {content:"\22A5"} ! vdots:before {content:"\22EE"} ! hdots:before {content:"\22EF"} ! rdots:before {content:"\22F0"} ! ldots:before {content:"\22F1"} ! cdots:before {content:"\2234"} ! Dot:before {content:"\22C5"} ! ! ! ! frac12:before {content:"\00BD"} ! frac14:before {content:"\00BC"} ! frac34:before {content:"\00BE"} ! frac13:before {content:"\2153"} ! frac23:before {content:"\2154"} ! frac15:before {content:"\2155"} ! frac25:before {content:"\2156"} ! frac35:before {content:"\2157"} ! frac45:before {content:"\2158"} ! frac16:before {content:"\2159"} ! frac56:before {content:"\215A"} ! frac18:before {content:"\215B"} ! frac38:before {content:"\215C"} ! frac58:before {content:"\215D"} ! frac78:before {content:"\215E"} ! ! ! lar:before {content:"\2190"} ! uar:before {content:"\2191"} ! rar:before {content:"\2192"} ! dar:before {content:"\2193"} ! har:before {content:"\2194"} ! tar:before {content:"\2195"} ! nwar:before {content:"\2196"} ! near:before {content:"\2197"} ! sear:before {content:"\2198"} ! swar:before {content:"\2199"} ! nlar:before {content:"\219A"} ! nrar:before {content:"\219B"} ! LaR:before {content:"\21A4"} ! UaR:before {content:"\21A5"} ! RaR:before {content:"\21A6"} ! DaR:before {content:"\21A7"} ! clar:before {content:"\21A9"} ! crar:before {content:"\21AA"} ! rlar:before {content:"\21C4"} ! udar:before {content:"\21C5"} ! lrar:before {content:"\21C6"} ! llar:before {content:"\21C7"} ! uuar:before {content:"\21C8"} ! rrar:before {content:"\21C9"} ! ddar:before {content:"\21CA"} ! Nlar:before {content:"\21CD"} ! Nhar:before {content:"\21CE"} ! Nrar:before {content:"\21CF"} ! Lar:before {content:"\21D0"} ! Uar:before {content:"\21D1"} ! Rar:before {content:"\21D2"} ! Dar:before {content:"\21D3"} ! Har:before {content:"\21D4"} ! Tar:before {content:"\21D5"} ! Nwar:before {content:"\21D6"} ! Near:before {content:"\21D7"} ! Sear:before {content:"\21D8"} ! Swar:before {content:"\21D9"} ! ! amp:before {content:"\0026"} ! copy:before {content:"\00A9"} ! num:before {content:"\2116"} ! reg:before {content:"\00AE"} ! sect:before {content:"\00A7"} ! trade:before {content:"\2122"} ! deg:before {content:"\00B0"} ! permil:before {content:"\2030"} ! dag:before {content:"\2020"} ! Dag:before {content:"\2021"} ! md:before {content:"\2014"} ! nd:before {content:"\2013"} ! sp:before {content:"\00A0"} ! Sp:before {content:"\00A0 \00A0 \00A0 \00A0 \00A0"} ! ! ! ! Aacute:before {content:"\00C1"} ! Abar:before {content:"\0100"} ! Acap:before {content:"\0202"} ! Addot:before {content:"\00C4"} ! Adot:before {content:"\0226"} ! Aelig:before {content:"\00C6"} ! Agrave:before {content:"\00C0"} ! Ahat:before {content:"\00C2"} ! Aring:before {content:"\00C5"} ! Atilde:before {content:"\00C3"} ! Auml:before {content:"\00C4"} ! Bdot:before {content:"\1E02"} ! Ccedil:before {content:"\00C7"} ! Cdot:before {content:"\010A"} ! Chat:before {content:"\0108"} ! Dbar:before {content:"\0110"} ! Ddot:before {content:"\1E0A"} ! Eacute:before {content:"\00C9"} ! Ebar:before {content:"\0112"} ! Ecap:before {content:"\0206"} ! Eddot:before {content:"\00CB"} ! Edot:before {content:"\0116"} ! Egrave:before {content:"\00C8"} ! Ehat:before {content:"\00CA"} ! Etilde:before {content:"\1EBC"} ! Fdot:before {content:"\1E1E"} ! Gbar:before {content:"\1E20"} ! Gdot:before {content:"\0120"} ! Ghat:before {content:"\011C"} ! Hddot:before {content:"\1E26"} ! Hdot:before {content:"\1E22"} ! Hhat:before {content:"\0124"} ! Iacute:before {content:"\00CD"} ! Ibar:before {content:"\012A"} ! Icap:before {content:"\020A"} ! Iddot:before {content:"\00CF"} ! Idot:before {content:"\0130"} ! Igrave:before {content:"\00CC"} ! Ihat:before {content:"\00CE"} ! Itilde:before {content:"\0128"} ! Jhat:before {content:"\0134"} ! Mdot:before {content:"\1E40"} ! Ndot:before {content:"\1E44"} ! Ntilde:before {content:"\00D1"} ! Oacute:before {content:"\00D3"} ! Obar:before {content:"\014C"} ! Ocap:before {content:"\020E"} ! Oddot:before {content:"\00D6"} ! Odot:before {content:"\022E"} ! Oelig:before {content:"\0152"} ! Ograve:before {content:"\00D2"} ! Ohat:before {content:"\00D4"} ! Oslash:before {content:"\00D8"} ! Otilde:before {content:"\00D5"} ! Ouml:before {content:"\00D6"} ! Pdot:before {content:"\1E56"} ! Rcap:before {content:"\0212"} ! Rdot:before {content:"\1E58"} ! Scaron:before {content:"\0160"} ! Sdot:before {content:"\1E60"} ! Shat:before {content:"\015C"} ! Tdot:before {content:"\1E6A"} ! Uacute:before {content:"\00DA"} ! Ubar:before {content:"\016A"} ! Ucap:before {content:"\0216"} ! Uddot:before {content:"\00DC"} ! Ugrave:before {content:"\00D9"} ! Uhat:before {content:"\00DB"} ! Uring:before {content:"\016E"} ! Utilde:before {content:"\0168"} ! Uuml:before {content:"\00DC"} ! Vtilde:before {content:"\1E7C"} ! Wddot:before {content:"\1E84"} ! Wdot:before {content:"\1E86"} ! What:before {content:"\0174"} ! Xddot:before {content:"\1E8C"} ! Xdot:before {content:"\1E8A"} ! Yacute:before {content:"\00DD"} ! Ybar:before {content:"\0232"} ! Yddot:before {content:"\0178"} ! Ydot:before {content:"\1E8E"} ! Yhat:before {content:"\0176"} ! Ytilde:before {content:"\1EF8"} ! Zdot:before {content:"\017B"} ! Zhat:before {content:"\1E90"} ! aacute:before {content:"\00E1"} ! abar:before {content:"\0101"} ! acap:before {content:"\0203"} ! addot:before {content:"\00E4"} ! adot:before {content:"\0227"} ! aelig:before {content:"\00E6"} ! agrave:before {content:"\00E0"} ! ahat:before {content:"\00E2"} ! aring:before {content:"\00E5"} ! atilde:before {content:"\00E3"} ! auml:before {content:"\00E4"} ! ccedil:before {content:"\00E7"} ! cdot:before {content:"\010B"} ! chat:before {content:"\0109"} ! dbar:before {content:"\0111"} ! eacute:before {content:"\00E9"} ! ebar:before {content:"\0113"} ! ecap:before {content:"\0207"} ! eddot:before {content:"\00EB"} ! edot:before {content:"\0117"} ! egrave:before {content:"\00E8"} ! ehat:before {content:"\00EA"} ! etilde:before {content:"\1EBD"} ! fdot:before {content:"\1E1F"} ! gbar:before {content:"\1E21"} ! gdot:before {content:"\0121"} ! ghat:before {content:"\011D"} ! hddot:before {content:"\1E27"} ! hdot:before {content:"\1E23"} ! hhat:before {content:"\0125"} ! mdot:before {content:"\1E41"} ! ndot:before {content:"\1E45"} ! ntilde:before {content:"\00F1"} ! oacute:before {content:"\00F3"} ! obar:before {content:"\014D"} ! ocap:before {content:"\020F"} ! oddot:before {content:"\00F6"} ! odot:before {content:"\022F"} ! oelig:before {content:"\0153"} ! ograve:before {content:"\00F2"} ! ohat:before {content:"\00F4"} ! oslash:before {content:"\00F8"} ! otilde:before {content:"\00F5"} ! ouml:before {content:"\00F6"} ! pdot:before {content:"\1E57"} ! rcap:before {content:"\0213"} ! rdot:before {content:"\1E59"} ! scaron:before {content:"\0161"} ! sdot:before {content:"\1E61"} ! shat:before {content:"\015D"} ! tdot:before {content:"\1E6B"} ! uacute:before {content:"\00FA"} ! ubar:before {content:"\016B"} ! ucap:before {content:"\0217"} ! uddot:before {content:"\00FC"} ! uuml:before {content:"\00FC"} ! ugrave:before {content:"\00F9"} ! uhat:before {content:"\00FB"} ! uring:before {content:"\016F"} ! utilde:before {content:"\0169"} ! vtilde:before {content:"\1E7D"} ! wddot:before {content:"\1E85"} ! wdot:before {content:"\1E87"} ! what:before {content:"\0175"} ! xddot:before {content:"\1E8D"} ! xdot:before {content:"\1E8B"} ! yacute:before {content:"\00FD"} ! ybar:before {content:"\0233"} ! yddot:before {content:"\00FF"} ! ydot:before {content:"\1E8F"} ! yhat:before {content:"\0177"} ! ytilde:before {content:"\1EF9"} ! zdot:before {content:"\017C"} ! zhat:before {content:"\1E91"} \ No newline at end of file --- 63,235 ---- {position:relative; top:0.7ex;} ! l, t {font-size:0.7em;} + l[float] + {position:relative; + top:1.6em;} t {position:relative; top:-1ex;} + t[float] + {top:-2em;} + d + {display:inline-table; + vertical-align:middle; + text-align:left; + position:relative; + top:0.2ex;} + d > t, d > l + {display:block; + font-size:0.7em; + line-height:2.85em;} + d >t:first-child, d >l:first-child + {margin-bottom:-2.85em;} + r d > t, r d > l + {line-height:2.4em;} + r d >t:first-child, r d >l:first-child + {margin-bottom:-2.4em;} + m d > t, m d > l + {line-height:2.2em;} + m d >t:first-child, m d >l:first-child + {margin-bottom:-2.2em;} ! /* Indexed Operators */ + Cap, Cup, Int, Prod, Sum + {font-size:0.7em; + line-height:1em;} + Cap::before, Cup::before, Int::before, Prod::before, Sum::before + {display:block; + font-size:2.5em; + line-height:1.1em; + padding-top:0.4em;} x {display:block; font-size:0.7em; line-height:1em;} ! x + x::before {display:block; font-size:2.5em; line-height:1.1em;} ! m x, m Cap, m Cup, m Prod, m Sum, r x ! {margin-left:1.75em; ! text-align:left;} ! m InT x, m Int, r InT x, r Int ! {margin-left:1.25em;} ! m x + x::before, m Cap::before, m Cup::before, m Int::before, m Prod::before, m Sum::before ! {margin-left:-0.7em; ! line-height:0.2em;} ! m InT x + x::before, m Int::before, r InT x + x::before, r Int::before ! {margin-left:-0.5em;} ! Cap::before, CaP x + x::before {content:"\2229";} ! Cup::before, CuP x + x::before {content:"\222A";} ! Int::before, InT x + x::before {content:"\222B";} ! Int[double]::before, InT[double] x + x::before {content:"\222C";} ! Int[triple]::before, InT[triple] x + x::before {content:"\222D";} ! Int[contour]::before, InT[contour] x + x::before {content:"\222E";} ! Int[doubles]::before, InT[doubles] x + x::before {content:"\222F";} ! Int[triples]::before, InT[triples] x + x::before {content:"\2230";} ! Int[orient]::before, InT[orient] x + x::before {content:"\2232";} ! Prod::before, ProD x + x::before {content:"\03A0";} ! Prod[direct]::before, ProD[direct] x + x::before {content:"\2297";} ! Sum::before, SuM x + x::before {content:"\03A3";} ! Sum[direct]::before, SuM[direct] x + x::before {content:"\2295";} sum, prod, int, dint, tint, cint, dcint, tcint, ocint {font-size:1.8em; ! position:relative; ! top:0.3ex;} ! m sum, m prod, m int, m dint, m tint, m cint, m dcint, m tcint, m ocint ! {top:0.15ex;} ! r sum, r prod, r int, r dint, r tint, r cint, r dcint, r tcint, r ocint ! {font-size:1em; ! top:0;} /* Over and under scripts */ ! D, O, U, Lim, Res, Sur ! {display:inline-block; line-height:1.5em; text-align:center; vertical-align:middle;} + Lim, Res, Sur + {font-size:0.7em; + line-height:1em;} + Lim::before, Res::before, Sur::before + {display:block; + font-size:1.45em; + line-height:1.5em; + padding-top:0.7em;} + Lim::before + {content:"lim"; + text-align:left;} + Res::before + {content:"res"} + Sur::before + {content:"sup"} g {display:block;} + O + {padding-bottom:0.7em;} + U + {padding-top:0.7em;} ! /* Vectors, Matrices */ ! de, M, v ! {display:inline-table; ! border-collapse:collapse; ! vertical-align:middle; ! text-align:center;} ! de > r, M > r, v > r ! {display:table-row;} ! n ! {display:table-cell; ! padding:0 8px;} ! M > r::before, M > r::after, ! v > r::before, v > r::after ! {display:table-cell; ! content:"\A0"; ! border-bottom:solid 1px; ! border-left:double 3px; ! border-top:hidden;} ! M > r::after, v > r::after ! {border-left:none; ! border-right:double 3px;} ! M > r:first-child::before, M > r:first-child::after, ! v > r:first-child::before, v > r:first-child::after ! {border-top:solid 1px;} ! de ! {border-width:0 1px; ! border-style:solid;} @media print { ! e {page-break-inside:avoid;} root {background-color:white;} } /* Generated Content */ ! Sb:before, Sb:after ! {display:inline-block; ! height:2.7em; ! border-style:solid; ! border-width:1px 0 1px 1px; ! vertical-align:middle; ! content:"\00A0";} ! Sb:after ! {border-width:1px 1px 1px 0;} \ No newline at end of file |
|
From: Klaus H. <js...@us...> - 2004-03-20 10:26:04
|
Update of /cvsroot/hmath/org.hmath.server In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9424 Modified Files: snip.jsp msie_header.jsp main.jsp opera_header.jsp gecko_header.jsp .classpath Log Message: misc changes Index: msie_header.jsp =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/msie_header.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** msie_header.jsp 12 Mar 2004 20:13:05 -0000 1.1 --- msie_header.jsp 20 Mar 2004 10:16:02 -0000 1.2 *************** *** 1,7 **** - <%-- - ** Main layout template. - ** @author Matthias L. Jugel - ** @version $Id$ - --%> <%@ page import="org.snipsnap.snip.SnipSpace, org.snipsnap.app.Application, --- 1,2 ---- Index: main.jsp =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/main.jsp,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** main.jsp 12 Mar 2004 20:13:05 -0000 1.2 --- main.jsp 20 Mar 2004 10:16:02 -0000 1.3 *************** *** 3,7 **** ** Main layout template. ** @author Matthias L. Jugel - ** @version $Id$ --%> <%@ page import="org.snipsnap.snip.SnipSpace, --- 3,6 ---- Index: .classpath =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/.classpath,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** .classpath 9 Mar 2004 20:16:02 -0000 1.1 --- .classpath 20 Mar 2004 10:16:02 -0000 1.2 *************** *** 39,45 **** <classpathentry kind="var" path="TOMCAT_HOME/common/lib/commons-el.jar"/> <classpathentry kind="var" path="TOMCAT_HOME/common/lib/tools.jar"/> - <classpathentry kind="src" path="/org.hartmath.tex2mml"/> <classpathentry kind="src" path="/radeox.cvs"/> <classpathentry kind="src" path="/snip"/> <classpathentry kind="output" path="WEB-INF/classes"/> </classpath> --- 39,45 ---- <classpathentry kind="var" path="TOMCAT_HOME/common/lib/commons-el.jar"/> <classpathentry kind="var" path="TOMCAT_HOME/common/lib/tools.jar"/> <classpathentry kind="src" path="/radeox.cvs"/> <classpathentry kind="src" path="/snip"/> + <classpathentry kind="src" path="/org.hartmath.tex2mml"/> <classpathentry kind="output" path="WEB-INF/classes"/> </classpath> Index: gecko_header.jsp =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/gecko_header.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** gecko_header.jsp 12 Mar 2004 20:13:05 -0000 1.1 --- gecko_header.jsp 20 Mar 2004 10:16:02 -0000 1.2 *************** *** 1,9 **** <?xml version='1.0' encoding='iso-8859-1'?> - <%-- - ** Main layout template. - ** @author Matthias L. Jugel - ** @version $Id$ - --%> <%@ page import="org.snipsnap.snip.SnipSpace, org.snipsnap.app.Application, --- 1,4 ---- Index: snip.jsp =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/snip.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** snip.jsp 9 Mar 2004 20:16:01 -0000 1.1 --- snip.jsp 20 Mar 2004 10:16:02 -0000 1.2 *************** *** 27,30 **** </c:if> <div class="snip-sniplinks"><s:snipLinks snip="${snip}" width="4" start="#ffffff" end="#b0b0b0"/></div> - <!-- <div class="snip-backlinks"><s:backLinks snip="${snip}" count="15"/></div> --> </div> --- 27,29 ---- Index: opera_header.jsp =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/opera_header.jsp,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** opera_header.jsp 12 Mar 2004 20:13:05 -0000 1.1 --- opera_header.jsp 20 Mar 2004 10:16:02 -0000 1.2 *************** *** 1,9 **** <?xml version='1.0' encoding='iso-8859-1'?> - <%-- - ** Main layout template. - ** @author Matthias L. Jugel - ** @version $Id$ - --%> <%@ page import="org.snipsnap.snip.SnipSpace, org.snipsnap.app.Application, --- 1,4 ---- *************** *** 15,23 **** <%@ taglib uri="http://snipsnap.com/snipsnap" prefix="s" %> ! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1 plus MathML 2.0//EN" ! "http://www.w3.org/TR/MathML2/dtd/xhtml-math11-f.dtd" [ ! <!ENTITY mathml "http://www.w3.org/1998/Math/MathML"> ! ]> ! <html xmlns:m="http://www.w3.org/1998/Math/MathML" xmlns="http://www.w3.org/1999/xhtml" xml:lang="<c:out value='${app.configuration.locale}'/>"> <head> <!-- base of this document to make all links relative --> --- 10,14 ---- <%@ taglib uri="http://snipsnap.com/snipsnap" prefix="s" %> ! <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="<c:out value='${app.configuration.locale}'/>"> <head> <!-- base of this document to make all links relative --> *************** *** 43,49 **** <!-- title of this document --> <title><c:out value="${app.configuration.name}" default="SnipSnap"/> :: <c:out value="${snip.name}"/></title> - <object id="showEqn" classid="clsid:32F66A20-7614-11D4-BD11-00104BD3F987"> - <!--comment required to prevent this becoming an empty tag--> - </object> - <?import NAMESPACE="M" IMPLEMENTATION="#showEqn"?> </head> \ No newline at end of file --- 34,36 ---- |
|
From: Klaus H. <js...@us...> - 2004-03-20 10:25:32
|
Update of /cvsroot/hmath/org.hmath.server/WEB-INF In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9371/WEB-INF Added Files: web.xml fmt.tld c.tld snipsnap.tld hartmath-taglib.tld Log Message: misc changes --- NEW FILE: c.tld --- <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> <taglib> <tlib-version>1.0</tlib-version> <jsp-version>1.2</jsp-version> <short-name>c</short-name> <uri>http://java.sun.com/jstl/core</uri> <display-name>JSTL core</display-name> <description>JSTL 1.0 core library</description> <validator> <validator-class> org.apache.taglibs.standard.tlv.JstlCoreTLV </validator-class> <init-param> <param-name>expressionAttributes</param-name> <param-value> out:value out:default out:escapeXml if:test import:url import:context import:charEncoding forEach:items forEach:begin forEach:end forEach:step forTokens:items forTokens:begin forTokens:end forTokens:step param:encode param:name param:value redirect:context redirect:url set:property set:target set:value url:context url:value when:test </param-value> <description> Whitespace-separated list of colon-separated token pairs describing tag:attribute combinations that accept expressions. The validator uses this information to determine which attributes need their syntax validated. </description> </init-param> </validator> <tag> <name>catch</name> <tag-class>org.apache.taglibs.standard.tag.common.core.CatchTag</tag-class> <body-content>JSP</body-content> <description> Catches any Throwable that occurs in its body and optionally exposes it. </description> <attribute> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>choose</name> <tag-class>org.apache.taglibs.standard.tag.common.core.ChooseTag</tag-class> <body-content>JSP</body-content> <description> Simple conditional tag that establishes a context for mutually exclusive conditional operations, marked by <when> and <otherwise> </description> </tag> <tag> <name>out</name> <tag-class>org.apache.taglibs.standard.tag.el.core.OutTag</tag-class> <body-content>JSP</body-content> <description> Like <%= ... >, but for expressions. </description> <attribute> <name>value</name> <required>true</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>default</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>escapeXml</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>if</name> <tag-class>org.apache.taglibs.standard.tag.el.core.IfTag</tag-class> <body-content>JSP</body-content> <description> Simple conditional tag, which evalutes its body if the supplied condition is true and optionally exposes a Boolean scripting variable representing the evaluation of this condition </description> <attribute> <name>test</name> <required>true</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>scope</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>import</name> <tag-class>org.apache.taglibs.standard.tag.el.core.ImportTag</tag-class> <tei-class>org.apache.taglibs.standard.tei.ImportTEI</tei-class> <body-content>JSP</body-content> <description> Retrieves an absolute or relative URL and exposes its contents to either the page, a String in 'var', or a Reader in 'varReader'. </description> <attribute> <name>url</name> <required>true</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>scope</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>varReader</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>context</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>charEncoding</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>forEach</name> <tag-class>org.apache.taglibs.standard.tag.el.core.ForEachTag</tag-class> <tei-class>org.apache.taglibs.standard.tei.ForEachTEI</tei-class> <body-content>JSP</body-content> <description> The basic iteration tag, accepting many different collection types and supporting subsetting and other functionality </description> <attribute> <name>items</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>begin</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>end</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>step</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>varStatus</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>forTokens</name> <tag-class>org.apache.taglibs.standard.tag.el.core.ForTokensTag</tag-class> <body-content>JSP</body-content> <description> Iterates over tokens, separated by the supplied delimeters </description> <attribute> <name>items</name> <required>true</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>delims</name> <required>true</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>begin</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>end</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>step</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>varStatus</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>otherwise</name> <tag-class>org.apache.taglibs.standard.tag.common.core.OtherwiseTag</tag-class> <body-content>JSP</body-content> <description> Subtag of <choose> that follows <when> tags and runs only if all of the prior conditions evaluated to 'false' </description> </tag> <tag> <name>param</name> <tag-class>org.apache.taglibs.standard.tag.el.core.ParamTag</tag-class> <body-content>JSP</body-content> <description> Adds a parameter to a containing 'import' tag's URL. </description> <attribute> <name>name</name> <required>true</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>value</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>redirect</name> <tag-class>org.apache.taglibs.standard.tag.el.core.RedirectTag</tag-class> <body-content>JSP</body-content> <description> Redirects to a new URL. </description> <attribute> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>scope</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>url</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>context</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>remove</name> <tag-class>org.apache.taglibs.standard.tag.common.core.RemoveTag</tag-class> <body-content>empty</body-content> <description> Removes a scoped variable (from a particular scope, if specified). </description> <attribute> <name>var</name> <required>true</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>scope</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>set</name> <tag-class>org.apache.taglibs.standard.tag.el.core.SetTag</tag-class> <body-content>JSP</body-content> <description> Sets the result of an expression evaluation in a 'scope' </description> <attribute> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>value</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>target</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>property</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>scope</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>url</name> <tag-class>org.apache.taglibs.standard.tag.el.core.UrlTag</tag-class> <body-content>JSP</body-content> <description> Prints or exposes a URL with optional query parameters (via the c:param tag). </description> <attribute> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>scope</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>value</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>context</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>when</name> <tag-class>org.apache.taglibs.standard.tag.el.core.WhenTag</tag-class> <body-content>JSP</body-content> <description> Subtag of <choose> that includes its body if its condition evalutes to 'true' </description> <attribute> <name>test</name> <required>true</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> </taglib> --- NEW FILE: fmt.tld --- <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> <taglib> <tlib-version>1.0</tlib-version> <jsp-version>1.2</jsp-version> <short-name>fmt</short-name> <uri>http://java.sun.com/jstl/fmt</uri> <display-name>JSTL fmt</display-name> <description>JSTL 1.0 i18n-capable formatting library</description> <validator> <validator-class> org.apache.taglibs.standard.tlv.JstlFmtTLV </validator-class> <init-param> <param-name>expressionAttributes</param-name> <param-value> requestEncoding:value setLocale:value setLocale:variant timeZone:value setTimeZone:value bundle:basename bundle:prefix setBundle:basename message:key message:bundle param:value formatNumber:value formatNumber:pattern formatNumber:currencyCode formatNumber:currencySymbol formatNumber:groupingUsed formatNumber:maxIntegerDigits formatNumber:minIntegerDigits formatNumber:maxFractionDigits formatNumber:minFractionDigits parseNumber:value parseNumber:pattern parseNumber:parseLocale parseNumber:integerOnly formatDate:value formatDate:pattern formatDate:timeZone parseDate:value parseDate:pattern parseDate:timeZone parseDate:parseLocale </param-value> <description> Whitespace-separated list of colon-separated token pairs describing tag:attribute combinations that accept expressions. The validator uses this information to determine which attributes need their syntax validated. </description> </init-param> </validator> <tag> <name>requestEncoding</name> <tag-class>org.apache.taglibs.standard.tag.el.fmt.RequestEncodingTag</tag-class> <body-content>empty</body-content> <description> Sets the request character encoding </description> <attribute> <name>value</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>setLocale</name> <tag-class>org.apache.taglibs.standard.tag.el.fmt.SetLocaleTag</tag-class> <body-content>empty</body-content> <description> Stores the given locale in the locale configuration variable </description> <attribute> <name>value</name> <required>true</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>variant</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>scope</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>timeZone</name> <tag-class>org.apache.taglibs.standard.tag.el.fmt.TimeZoneTag</tag-class> <body-content>JSP</body-content> <description> Specifies the time zone for any time formatting or parsing actions nested in its body </description> <attribute> <name>value</name> <required>true</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>setTimeZone</name> <tag-class>org.apache.taglibs.standard.tag.el.fmt.SetTimeZoneTag</tag-class> <body-content>empty</body-content> <description> Stores the given time zone in the time zone configuration variable </description> <attribute> <name>value</name> <required>true</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>scope</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>bundle</name> <tag-class>org.apache.taglibs.standard.tag.el.fmt.BundleTag</tag-class> <body-content>JSP</body-content> <description> Loads a resource bundle to be used by its tag body </description> <attribute> <name>basename</name> <required>true</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>prefix</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>setBundle</name> <tag-class>org.apache.taglibs.standard.tag.el.fmt.SetBundleTag</tag-class> <body-content>empty</body-content> <description> Loads a resource bundle and stores it in the named scoped variable or the bundle configuration variable </description> <attribute> <name>basename</name> <required>true</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>scope</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>message</name> <tag-class>org.apache.taglibs.standard.tag.el.fmt.MessageTag</tag-class> <body-content>JSP</body-content> <description> Maps key to localized message and performs parametric replacement </description> <attribute> <name>key</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>bundle</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>scope</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>param</name> <tag-class>org.apache.taglibs.standard.tag.el.fmt.ParamTag</tag-class> <body-content>JSP</body-content> <description> Supplies an argument for parametric replacement to a containing <message> tag </description> <attribute> <name>value</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>formatNumber</name> <tag-class>org.apache.taglibs.standard.tag.el.fmt.FormatNumberTag</tag-class> <body-content>JSP</body-content> <description> Formats a numeric value as a number, currency, or percentage </description> <attribute> <name>value</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>type</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>pattern</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>currencyCode</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>currencySymbol</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>groupingUsed</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>maxIntegerDigits</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>minIntegerDigits</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>maxFractionDigits</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>minFractionDigits</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>scope</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>parseNumber</name> <tag-class>org.apache.taglibs.standard.tag.el.fmt.ParseNumberTag</tag-class> <body-content>JSP</body-content> <description> Parses the string representation of a number, currency, or percentage </description> <attribute> <name>value</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>type</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>pattern</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>parseLocale</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>integerOnly</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>scope</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>formatDate</name> <tag-class>org.apache.taglibs.standard.tag.el.fmt.FormatDateTag</tag-class> <body-content>empty</body-content> <description> Formats a date and/or time using the supplied styles and pattern </description> <attribute> <name>value</name> <required>true</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>type</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>dateStyle</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>timeStyle</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>pattern</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>timeZone</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>scope</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> <tag> <name>parseDate</name> <tag-class>org.apache.taglibs.standard.tag.el.fmt.ParseDateTag</tag-class> <body-content>JSP</body-content> <description> Parses the string representation of a date and/or time </description> <attribute> <name>value</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>type</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>dateStyle</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>timeStyle</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>pattern</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>timeZone</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>parseLocale</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>var</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> <attribute> <name>scope</name> <required>false</required> <rtexprvalue>false</rtexprvalue> </attribute> </tag> </taglib> --- NEW FILE: snipsnap.tld --- <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.2//EN" "http://java.sun.com/dtd/web-jsptaglibrary_1_2.dtd"> <taglib> <tlib-version>1.0</tlib-version> <jsp-version>1.2</jsp-version> <short-name>SnipSnap</short-name> <uri>http://snipsnap.com/snipsnap.tld</uri> <tag> <name>debug</name> <tag-class>org.snipsnap.jsp.DebugTag</tag-class> </tag> <tag> <name>geoUrl</name> <tag-class>org.snipsnap.jsp.CoordinatesTag</tag-class> </tag> <tag> <name>dublinCore</name> <tag-class>org.snipsnap.jsp.DublinCoreTag</tag-class> <attribute> <name>snip</name> <type>org.snipsnap.snip.Snip</type> <description>snip to get dublin core information for</description> </attribute> <attribute> <name>format</name> <description>output format, e.g xml, defaults to html</description> </attribute> </tag> <tag> <name>pathSelector</name> <tag-class>org.snipsnap.jsp.PathSelectorTag</tag-class> <attribute> <name>parentName</name> <description>name of snip to split path for</description> </attribute> </tag> <tag> <name>path</name> <tag-class>org.snipsnap.jsp.PathTag</tag-class> <attribute> <name>snip</name> <type>org.snipsnap.snip.Snip</type> <description>snip to get path for</description> </attribute> </tag> <tag> <name>content</name> <tag-class>org.snipsnap.jsp.ContentTag</tag-class> <attribute> <name>snip</name> <type>org.snipsnap.snip.Snip</type> <description>snip to get content for</description> </attribute> <attribute> <name>encode</name> <description>true if HTML code should be encoded</description> </attribute> <attribute> <name>removeHtml</name> <description>true if HTML code should be removed</description> </attribute> <attribute> <name>extract</name> <description>true if only an extract should be displayed</description> </attribute> </tag> <tag> <name>backLinks</name> <tag-class>org.snipsnap.jsp.BackLinkTag</tag-class> <attribute> <name>snip</name> <type>org.snipsnap.snip.Snip</type> <description>snip to get backlinks for</description> </attribute> <attribute> <name>count</name> <description>number of backlinks to show</description> </attribute> </tag> <tag> <name>snipLinks</name> <tag-class>org.snipsnap.jsp.SnipLinkTag</tag-class> <attribute> <name>snip</name> <type>org.snipsnap.snip.Snip</type> <description>snip to check roles against</description> </attribute> <attribute> <name>start</name> <description>start color</description> </attribute> <attribute> <name>end</name> <description>end color</description> </attribute> <attribute> <name>width</name> <description>width of result table with SnipLinks</description> </attribute> </tag> <tag> <name>checkRoles</name> <tag-class>org.snipsnap.jsp.UserAuth</tag-class> <attribute> <name>roles</name> <required>true</required> <description>roles to check user against</description> </attribute> <attribute> <name>snip</name> <type>org.snipsnap.snip.Snip</type> <description>snip to check roles against</description> </attribute> <attribute> <name>name</name> <type>java.lang.String</type> <description>name of snip to check roles against</description> </attribute> <attribute> <name>invert</name> <type>java.lang.Boolean</type> <description>invert the check</description> </attribute> </tag> <tag> <name>check</name> <tag-class>org.snipsnap.jsp.CheckPermission</tag-class> <attribute> <name>permission</name> <description>permission to check</description> </attribute> <attribute> <name>roles</name> <required>true</required> <description>roles to check user against</description> </attribute> <attribute> <name>snip</name> <type>org.snipsnap.snip.Snip</type> <description>snip to check roles against</description> </attribute> <attribute> <name>name</name> <type>java.lang.String</type> <description>name of snip to check roles against</description> </attribute> <attribute> <name>invert</name> <type>java.lang.Boolean</type> <description>invert the check</description> </attribute> </tag> <tag> <name>checkObject</name> <tag-class>org.snipsnap.jsp.ObjectAuth</tag-class> <attribute> <name>permission</name> <description>permission to check</description> </attribute> <attribute> <name>name</name> <type>java.lang.String</type> <description>name of snip to check roles against</description> </attribute> <attribute> <name>roles</name> <required>true</required> <description>roles to check user against</description> </attribute> <attribute> <name>snip</name> <type>org.snipsnap.snip.Snip</type> <description>snip to check roles against</description> </attribute> <attribute> <name>name</name> <type>java.lang.String</type> <description>name of snip to check roles against</description> </attribute> <attribute> <name>invert</name> <type>java.lang.Boolean</type> <description>invert the check</description> </attribute> </tag> <tag> <name>snip</name> <tag-class>org.snipsnap.jsp.SnipTag</tag-class> <attribute> <name>name</name> </attribute> <attribute> <name>snip</name> <type>org.snipsnap.snip.Snip</type> <description>snip for output</description> </attribute> </tag> <tag> <name>image</name> <tag-class>org.snipsnap.jsp.ImageTag</tag-class> <attribute> <name>name</name> <required>true</required> </attribute> <attribute> <name>alt</name> <required>false</required> </attribute> <attribute> <name>ext</name> <required>false</required> </attribute> <attribute> <name>root</name> <required>false</required> </attribute> </tag> </taglib> --- NEW FILE: web.xml --- <?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <!-- ** Web application configuration. ** @author Matthias L. Jugel ** @version $Id: web.xml,v 1.1 2004/03/20 10:15:36 jsurfer Exp $ --> <web-app> <display-name>HMath</display-name> <description>HMath BLOG/Wiki</description> <context-param> <param-name>javax.servlet.jsp.jstl.fmt.fallbackLocale</param-name> <param-value>en</param-value> </context-param> <context-param> <param-name>javax.servlet.jsp.jstl.fmt.localizationContext</param-name> <param-value>i18n.messages</param-value> </context-param> <filter> <filter-name>org.snipsnap.net.filter.InitFilter</filter-name> <filter-class>org.snipsnap.net.filter.InitFilter</filter-class> </filter> <filter> <filter-name>org.snipsnap.net.filter.EncRequestFilter</filter-name> <filter-class>org.snipsnap.net.filter.EncRequestFilter</filter-class> </filter> <filter-mapping> <filter-name>org.snipsnap.net.filter.InitFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <listener> <listener-class>org.snipsnap.user.SessionListener</listener-class> </listener> <listener> <listener-class>org.snipsnap.net.ApplicationContextListener</listener-class> </listener> <servlet> <servlet-name>MathMLPresentation</servlet-name> <servlet-class>org.hartmath.server.MathMLPresentation</servlet-class> </servlet> <servlet> <servlet-name>org.hartmath.server.EvalOutputFormServlet</servlet-name> <servlet-class>org.hartmath.server.EvalOutputFormServlet</servlet-class> </servlet> <servlet> <servlet-name>org.hartmath.server.SnipEvalServlet</servlet-name> <servlet-class>org.hartmath.server.SnipEvalServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.Layouter</servlet-name> <servlet-class>org.snipsnap.net.Layouter</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.CssHandlerServlet</servlet-name> <servlet-class>org.snipsnap.net.CssHandlerServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.ThemeImageServlet</servlet-name> <servlet-class>org.snipsnap.net.ThemeImageServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.FileUploadServlet</servlet-name> <servlet-class>org.snipsnap.net.FileUploadServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.FileDownloadServlet</servlet-name> <servlet-class>org.snipsnap.net.FileDownloadServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.StoreLabelServlet</servlet-name> <servlet-class>org.snipsnap.net.StoreLabelServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.LabelsServlet</servlet-name> <servlet-class>org.snipsnap.net.LabelsServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.AddLabelServlet</servlet-name> <servlet-class>org.snipsnap.net.AddLabelServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.RemoveLabelServlet</servlet-name> <servlet-class>org.snipsnap.net.RemoveLabelServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.SnipViewServlet</servlet-name> <servlet-class>org.snipsnap.net.SnipViewServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.HistoryServlet</servlet-name> <servlet-class>org.snipsnap.net.HistoryServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.SnipVersionServlet</servlet-name> <servlet-class>org.snipsnap.net.SnipVersionServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.DiffServlet</servlet-name> <servlet-class>org.snipsnap.net.DiffServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.RenderServlet</servlet-name> <servlet-class>org.snipsnap.net.RenderServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.NameSpaceServlet</servlet-name> <servlet-class>org.snipsnap.net.NameSpaceServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.RdfServlet</servlet-name> <servlet-class>org.snipsnap.net.RdfServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.SnipRawServlet</servlet-name> <servlet-class>org.snipsnap.net.SnipRawServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.VersionServlet</servlet-name> <servlet-class>org.snipsnap.net.VersionServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.RssServlet</servlet-name> <servlet-class>org.snipsnap.net.RssServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.RsdServlet</servlet-name> <servlet-class>org.snipsnap.net.RsdServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.XmlRpcServlet</servlet-name> <servlet-class>org.snipsnap.net.XmlRpcServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.SnipNewServlet</servlet-name> <servlet-class>org.snipsnap.net.SnipNewServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.SnipCopyServlet</servlet-name> <servlet-class>org.snipsnap.net.SnipCopyServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.SnipEditServlet</servlet-name> <servlet-class>org.snipsnap.net.SnipEditServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.SnipLockServlet</servlet-name> <servlet-class>org.snipsnap.net.SnipLockServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.SnipStoreServlet</servlet-name> <servlet-class>org.snipsnap.net.SnipStoreServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.SnipRemoveServlet</servlet-name> <servlet-class>org.snipsnap.net.SnipRemoveServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.SnipSearchServlet</servlet-name> <servlet-class>org.snipsnap.net.SnipSearchServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.PostStoreServlet</servlet-name> <servlet-class>org.snipsnap.net.PostStoreServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.CommentViewServlet</servlet-name> <servlet-class>org.snipsnap.net.CommentViewServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.CommentStoreServlet</servlet-name> <servlet-class>org.snipsnap.net.CommentStoreServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.ChangePasswordServlet</servlet-name> <servlet-class>org.snipsnap.net.ChangePasswordServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.MailPasswordKeyServlet</servlet-name> <servlet-class>org.snipsnap.net.MailPasswordKeyServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.LoginServlet</servlet-name> <servlet-class>org.snipsnap.net.LoginServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.NewUserServlet</servlet-name> <servlet-class>org.snipsnap.net.NewUserServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.iCalServlet</servlet-name> <servlet-class>org.snipsnap.net.iCalServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.RobotServlet</servlet-name> <servlet-class>org.snipsnap.net.RobotServlet</servlet-class> </servlet> <!-- ADMIN --> <servlet> <servlet-name>org.snipsnap.net.admin.AdminServlet</servlet-name> <servlet-class>org.snipsnap.net.admin.AdminServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.admin.UserManagerServlet</servlet-name> <servlet-class>org.snipsnap.net.admin.UserManagerServlet</servlet-class> </servlet> <!-- setup and configuration --> <servlet> <servlet-name>org.snipsnap.net.admin.ConfigureServlet</servlet-name> <servlet-class>org.snipsnap.net.admin.ConfigureServlet</servlet-class> </servlet> <servlet> <servlet-name>org.snipsnap.net.admin.ThemeImageServlet</servlet-name> <servlet-class>org.snipsnap.net.admin.ThemeImageServlet</servlet-class> </servlet> <!-- servlet mappings --> <servlet-mapping> <servlet-name>org.hartmath.server.SnipEvalServlet</servlet-name> <url-pattern>/exec/eval</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.SnipRawServlet</servlet-name> <url-pattern>/raw/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.SnipViewServlet</servlet-name> <url-pattern>/space/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.HistoryServlet</servlet-name> <url-pattern>/exec/history</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.SnipVersionServlet</servlet-name> <url-pattern>/exec/version</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.DiffServlet</servlet-name> <url-pattern>/exec/diff</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.RdfServlet</servlet-name> <url-pattern>/rdf/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.RenderServlet</servlet-name> <url-pattern>/exec/render</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.NameSpaceServlet</servlet-name> <url-pattern>/exec/namespace</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.Layouter</servlet-name> <url-pattern>/exec/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.CssHandlerServlet</servlet-name> <url-pattern>/theme/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.ThemeImageServlet</servlet-name> <url-pattern>/theme/images/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.FileUploadServlet</servlet-name> <url-pattern>/exec/upload</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.SnipLockServlet</servlet-name> <url-pattern>/exec/lock</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.XmlRpcServlet</servlet-name> <url-pattern>/RPC2</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.RssServlet</servlet-name> <url-pattern>/exec/rss</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.RsdServlet</servlet-name> <url-pattern>/exec/rsd</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.VersionServlet</servlet-name> <url-pattern>/rest/version</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.LabelsServlet</servlet-name> <url-pattern>/exec/labels</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.AddLabelServlet</servlet-name> <url-pattern>/exec/addlabel</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.RemoveLabelServlet</servlet-name> <url-pattern>/exec/removelabel</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.StoreLabelServlet</servlet-name> <url-pattern>/exec/storelabel</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.SnipNewServlet</servlet-name> <url-pattern>/exec/new</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.SnipCopyServlet</servlet-name> <url-pattern>/exec/copy</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.SnipEditServlet</servlet-name> <url-pattern>/exec/edit</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.SnipStoreServlet</servlet-name> <url-pattern>/exec/store</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.SnipRemoveServlet</servlet-name> <url-pattern>/exec/remove</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.SnipSearchServlet</servlet-name> <url-pattern>/exec/search</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.PostStoreServlet</servlet-name> <url-pattern>/exec/storepost</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.CommentViewServlet</servlet-name> <url-pattern>/comments/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.CommentStoreServlet</servlet-name> <url-pattern>/exec/storecomment</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.ChangePasswordServlet</servlet-name> <url-pattern>/exec/changepass</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.MailPasswordKeyServlet</servlet-name> <url-pattern>/exec/mailkey</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.LoginServlet</servlet-name> <url-pattern>/exec/authenticate</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.NewUserServlet</servlet-name> <url-pattern>/exec/newuser</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.iCalServlet</servlet-name> <url-pattern>/exec/ical/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.RobotServlet</servlet-name> <url-pattern>/robots.txt</url-pattern> </servlet-mapping> <!-- ADMIN --> <servlet-mapping> <servlet-name>org.snipsnap.net.admin.AdminServlet</servlet-name> <url-pattern>/manager/*</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.admin.UserManagerServlet</servlet-name> <url-pattern>/manager/user</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.admin.ConfigureServlet</servlet-name> <url-pattern>/admin/configure</url-pattern> </servlet-mapping> <servlet-mapping> <servlet-name>org.snipsnap.net.admin.ThemeImageServlet</servlet-name> <url-pattern>/admin/themeimage</url-pattern> </servlet-mapping> <welcome-file-list> <welcome-file>index.jsp</welcome-file> <welcome-file>index.html</welcome-file> </welcome-file-list> <!-- TAGLIBS --> <taglib> <taglib-uri>http://java.sun.com/jstl/core</taglib-uri> <taglib-location>/WEB-INF/c.tld</taglib-location> </taglib> <taglib> <taglib-uri>http://java.sun.com/jstl/fmt</taglib-uri> <taglib-location>/WEB-INF/fmt.tld</taglib-location> </taglib> <taglib> <taglib-uri>http://snipsnap.com/snipsnap</taglib-uri> <taglib-location>/WEB-INF/snipsnap.tld</taglib-location> </taglib> <taglib> <taglib-uri>http://hartmath.org/hartmath</taglib-uri> <taglib-location>/WEB-INF/hartmath-taglib.tld</taglib-location> </taglib> </web-app> --- NEW FILE: hartmath-taglib.tld --- <?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE taglib PUBLIC "-//Sun Microsystems, Inc.//DTD JSP Tag Library 1.1//EN" "http://java.sun.com/j2ee/dtds/web-jsptaglibrary_1_1.dtd"> <taglib> <tlibversion>1.0</tlibversion> <jspversion>1.1</jspversion> <shortname>hartmath</shortname> <uri>http://www.hartmath.org/WEB-INF/jsp/hartmath-taglib.tld</uri> <info> hartmath.org tag library </info> <tag> <name>eval</name> <tagclass>org.hartmath.server.taglib.EvalTag</tagclass> <bodycontent>JSP</bodycontent> <info> Evaluate a HartMath expression </info> </tag> <tag> <name>mathml</name> <tagclass>org.hartmath.server.taglib.MathMLTag</tagclass> <bodycontent>JSP</bodycontent> <info> Convert a HartMath expression to MathML </info> </tag> <tag> <name>header</name> <tagclass>org.hartmath.server.taglib.HeaderTag</tagclass> <bodycontent>JSP</bodycontent> <info> Call browser specific header include </info> </tag> <tag> <name>browser</name> <tagclass>org.hartmath.server.taglib.BrowserTag</tagclass> <bodycontent>JSP</bodycontent> <info> Eval the body of the tag if the client uses the specified browser ('msie' 'netscape') </info> <attribute> <name>type</name> <required>true</required> <rtexprvalue>true</rtexprvalue> </attribute> <attribute> <name>content</name> <required>false</required> <rtexprvalue>true</rtexprvalue> </attribute> </tag> <tag> <name>wiki</name> <tagclass>org.hartmath.server.taglib.WikiTag</tagclass> <bodycontent>JSP</bodycontent> <info> Convert Wiki body text to HTML </info> </tag> </taglib> |
|
From: Klaus H. <js...@us...> - 2004-03-20 10:21:52
|
Update of /cvsroot/hmath/org.hmath.server/WEB-INF/src/META-INF/services In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8860/WEB-INF/src/META-INF/services Modified Files: org.radeox.macro.Macro Log Message: misc changes Index: org.radeox.macro.Macro =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/WEB-INF/src/META-INF/services/org.radeox.macro.Macro,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** org.radeox.macro.Macro 9 Mar 2004 20:13:09 -0000 1.1 --- org.radeox.macro.Macro 20 Mar 2004 10:11:55 -0000 1.2 *************** *** 7,11 **** org.radeox.macro.HelloWorldMacro org.radeox.macro.IsbnMacro - org.radeox.macro.LinkMacro org.radeox.macro.MailToMacro org.radeox.macro.RfcMacro --- 7,10 ---- *************** *** 17,21 **** org.snipsnap.render.macro.BackLinkMacro org.snipsnap.render.macro.CalendarMacro - org.snipsnap.render.macro.FieldMacro org.snipsnap.render.macro.HotSnipMacro org.snipsnap.render.macro.ImageMacro --- 16,19 ---- *************** *** 42,47 **** --- 40,48 ---- org.hartmath.server.macro.CodeMacro org.hartmath.server.macro.EvalMacro + org.hartmath.server.macro.FieldMacro + org.hartmath.server.macro.GraphMacro org.hartmath.server.macro.JViewMacro org.hartmath.server.macro.MacroListMacro + org.hartmath.server.macro.LinkMacro org.hartmath.server.macro.MathMLMacro org.hartmath.server.macro.MMLMacro |
|
From: Klaus H. <js...@us...> - 2004-03-20 10:20:31
|
Update of /cvsroot/hmath/org.hmath.server/WEB-INF/src/org/hartmath/server/macro In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8583/WEB-INF/src/org/hartmath/server/macro Added Files: FieldMacro.java LinkMacro.java GraphMacro.java Log Message: misc changes --- NEW FILE: GraphMacro.java --- /* * This file is part of "SnipSnap Wiki/Weblog". * * Copyright (c) 2002 Stephan J. Schmidt, Matthias L. Jugel * All Rights Reserved. * * Please visit http://snipsnap.org/ for updates and contact. * * --LICENSE NOTICE-- * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * --LICENSE NOTICE-- */ package org.hartmath.server.macro; import java.io.IOException; import java.io.Writer; import org.hartmath.server.filter.INoParserBodyFilterMacro; import org.snipsnap.render.macro.SnipMacro; import org.snipsnap.render.macro.parameter.SnipMacroParameter; import org.snipsnap.snip.Snip; /* * Macro that renders graphs. * * @author stephan * @team sonicteam * @version $Id: GraphMacro.java,v 1.1 2004/03/20 10:10:35 jsurfer Exp $ */ public class GraphMacro extends SnipMacro implements INoParserBodyFilterMacro { public GraphMacro() { } public String getName() { return "graph"; } public String getDescription() { return "Render a graph like an organigram or mindmap."; } public void execute(Writer writer, SnipMacroParameter params) throws IllegalArgumentException, IOException { Snip snip = params.getSnipRenderContext().getSnip(); String name = snip.getName(); String handler = params.get("handler", 0); // writer.write(""+params.getContentStart()); // writer.write(":"+ params.getContentEnd()); // writer.write(":"+params.getSnip().getContent().length()); // writer.write("<br/>"); writer.write("<img src=\"exec/render?name="); writer.write(name); writer.write("&handler="); writer.write(handler); // Remove {graph} from start and end offset int start = snip.getContent().indexOf('}', params.getStart() + getName().length()) + 1; int end = params.getEnd() - getName().length() - 2; writer.write("&start=" + start); writer.write("&end=" + end); // writer.write("&start="+params.getContentStart()); // writer.write("&end="+params.getContentEnd()); writer.write("\"/>"); } } --- NEW FILE: LinkMacro.java --- /* * This file is part of "SnipSnap Radeox Rendering Engine". * * Copyright (c) 2002 Stephan J. Schmidt, Matthias L. Jugel * All Rights Reserved. * * Please visit http://radeox.org/ for updates and contact. * * --LICENSE NOTICE-- * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * --LICENSE NOTICE-- */ package org.hartmath.server.macro; import java.io.IOException; import java.io.Writer; import org.radeox.api.engine.ImageRenderEngine; import org.radeox.api.engine.RenderEngine; import org.radeox.api.engine.context.RenderContext; import org.radeox.macro.BaseLocaleMacro; import org.radeox.macro.parameter.MacroParameter; import org.radeox.util.Encoder; /* * Macro for displaying external links with a name. The normal UrlFilter * takes the url as a name. * * @author stephan * @team sonicteam * @version $Id: LinkMacro.java,v 1.1 2004/03/20 10:10:35 jsurfer Exp $ */ public class LinkMacro extends BaseLocaleMacro { public String getLocaleKey() { return "macro.link"; } public void execute(Writer writer, MacroParameter params) throws IllegalArgumentException, IOException { RenderContext context = params.getContext(); RenderEngine engine = context.getRenderEngine(); String text = params.get("text", 0); String url = params.get("url", 1); String img = params.get("img", 2); // check for single url argument (text == url) if(params.getLength() == 1) { url = text; text = Encoder.toEntity(text.charAt(0)) + Encoder.escape(text.substring(1)); } if (url != null && text != null) { writer.write("<span class=\"nobr\">"); if (!"none".equals(img) && engine instanceof ImageRenderEngine) { writer.write(((ImageRenderEngine) engine).getExternalImageLink()); } writer.write("<a href=\""); writer.write(Encoder.escape(url)); writer.write("\">"); writer.write(text); writer.write("</a></span>"); } else { throw new IllegalArgumentException("link needs a name and a url as argument"); } return; } } --- NEW FILE: FieldMacro.java --- /* * This file is part of "SnipSnap Wiki/Weblog". * * Copyright (c) 2002 Stephan J. Schmidt, Matthias L. Jugel * All Rights Reserved. * * Please visit http://snipsnap.org/ for updates and contact. * * --LICENSE NOTICE-- * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * --LICENSE NOTICE-- */ package org.hartmath.server.macro; import java.io.IOException; import java.io.Writer; import org.radeox.util.Encoder; import org.snipsnap.render.macro.SnipMacro; import org.snipsnap.render.macro.parameter.SnipMacroParameter; import org.snipsnap.snip.SnipLink; /* * Macro that creates (HTML) input fields with forms. * * @author stephan * @team sonicteam * @version $Id: FieldMacro.java,v 1.1 2004/03/20 10:10:35 jsurfer Exp $ */ public class FieldMacro extends SnipMacro { public String getName() { return "field"; } public String getDescription() { return "Display a form input field and submit button."; } /** * {field:id|value|target|button} */ public void execute(Writer writer, SnipMacroParameter params) throws IllegalArgumentException, IOException { if (params.getLength() > 0) { writer.write("<form class=\"form\" action=\""); if (params.getLength() >= 3) { SnipLink.appendUrl(writer, params.get("2")); } else { SnipLink.appendUrl(writer, params.getSnipRenderContext().getSnip().getName()); } writer.write("\" method=\"get\">"); writer.write("<input size=\"18\" name=\""); writer.write(Encoder.escape( params.get("0") )); writer.write("\""); if (params.getLength() >= 2) { writer.write(" value=\""); writer.write(Encoder.escape(params.get("1"))); writer.write("\""); } writer.write("/>"); if (params.getLength() >= 4) { writer.write(" <input type=\"submit\" name=\"submit\" value=\""); writer.write(Encoder.escape(params.get("3"))); writer.write("\"/>"); } writer.write("</form>"); return; } else { throw new IllegalArgumentException("Number of arguments does not match"); } } } |
|
From: Klaus H. <js...@us...> - 2004-03-20 10:20:31
|
Update of /cvsroot/hmath/org.hmath.server/WEB-INF/src/org/hartmath/server/taglib In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8583/WEB-INF/src/org/hartmath/server/taglib Modified Files: HeaderTag.java Log Message: misc changes Index: HeaderTag.java =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/WEB-INF/src/org/hartmath/server/taglib/HeaderTag.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** HeaderTag.java 12 Mar 2004 20:50:50 -0000 1.1 --- HeaderTag.java 20 Mar 2004 10:10:35 -0000 1.2 *************** *** 24,42 **** HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); BrowserSniffer bd = BrowserSniffer.getBrowserDetection(request); ! try { switch (bd.getBrowserId()) { case BrowserSniffer.MOZILLAID : ! case BrowserSniffer.NETSCAPEID : ! pageContext.getResponse().setContentType( ! "application/xhtml+xml" + "; charset=" + Application.get().getConfiguration().getEncoding()); request.getRequestDispatcher("gecko_header.jsp").include(request, pageContext.getResponse()); break; case BrowserSniffer.OPERAID : pageContext.getResponse().setContentType( ! "application/xhtml+xml" + "; charset=" + Application.get().getConfiguration().getEncoding()); request.getRequestDispatcher("opera_header.jsp").include(request, pageContext.getResponse()); break; case BrowserSniffer.MATHPLAYERID : pageContext.getResponse().setContentType("text/html" + "; charset=" + Application.get().getConfiguration().getEncoding()); request.getRequestDispatcher("msie_header.jsp").include(request, pageContext.getResponse()); --- 24,43 ---- HttpServletRequest request = (HttpServletRequest) pageContext.getRequest(); BrowserSniffer bd = BrowserSniffer.getBrowserDetection(request); ! // String appURL = Application.get().getConfiguration().getPath(); // ""; try { switch (bd.getBrowserId()) { case BrowserSniffer.MOZILLAID : ! pageContext.getResponse().setContentType("text/xml" + "; charset=" + Application.get().getConfiguration().getEncoding()); request.getRequestDispatcher("gecko_header.jsp").include(request, pageContext.getResponse()); break; + case BrowserSniffer.SAFARIID : case BrowserSniffer.OPERAID : pageContext.getResponse().setContentType( ! "application/xhtml+xml" + "; charset=" + Application.get().getConfiguration().getEncoding()); request.getRequestDispatcher("opera_header.jsp").include(request, pageContext.getResponse()); break; + case BrowserSniffer.NETSCAPEID : // old netscape newers are detected as Gecko case BrowserSniffer.MATHPLAYERID : + case BrowserSniffer.MSIEID : pageContext.getResponse().setContentType("text/html" + "; charset=" + Application.get().getConfiguration().getEncoding()); request.getRequestDispatcher("msie_header.jsp").include(request, pageContext.getResponse()); *************** *** 44,48 **** default : pageContext.getResponse().setContentType("text/html" + "; charset=" + Application.get().getConfiguration().getEncoding()); ! request.getRequestDispatcher("gecko_header.jsp").include(request, pageContext.getResponse()); break; } --- 45,49 ---- default : pageContext.getResponse().setContentType("text/html" + "; charset=" + Application.get().getConfiguration().getEncoding()); ! request.getRequestDispatcher("msie_header.jsp").include(request, pageContext.getResponse()); break; } |
|
From: Klaus H. <js...@us...> - 2004-03-20 10:20:30
|
Update of /cvsroot/hmath/org.hmath.server/WEB-INF/src/org/hartmath/server/filter In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8583/WEB-INF/src/org/hartmath/server/filter Modified Files: WikipediaFilter.java Log Message: misc changes Index: WikipediaFilter.java =================================================================== RCS file: /cvsroot/hmath/org.hmath.server/WEB-INF/src/org/hartmath/server/filter/WikipediaFilter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** WikipediaFilter.java 9 Mar 2004 20:13:03 -0000 1.1 --- WikipediaFilter.java 20 Mar 2004 10:10:34 -0000 1.2 *************** *** 29,34 **** --- 29,37 ---- import java.util.StringTokenizer; + import javax.servlet.http.HttpServletRequest; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; + import org.hartmath.server.taglib.BrowserSniffer; import org.hartmath.tex2mml.TeXParser; import org.radeox.api.engine.ImageRenderEngine; *************** *** 47,50 **** --- 50,54 ---- import org.radeox.util.Encoder; import org.radeox.util.StringBufferWriter; + import org.snipsnap.app.Application; import org.snipsnap.render.macro.parameter.SnipMacroParameter; import org.snipsnap.snip.Snip; *************** *** 412,417 **** } } - protected int getNextToken() throws InvalidInputException { fWhiteStartPosition = 0; fWhiteStart = false; --- 416,421 ---- } } + protected int getNextToken() throws InvalidInputException { fWhiteStartPosition = 0; fWhiteStart = false; *************** *** 455,474 **** } continue; ! case '$' : // detect ascii and tex math ! copyWhite(fWhiteStart, fWhiteStartPosition, 1); ! fWhiteStart = false; ! int startMathPosition = fCurrentPosition; ! if (readUntilChar('$')) { ! String mathContent = new String(fSource, startMathPosition, fCurrentPosition - startMathPosition - 1); ! if (mathContent != null) { ! fResult.append("<m:math><m:mstyle mathcolor=\"Black\" displaystyle=\"true\">"); ! fTeXParser.initialize(mathContent); ! fTeXParser.start(fResult); ! fResult.append("</m:mstyle></m:math>"); ! continue; ! } ! } ! break; case '{' : // detect macros copyWhite(fWhiteStart, fWhiteStartPosition, 1); --- 459,475 ---- } continue; ! case '$' : // detect tex math ! copyWhite(fWhiteStart, fWhiteStartPosition, 1); ! fWhiteStart = false; ! int startMathPosition = fCurrentPosition; ! if (readUntilChar('$')) { ! String mathContent = new String(fSource, startMathPosition, fCurrentPosition - startMathPosition - 1); ! if (mathContent != null) { ! handleTeXMath(mathContent); ! continue; ! } ! } ! break; case '{' : // detect macros copyWhite(fWhiteStart, fWhiteStartPosition, 1); *************** *** 661,727 **** } break; ! case 'a' : // <ol> list ! if (getList('a', "<ol class=\"alpha\">", "</ol>")) { ! continue; ! } ! break; ! case 'A' : // <ol> list ! if (getList('A', "<ol class=\"ALPHA\">", "</ol>")) { ! continue; ! } ! break; ! case 'g' : // <ol> list ! if (getList('g', "<ol class=\"greek\">", "</ol>")) { ! continue; ! } ! break; ! case 'H' : // <ol> list ! if (getList('H', "<ol class=\"HIRAGANA\">", "</ol>")) { ! continue; ! } ! break; ! case 'k' : // <ol> list ! if (getList('k', "<ol class=\"katakana\">", "</ol>")) { ! continue; ! } ! break; ! case 'K' : // <ol> list ! if (getList('K', "<ol class=\"KATAKANA\">", "</ol>")) { ! continue; ! } ! break; ! case 'j' : // <ol> list ! if (getList('j', "<ol class=\"HEBREW\">", "</ol>")) { ! continue; ! } ! break; ! // int levelROMAN = getNumberOfChar('I') + 1; ! // if (getNextChar('.') && getNextChar(' ')) { ! // copyWhite(fWhiteStart, fWhiteStartPosition, 1 + levelROMAN); ! // fWhiteStart = false; ! // Token tok = (Token) fTokenStack.peek(); ! // if (tok instanceof ListToken) { ! // ListToken listToken = (ListToken) tok; ! // int topLevel = listToken.getLevel(); ! // if (listToken.getToken() == TokenLIST_OL_START) { ! // if (levelROMAN > topLevel) { ! // fTokenStack.push(new ListToken(TokenLIST_OL_START, topLevel + 1)); ! // fResult.append("<ol class=\"ROMAN\"><li>"); ! // } else if (levelROMAN < topLevel) { ! // fResult.append("</ol></li><li>"); ! // } else { ! // fResult.append("</li><li>"); ! // } ! // } else { ! // fTokenStack.push(new ListToken(TokenLIST_OL_START, levelROMAN)); ! // fResult.append("<ol class=\"ROMAN\"><li>"); ! // } ! // } else { ! // fTokenStack.push(new ListToken(TokenLIST_OL_START, 1)); ! // fResult.append("\n<ol class=\"ROMAN\"><li>"); ! // } // continue; // } // break; case '\'' : if (getNextChar('\'')) { --- 662,701 ---- } break; ! // case 'a' : // <ol> list ! // if (getList('a', "<ol class=\"alpha\">", "</ol>")) { // continue; // } // break; + // case 'A' : // <ol> list + // if (getList('A', "<ol class=\"ALPHA\">", "</ol>")) { + // continue; + // } + // break; + // case 'g' : // <ol> list + // if (getList('g', "<ol class=\"greek\">", "</ol>")) { + // continue; + // } + // break; + // case 'H' : // <ol> list + // if (getList('H', "<ol class=\"HIRAGANA\">", "</ol>")) { + // continue; + // } + // break; + // case 'k' : // <ol> list + // if (getList('k', "<ol class=\"katakana\">", "</ol>")) { + // continue; + // } + // break; + // case 'K' : // <ol> list + // if (getList('K', "<ol class=\"KATAKANA\">", "</ol>")) { + // continue; + // } + // break; + // case 'j' : // <ol> list + // if (getList('j', "<ol class=\"HEBREW\">", "</ol>")) { + // continue; + // } + // break; + case '\'' : if (getNextChar('\'')) { *************** *** 769,787 **** } ! // tempCurrPosition = fCurrentPosition; ! // try { ! // if (fSource[tempCurrPosition++] == '-') { ! // ! // if (tempCurrPosition >= fSource.length || fSource[tempCurrPosition] != '-') { ! // fCurrentPosition++; ! // copyWhite(fWhiteStart, fWhiteStartPosition, 2); ! // fWhiteStart = false; ! // return TokenSTRIKETHROUGH; ! // } ! // ! // } ! // } catch (IndexOutOfBoundsException e) { ! // ! // } int levelMinus = getNumberOfChar('-') + 1; if (getNextChar(' ')) { --- 743,747 ---- } ! int levelMinus = getNumberOfChar('-') + 1; if (getNextChar(' ')) { *************** *** 817,823 **** break; case 'h' : // http(s):// - if (getList('h', "<ol class=\"hiragana\">", "</ol>")) { - continue; - } int urlStartPosition = fCurrentPosition; boolean foundUrl = false; --- 777,780 ---- *************** *** 863,901 **** } break; - // case 'ä' : // escape german umlauts - // copyWhite(fWhiteStart, fWhiteStartPosition, 1); - // fWhiteStart = false; - // fResult.append("ä"); - // continue; - // case 'ö' : // escape german umlauts - // copyWhite(fWhiteStart, fWhiteStartPosition, 1); - // fWhiteStart = false; - // fResult.append("ö"); - // continue; - // case 'ü' : // escape german umlauts - // copyWhite(fWhiteStart, fWhiteStartPosition, 1); - // fWhiteStart = false; - // fResult.append("ü"); - // continue; - // case 'Ä' : // escape german umlauts - // copyWhite(fWhiteStart, fWhiteStartPosition, 1); - // fWhiteStart = false; - // fResult.append("Ä"); - // continue; - // case 'Ö' : // escape german umlauts - // copyWhite(fWhiteStart, fWhiteStartPosition, 1); - // fWhiteStart = false; - // fResult.append("Ö"); - // continue; - // case 'Ü' : // escape german umlauts - // copyWhite(fWhiteStart, fWhiteStartPosition, 1); - // fWhiteStart = false; - // fResult.append("Ü"); - // continue; - // case 'ß' : // escape german umlauts - // copyWhite(fWhiteStart, fWhiteStartPosition, 1); - // fWhiteStart = false; - // fResult.append("ß"); - // continue; case '&' : int ampersandStart = fCurrentPosition - 1; --- 820,823 ---- *************** *** 945,950 **** } break; ! case '<' : // detect special html tags int htmlStartPosition = fCurrentPosition; int htmlToken = getHTMLToken(); if (htmlToken == TokenIgnore) { --- 867,892 ---- } break; ! case '<' : // detect the <math> tag first int htmlStartPosition = fCurrentPosition; + try { + String urlString = fStringSource.substring(fCurrentPosition - 1, fCurrentPosition + 5); + if (urlString.equals("<math>")) { + fCurrentPosition += 5; + if (readUntilString("</math>")) { + String mathContent = new String(fSource, htmlStartPosition + 5, fCurrentPosition - htmlStartPosition - 12); + if (mathContent != null) { + copyWhite(fWhiteStart, fWhiteStartPosition, fCurrentPosition - htmlStartPosition + 1); + fWhiteStart = false; + handleTeXMath(mathContent); + continue; + } + } + } + } catch (IndexOutOfBoundsException e) { + + } + fCurrentPosition = htmlStartPosition; + // detect special html tags + htmlStartPosition = fCurrentPosition; int htmlToken = getHTMLToken(); if (htmlToken == TokenIgnore) { *************** *** 991,994 **** --- 933,961 ---- } + private void handleTeXMath(String mathContent) { + // TODO clean this up + Map map = Application.get().getParameters(); + HttpServletRequest request = (HttpServletRequest) map.get("request"); + BrowserSniffer sniffy = BrowserSniffer.getBrowserDetection(request); + + switch (sniffy.getBrowserId()) { + case BrowserSniffer.MOZILLAID : + case BrowserSniffer.MSIEID : + case BrowserSniffer.MATHPLAYERID : + fResult.append("<m:math><m:mstyle mathcolor=\"Black\" displaystyle=\"true\">"); + fTeXParser.initialize(mathContent); + fTeXParser.parse2MML(fResult); + fResult.append("</m:mstyle></m:math>"); + break; + case BrowserSniffer.NETSCAPEID ://older netscape newer are detected as Gecko + fResult.append(fResult); + break; + default : + fResult.append("<m>"); + fTeXParser.initialize(mathContent); + fTeXParser.parse2CSS(fResult); + fResult.append("</m>"); + } + } private void handleSnipLink(String name) { if (name != null) { *************** *** 1106,1110 **** StringBuffer link = new StringBuffer(); link.append("<li>"); ! SnipLink.appendLink(link, fSnip.getName(),head, anchor); link.append("</li>"); toc.add(link.toString()); --- 1073,1077 ---- StringBuffer link = new StringBuffer(); link.append("<li>"); ! SnipLink.appendLink(link, fSnip.getName(), head, anchor); link.append("</li>"); toc.add(link.toString()); *************** *** 1305,1311 **** } catch (IllegalArgumentException e) { fResult.append("<div class=\"error\">" + command + ": " + e.getMessage() + "</div>"); ! e.printStackTrace(); ! } catch (Throwable e) { log.warn("MacroFilter: unable to format macro: " + command, e); --- 1272,1278 ---- } catch (IllegalArgumentException e) { fResult.append("<div class=\"error\">" + command + ": " + e.getMessage() + "</div>"); ! e.printStackTrace(); ! } catch (Throwable e) { log.warn("MacroFilter: unable to format macro: " + command, e); *************** *** 1969,1973 **** fContext = context; fWikiEngine = context.getRenderContext().getRenderEngine(); ! SnipMacroParameter params = (SnipMacroParameter)fContext.getMacroParameter(); fSnip = params.getSnipRenderContext().getSnip(); return filter(input, 0); --- 1936,1940 ---- fContext = context; fWikiEngine = context.getRenderContext().getRenderEngine(); ! SnipMacroParameter params = (SnipMacroParameter) fContext.getMacroParameter(); fSnip = params.getSnipRenderContext().getSnip(); return filter(input, 0); |
|
From: Klaus H. <js...@us...> - 2004-03-19 21:11:21
|
Update of /cvsroot/hmath/org.hartmath.tex2mml.test/src/org/hartmath/tex2mml/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1350/src/org/hartmath/tex2mml/test Added Files: Parse2MMLTestCase.java Removed Files: ParserTestCase.java Log Message: misc changes --- ParserTestCase.java DELETED --- --- NEW FILE: Parse2MMLTestCase.java --- package org.hartmath.tex2mml.test; import junit.framework.TestCase; //import org.hartmath.core.expression.ExpressionFactory; import org.hartmath.tex2mml.TeXParser; /** * Tests parser funciond for SimpleParserFactory */ public class Parse2MMLTestCase extends TestCase { TeXParser parser; public Parse2MMLTestCase(String name) { super(name); } public void testParser() { tex2mml("\\frac{1}{x_2}", "<m:mfrac><m:mn>1</m:mn><m:mrow><m:msub><m:mi>x</m:mi><m:mn>2</m:mn></m:msub></m:mrow></m:mfrac>"); tex2mml("\\hat x", "<m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover>"); tex2mml("\\hat{x}", "<m:mover><m:mi>x</m:mi><m:mo>^</m:mo></m:mover>"); tex2mml( "\\sum_{n=0}^\\infty", "<m:mrow><m:munderover><m:mo>∑</m:mo><m:mrow><m:mi>n</m:mi><m:mo>=</m:mo><m:mn>0</m:mn></m:mrow><m:mo>∞</m:mo></m:munderover></m:mrow>"); tex2mml( "\\mathbb{ABCDEFGHIJKLMNOPQRSTUVWXYZ}", "<m:mi>ℂℍℕℙℚℝℤ</m:mi>"); tex2mml( "x 2+\\frac{b}{a}x+\\frac{c}{a}=0", "<m:mrow><m:mi>x</m:mi><m:mn>2</m:mn><m:mo>+</m:mo><m:mfrac><m:mi>b</m:mi><m:mi>a</m:mi></m:mfrac><m:mi>x</m:mi><m:mo>+</m:mo><m:mfrac><m:mi>c</m:mi><m:mi>a</m:mi></m:mfrac><m:mo>=</m:mo><m:mn>0</m:mn></m:mrow>"); tex2mml( "x 2+\\frac{b}{a x}+\\frac{c}{a}=0", "<m:mrow><m:mi>x</m:mi><m:mn>2</m:mn><m:mo>+</m:mo><m:mfrac><m:mi>b</m:mi><m:mrow><m:mi>a</m:mi><m:mi>x</m:mi></m:mrow></m:mfrac><m:mo>+</m:mo><m:mfrac><m:mi>c</m:mi><m:mi>a</m:mi></m:mfrac><m:mo>=</m:mo><m:mn>0</m:mn></m:mrow>"); tex2mml( "x 2+y_1+z_1234", "<m:mrow><m:mi>x</m:mi><m:mn>2</m:mn><m:mo>+</m:mo><m:msub><m:mi>y</m:mi><m:mn>1</m:mn></m:msub><m:mo>+</m:mo><m:msub><m:mi>z</m:mi><m:mn>1234</m:mn></m:msub></m:mrow>"); tex2mml("\\frac{1}{2}", "<m:mfrac><m:mn>1</m:mn><m:mn>2</m:mn></m:mfrac>"); tex2mml("a_b", "<m:mrow><m:msub><m:mi>a</m:mi><m:mi>b</m:mi></m:msub></m:mrow>"); tex2mml("a", "<m:mi>a</m:mi>"); tex2mml("\\alpha", "<m:mi>α</m:mi>"); } public void tex2mml(String tex, String mml) { StringBuffer buf = new StringBuffer(); parser.initialize(tex); parser.parse2MML(buf); assertEquals(buf.toString(), mml); } /** * The JUnit setup method */ protected void setUp() { parser = new TeXParser(""); } } |