bknr-cvs
Threads by month
- ----- 2025 -----
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- 1964 discussions

14 Oct '06
Author: hhubner
Date: 2006-10-14 03:07:33 -0400 (Sat, 14 Oct 2006)
New Revision: 1988
Modified:
branches/xml-class-rework/projects/bos/statistics/Makefile
branches/xml-class-rework/projects/bos/statistics/buildSVGLineChart.xsl
branches/xml-class-rework/projects/bos/statistics/contracts-by-week.lxsl
branches/xml-class-rework/projects/bos/statistics/contracts-by-week.xsl
branches/xml-class-rework/projects/bos/statistics/loop-compiler.xslt
Log:
remove x bits
Property changes on: branches/xml-class-rework/projects/bos/statistics/Makefile
___________________________________________________________________
Name: svn:executable
- *
Property changes on: branches/xml-class-rework/projects/bos/statistics/buildSVGLineChart.xsl
___________________________________________________________________
Name: svn:executable
- *
Property changes on: branches/xml-class-rework/projects/bos/statistics/contracts-by-week.lxsl
___________________________________________________________________
Name: svn:executable
- *
Property changes on: branches/xml-class-rework/projects/bos/statistics/contracts-by-week.xsl
___________________________________________________________________
Name: svn:executable
- *
Property changes on: branches/xml-class-rework/projects/bos/statistics/loop-compiler.xslt
___________________________________________________________________
Name: svn:executable
- *
1
0

14 Oct '06
Author: hhubner
Date: 2006-10-14 03:05:32 -0400 (Sat, 14 Oct 2006)
New Revision: 1987
Modified:
branches/xml-class-rework/projects/bos/statistics/Makefile
Log:
Remove login
Modified: branches/xml-class-rework/projects/bos/statistics/Makefile
===================================================================
--- branches/xml-class-rework/projects/bos/statistics/Makefile 2006-10-14 07:00:17 UTC (rev 1986)
+++ branches/xml-class-rework/projects/bos/statistics/Makefile 2006-10-14 07:05:32 UTC (rev 1987)
@@ -1,7 +1,7 @@
BASE_URL = http://192.168.254.132:8080/reports-xml
YEAR = 2005
-LOGIN = ?__username=hans&__password=ognep
+LOGIN =
GRAPHICS = contracts-by-week.svg
@@ -18,4 +18,5 @@
.xsl.svg:
xsltproc -o $*.xml $*.xsl '$(BASE_URL)/$*/$(YEAR)$(LOGIN)'
- xsltproc -o $*-$(YEAR).svg buildSVGLineChart.xsl $*.xml
\ No newline at end of file
+ xsltproc -o $*-$(YEAR).svg buildSVGLineChart.xsl $*.xml
+ rm $*.xml
\ No newline at end of file
1
0

14 Oct '06
Author: hhubner
Date: 2006-10-14 03:00:17 -0400 (Sat, 14 Oct 2006)
New Revision: 1986
Removed:
branches/xml-class-rework/projects/bos/statistics/contracts-by-week-2005.svg
branches/xml-class-rework/projects/bos/statistics/contracts-by-week-2006.svg
branches/xml-class-rework/projects/bos/statistics/contracts-by-week.xml
Modified:
branches/xml-class-rework/projects/bos/statistics/
Log:
Remove generated files
Property changes on: branches/xml-class-rework/projects/bos/statistics
___________________________________________________________________
Name: svn:ignore
+ contracts-by-week.xml
*.svg
Deleted: branches/xml-class-rework/projects/bos/statistics/contracts-by-week-2005.svg
===================================================================
--- branches/xml-class-rework/projects/bos/statistics/contracts-by-week-2005.svg 2006-10-14 06:59:35 UTC (rev 1985)
+++ branches/xml-class-rework/projects/bos/statistics/contracts-by-week-2005.svg 2006-10-14 07:00:17 UTC (rev 1986)
@@ -1,75 +0,0 @@
-<svg xmlns:xlink="http://www.w3.org/2000/xlink/namespace/" width="1200" height="1200" onload="getSVGDoc(evt)" onzoom="ZoomControl()"><defs><g id="star" transform="scale(0.21)"><polyline points="48,16,16,96,96,48,0,48,80,96"/></g><g id="triangle" transform="scale(0.7)"><path id="Triangle" d="M 0 25 L 10 15 L 20 25 z" style="stroke:none"/></g><g id="square" transform="scale(1)"><rect width="18" height="18"/></g><g id="rectangle" transform="scale(1)"><rect width="7" height="22"/></g><script type="text/javascript">
-
- /* this code was largely reused from the excellent website SVG - Learning by Coding (http://svglbc.datenverdrahten.de/) */
- var svgdoc,svgroot;
- function getSVGDoc(load_evt)
- {
- svgdoc=load_evt.target.ownerDocument;
- svgroot=svgdoc.documentElement;
-
- texte=svgdoc.getElementById("tooltip").getElementsByTagName("text");
- }
- function ShowTooltip(mousemove_event,txt)
- {
- var ttrelem,tttelem,posx,posy,curtrans,ctx,cty,txt;
- var sollbreite,maxbreite,ges,anz,tmp,txl,neu,i,k,l
- ttrelem=svgdoc.getElementById("ttr");
- tttelem=svgdoc.getElementById("ttt");
- posx=mousemove_event.clientX;
- posy=mousemove_event.clientY;
- for(i=1;i<=5;i++)texte.item(i).firstChild.data="";
- sollbreite=150;
- tttelem.childNodes.item(0).data=txt;
- ges=tttelem.getComputedTextLength();
- tttelem.childNodes.item(0).data="";
- anz=Math.ceil(ges/sollbreite);
- tmp=txt.split(" ");
- txl=new Array(tmp.length);
- neu=new Array(anz);
- for(i=0;i<tmp.length;i++)
- {
- tttelem.childNodes.item(0).data=tmp[i];
- txl[i]=tttelem.getComputedTextLength();
- }
- k=0;
- maxbreite=0;
- for(i=0;i<anz;i++)
- {
- l=0,neu[i]="";
- while(l+txl[k]<1.1*sollbreite && k<tmp.length)
- {
- l+=txl[k];
- neu[i]+=tmp[k]+" ";
- k++;
- if(maxbreite<l)maxbreite=l;
- }
- }
- curtrans=svgroot.currentTranslate;
- ctx=curtrans.x;
- cty=curtrans.y;
- ttrelem.setAttribute("x",posx-ctx+10);
- ttrelem.setAttribute("y",posy-cty-20+10);
- ttrelem.setAttribute("width",maxbreite+2*(maxbreite-sollbreite)+40);
- ttrelem.setAttribute("height",anz*15+3);
- ttrelem.setAttribute("style","fill: #FFC; stroke: #000; stroke-width: 0.5px");
- for(i=1;i<=anz;i++)
- {
- texte.item(i).firstChild.data=neu[i-1];
- texte.item(i).setAttribute("x",posx-ctx+15);
- texte.item(i).setAttribute("y",parseInt(i-1)*15+posy-cty+3);
- texte.item(i).setAttribute("style","fill: #00C; font-size: 11px");
- }
- svgdoc.getElementById("tooltip").style.setProperty("visibility","visible");
- }
- function HideTooltip()
- {
- svgdoc.getElementById("tooltip").style.setProperty("visibility","hidden");
- }
- function ZoomControl()
- {
- var curzoom;
- curzoom=svgroot.currentScale;
- svgdoc.getElementById("tooltip").setAttribute("transform","scale("+1/curzoom+")");
- }
-
- </script></defs><g transform="translate(150,50) scale(0.5)"><text x="5" y="-40" text-anchor="left" font-weight="bolder" font-size="40" fill="maroon" text-decoration="underline">Contracts by week for year 2005</text><g transform="translate(-220, 80) rotate(270, 0, 0)"><text x="0" y="0" text-anchor="middle" font-weight="bolder" font-size="36" fill="black"></text></g><g transform="translate(1220, 80) rotate(90, 0, 0)"><text x="0" y="0" text-anchor="middle" font-weight="bolder" font-size="36" fill="black"></text></g><text x="1070" y="1000" font-size="36" font-weight="bolder" fill="black"></text><g style="stroke-width:5; stroke:black"><path d="M 0 1000 L 1000 1000 Z"/><path d="M 0 0 L 0 1000 Z"/></g><g style="stroke:red; stroke-width: 3; fill:black; stroke:none ;font-size:24; text-anchor:middle"/><g id="ylabel" transform="rotate(325, -10, 692.307692307692 )"><text x="-10" style="text-anchor: end" y="692.307692307692">20</text></g><line style="fill:none; stroke:#B0B0B0; stroke-width:2; stroke-dasharray:2 4" x1="1000" x2="0" y2="692.307692307692" y1="692.307692307692"/><g id="ylabel" transform="rotate(325, -10, 384.615384615385 )"><text x="-10" style="text-anchor: end" y="384.615384615385">40</text></g><line style="fill:none; stroke:#B0B0B0; stroke-width:2; stroke-dasharray:2 4" x1="1000" x2="0" y2="384.615384615385" y1="384.615384615385"/><g id="ylabel" transform="rotate(325, -10, 76.9230769230769 )"><text x="-10" style="text-anchor: end" y="76.9230769230769">60</text></g><line style="fill:none; stroke:#B0B0B0; stroke-width:2; stroke-dasharray:2 4" x1="1000" x2="0" y2="76.9230769230769" y1="76.9230769230769"/><g stylet="stroke:red; stroke-width: 3; fill : none;" style=" stroke:green;stroke-width: 3; fill : none; "><line x1="117.647058823529" y1="892.307692307692" x2="137.254901960784" y2="938.461538461538"/><line x1="137.254901960784" y1="938.461538461538" x2="156.862745098039" y2="184.615384615385"/><line x1="156.862745098039" y1="184.615384615385" x2="176.470588235294" y2="861.538461538462"/><line x1="176.470588235294" y1="861.538461538462" x2="196.078431372549" y2="923.076923076923"/><line x1="196.078431372549" y1="923.076923076923" x2="215.686274509804" y2="923.076923076923"/><line x1="215.686274509804" y1="923.076923076923" x2="235.294117647059" y2="876.923076923077"/><line x1="235.294117647059" y1="876.923076923077" x2="254.901960784314" y2="907.692307692308"/><line x1="254.901960784314" y1="907.692307692308" x2="274.509803921569" y2="938.461538461538"/><line x1="274.509803921569" y1="938.461538461538" x2="294.117647058824" y2="984.615384615385"/><line x1="294.117647058824" y1="984.615384615385" x2="313.725490196078" y2="876.923076923077"/><line x1="313.725490196078" y1="876.923076923077" x2="333.333333333333" y2="876.923076923077"/><line x1="333.333333333333" y1="876.923076923077" x2="352.941176470588" y2="876.923076923077"/><line x1="352.941176470588" y1="876.923076923077" x2="372.549019607843" y2="938.461538461538"/><line x1="372.549019607843" y1="938.461538461538" x2="392.156862745098" y2="784.615384615385"/><line x1="392.156862745098" y1="784.615384615385" x2="411.764705882353" y2="876.923076923077"/><line x1="411.764705882353" y1="876.923076923077" x2="431.372549019608" y2="923.076923076923"/><line x1="431.372549019608" y1="923.076923076923" x2="450.980392156863" y2="892.307692307692"/><line x1="450.980392156863" y1="892.307692307692" x2="470.588235294118" y2="938.461538461538"/><line x1="470.588235294118" y1="938.461538461538" x2="490.196078431373" y2="984.615384615385"/><line x1="490.196078431373" y1="984.615384615385" x2="509.803921568627" y2="923.076923076923"/><line x1="509.803921568627" y1="923.076923076923" x2="529.411764705882" y2="938.461538461538"/><line x1="529.411764705882" y1="938.461538461538" x2="568.627450980392" y2="984.615384615385"/><line x1="568.627450980392" y1="984.615384615385" x2="588.235294117647" y2="876.923076923077"/><line x1="588.235294117647" y1="876.923076923077" x2="607.843137254902" y2="892.307692307692"/><line x1="607.843137254902" y1="892.307692307692" x2="627.450980392157" y2="461.538461538462"/><line x1="627.450980392157" y1="461.538461538462" x2="647.058823529412" y2="707.692307692308"/><line x1="647.058823529412" y1="707.692307692308" x2="666.666666666667" y2="815.384615384615"/><line x1="666.666666666667" y1="815.384615384615" x2="686.274509803922" y2="923.076923076923"/><line x1="686.274509803922" y1="923.076923076923" x2="705.882352941176" y2="876.923076923077"/><line x1="705.882352941176" y1="876.923076923077" x2="725.490196078431" y2="953.846153846154"/><line x1="725.490196078431" y1="953.846153846154" x2="745.098039215686" y2="907.692307692308"/><line x1="745.098039215686" y1="907.692307692308" x2="764.705882352941" y2="876.923076923077"/><line x1="764.705882352941" y1="876.923076923077" x2="784.313725490196" y2="615.384615384615"/><line x1="784.313725490196" y1="615.384615384615" x2="803.921568627451" y2="784.615384615385"/><line x1="803.921568627451" y1="784.615384615385" x2="823.529411764706" y2="846.153846153846"/><line x1="823.529411764706" y1="846.153846153846" x2="843.137254901961" y2="861.538461538462"/><line x1="843.137254901961" y1="861.538461538462" x2="862.745098039216" y2="923.076923076923"/><line x1="862.745098039216" y1="923.076923076923" x2="882.352941176471" y2="830.769230769231"/><line x1="882.352941176471" y1="830.769230769231" x2="901.960784313726" y2="646.153846153846"/><line x1="901.960784313726" y1="646.153846153846" x2="921.56862745098" y2="630.769230769231"/><line x1="921.56862745098" y1="630.769230769231" x2="941.176470588235" y2="415.384615384615"/><line x1="941.176470588235" y1="415.384615384615" x2="960.78431372549" y2="246.153846153846"/><line x1="960.78431372549" y1="246.153846153846" x2="980.392156862745" y2="0"/><line x1="980.392156862745" y1="0" x2="1000" y2="876.923076923077"/></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="108.647058823529" y="883.307692307692"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="128.254901960784" y="929.461538461538"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="147.862745098039" y="175.615384615385"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="167.470588235294" y="852.538461538462"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="187.078431372549" y="914.076923076923"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="206.686274509804" y="914.076923076923"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="226.294117647059" y="867.923076923077"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="245.901960784314" y="898.692307692308"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="265.509803921569" y="929.461538461538"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="285.117647058824" y="975.615384615385"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="304.725490196078" y="867.923076923077"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="324.333333333333" y="867.923076923077"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="343.941176470588" y="867.923076923077"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="363.549019607843" y="929.461538461538"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="383.156862745098" y="775.615384615385"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="402.764705882353" y="867.923076923077"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="422.372549019608" y="914.076923076923"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="441.980392156863" y="883.307692307692"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="461.588235294118" y="929.461538461538"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="481.196078431373" y="975.615384615385"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="500.803921568627" y="914.076923076923"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="520.411764705882" y="929.461538461538"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="559.627450980392" y="975.615384615385"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="579.235294117647" y="867.923076923077"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="598.843137254902" y="883.307692307692"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="618.450980392157" y="452.538461538462"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="638.058823529412" y="698.692307692308"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="657.666666666667" y="806.384615384615"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="677.274509803922" y="914.076923076923"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="696.882352941176" y="867.923076923077"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="716.490196078431" y="944.846153846154"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="736.098039215686" y="898.692307692308"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="755.705882352941" y="867.923076923077"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="775.313725490196" y="606.384615384615"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="794.921568627451" y="775.615384615385"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="814.529411764706" y="837.153846153846"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="834.137254901961" y="852.538461538462"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="853.745098039216" y="914.076923076923"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="873.352941176471" y="821.769230769231"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="892.960784313726" y="637.153846153846"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="912.56862745098" y="621.769230769231"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="932.176470588235" y="406.384615384615"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="951.78431372549" y="237.153846153846"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="971.392156862745" y="-9"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="991" y="867.923076923077"/></g></g><g id="legend" style="fill:lavenderblush;stroke-width:2;stroke:black" transform="translate(1080,500)"><rect id="legend" x="0" y="0" rx="5" ry="5" width="200" height="49"/><text x="10" y="15" style="text-decoration:underline;stroke-width:1;stroke:black;fill:black">Legend:</text><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="6" y="18"/></g><text x="27" y="35" style="stroke-width:1;stroke:green;fill:green">Contracts</text></g></g><g id="tooltip" style="visibility: hidden"><rect id="ttr" x="0" y="0" rx="5" ry="5" width="100" height="16"/><text id="ttt" x="0" y="0" style="visibility: hidden">dyn. Text</text><text x="-10" y="-10">dyn. Text</text><text x="-10" y="-10">dyn. Text</text><text x="-10" y="-10">dyn. Text</text><text x="-10" y="-10">dyn. Text</text><text x="-10" y="-10">dyn. Text</text></g></svg>
Deleted: branches/xml-class-rework/projects/bos/statistics/contracts-by-week-2006.svg
===================================================================
--- branches/xml-class-rework/projects/bos/statistics/contracts-by-week-2006.svg 2006-10-14 06:59:35 UTC (rev 1985)
+++ branches/xml-class-rework/projects/bos/statistics/contracts-by-week-2006.svg 2006-10-14 07:00:17 UTC (rev 1986)
@@ -1,75 +0,0 @@
-<svg xmlns:xlink="http://www.w3.org/2000/xlink/namespace/" width="1200" height="1200" onload="getSVGDoc(evt)" onzoom="ZoomControl()"><defs><g id="star" transform="scale(0.21)"><polyline points="48,16,16,96,96,48,0,48,80,96"/></g><g id="triangle" transform="scale(0.7)"><path id="Triangle" d="M 0 25 L 10 15 L 20 25 z" style="stroke:none"/></g><g id="square" transform="scale(1)"><rect width="18" height="18"/></g><g id="rectangle" transform="scale(1)"><rect width="7" height="22"/></g><script type="text/javascript">
-
- /* this code was largely reused from the excellent website SVG - Learning by Coding (http://svglbc.datenverdrahten.de/) */
- var svgdoc,svgroot;
- function getSVGDoc(load_evt)
- {
- svgdoc=load_evt.target.ownerDocument;
- svgroot=svgdoc.documentElement;
-
- texte=svgdoc.getElementById("tooltip").getElementsByTagName("text");
- }
- function ShowTooltip(mousemove_event,txt)
- {
- var ttrelem,tttelem,posx,posy,curtrans,ctx,cty,txt;
- var sollbreite,maxbreite,ges,anz,tmp,txl,neu,i,k,l
- ttrelem=svgdoc.getElementById("ttr");
- tttelem=svgdoc.getElementById("ttt");
- posx=mousemove_event.clientX;
- posy=mousemove_event.clientY;
- for(i=1;i<=5;i++)texte.item(i).firstChild.data="";
- sollbreite=150;
- tttelem.childNodes.item(0).data=txt;
- ges=tttelem.getComputedTextLength();
- tttelem.childNodes.item(0).data="";
- anz=Math.ceil(ges/sollbreite);
- tmp=txt.split(" ");
- txl=new Array(tmp.length);
- neu=new Array(anz);
- for(i=0;i<tmp.length;i++)
- {
- tttelem.childNodes.item(0).data=tmp[i];
- txl[i]=tttelem.getComputedTextLength();
- }
- k=0;
- maxbreite=0;
- for(i=0;i<anz;i++)
- {
- l=0,neu[i]="";
- while(l+txl[k]<1.1*sollbreite && k<tmp.length)
- {
- l+=txl[k];
- neu[i]+=tmp[k]+" ";
- k++;
- if(maxbreite<l)maxbreite=l;
- }
- }
- curtrans=svgroot.currentTranslate;
- ctx=curtrans.x;
- cty=curtrans.y;
- ttrelem.setAttribute("x",posx-ctx+10);
- ttrelem.setAttribute("y",posy-cty-20+10);
- ttrelem.setAttribute("width",maxbreite+2*(maxbreite-sollbreite)+40);
- ttrelem.setAttribute("height",anz*15+3);
- ttrelem.setAttribute("style","fill: #FFC; stroke: #000; stroke-width: 0.5px");
- for(i=1;i<=anz;i++)
- {
- texte.item(i).firstChild.data=neu[i-1];
- texte.item(i).setAttribute("x",posx-ctx+15);
- texte.item(i).setAttribute("y",parseInt(i-1)*15+posy-cty+3);
- texte.item(i).setAttribute("style","fill: #00C; font-size: 11px");
- }
- svgdoc.getElementById("tooltip").style.setProperty("visibility","visible");
- }
- function HideTooltip()
- {
- svgdoc.getElementById("tooltip").style.setProperty("visibility","hidden");
- }
- function ZoomControl()
- {
- var curzoom;
- curzoom=svgroot.currentScale;
- svgdoc.getElementById("tooltip").setAttribute("transform","scale("+1/curzoom+")");
- }
-
- </script></defs><g transform="translate(150,50) scale(0.5)"><text x="5" y="-40" text-anchor="left" font-weight="bolder" font-size="40" fill="maroon" text-decoration="underline">Contracts by week for year 2006</text><g transform="translate(-220, 80) rotate(270, 0, 0)"><text x="0" y="0" text-anchor="middle" font-weight="bolder" font-size="36" fill="black"></text></g><g transform="translate(1220, 80) rotate(90, 0, 0)"><text x="0" y="0" text-anchor="middle" font-weight="bolder" font-size="36" fill="black"></text></g><text x="1070" y="1000" font-size="36" font-weight="bolder" fill="black"></text><g style="stroke-width:5; stroke:black"><path d="M 0 1000 L 1000 1000 Z"/><path d="M 0 0 L 0 1000 Z"/></g><g style="stroke:red; stroke-width: 3; fill:black; stroke:none ;font-size:24; text-anchor:middle"/><g id="ylabel" transform="rotate(325, -10, 696.969696969697 )"><text x="-10" style="text-anchor: end" y="696.969696969697">20</text></g><line style="fill:none; stroke:#B0B0B0; stroke-width:2; stroke-dasharray:2 4" x1="1000" x2="0" y2="696.969696969697" y1="696.969696969697"/><g id="ylabel" transform="rotate(325, -10, 393.939393939394 )"><text x="-10" style="text-anchor: end" y="393.939393939394">40</text></g><line style="fill:none; stroke:#B0B0B0; stroke-width:2; stroke-dasharray:2 4" x1="1000" x2="0" y2="393.939393939394" y1="393.939393939394"/><g id="ylabel" transform="rotate(325, -10, 90.909090909091 )"><text x="-10" style="text-anchor: end" y="90.909090909091">60</text></g><line style="fill:none; stroke:#B0B0B0; stroke-width:2; stroke-dasharray:2 4" x1="1000" x2="0" y2="90.909090909091" y1="90.909090909091"/><g stylet="stroke:red; stroke-width: 3; fill : none;" style=" stroke:green;stroke-width: 3; fill : none; "><line x1="0" y1="787.878787878788" x2="19.6078431372549" y2="712.121212121212"/><line x1="19.6078431372549" y1="712.121212121212" x2="39.2156862745098" y2="60.6060606060605"/><line x1="39.2156862745098" y1="60.6060606060605" x2="58.8235294117647" y2="712.121212121212"/><line x1="58.8235294117647" y1="712.121212121212" x2="78.4313725490196" y2="848.484848484848"/><line x1="78.4313725490196" y1="848.484848484848" x2="98.0392156862745" y2="939.393939393939"/><line x1="98.0392156862745" y1="939.393939393939" x2="117.647058823529" y2="954.545454545455"/><line x1="117.647058823529" y1="954.545454545455" x2="137.254901960784" y2="939.393939393939"/><line x1="137.254901960784" y1="939.393939393939" x2="156.862745098039" y2="863.636363636364"/><line x1="156.862745098039" y1="863.636363636364" x2="176.470588235294" y2="696.969696969697"/><line x1="176.470588235294" y1="696.969696969697" x2="196.078431372549" y2="560.606060606061"/><line x1="196.078431372549" y1="560.606060606061" x2="215.686274509804" y2="787.878787878788"/><line x1="215.686274509804" y1="787.878787878788" x2="235.294117647059" y2="803.030303030303"/><line x1="235.294117647059" y1="803.030303030303" x2="254.901960784314" y2="742.424242424242"/><line x1="254.901960784314" y1="742.424242424242" x2="274.509803921569" y2="772.727272727273"/><line x1="274.509803921569" y1="772.727272727273" x2="294.117647058824" y2="954.545454545455"/><line x1="294.117647058824" y1="954.545454545455" x2="313.725490196078" y2="878.787878787879"/><line x1="313.725490196078" y1="878.787878787879" x2="333.333333333333" y2="893.939393939394"/><line x1="333.333333333333" y1="893.939393939394" x2="352.941176470588" y2="848.484848484848"/><line x1="352.941176470588" y1="848.484848484848" x2="372.549019607843" y2="772.727272727273"/><line x1="372.549019607843" y1="772.727272727273" x2="392.156862745098" y2="863.636363636364"/><line x1="392.156862745098" y1="863.636363636364" x2="411.764705882353" y2="575.757575757576"/><line x1="411.764705882353" y1="575.757575757576" x2="431.372549019608" y2="818.181818181818"/><line x1="431.372549019608" y1="818.181818181818" x2="450.980392156863" y2="878.787878787879"/><line x1="450.980392156863" y1="878.787878787879" x2="470.588235294118" y2="712.121212121212"/><line x1="470.588235294118" y1="712.121212121212" x2="490.196078431373" y2="772.727272727273"/><line x1="490.196078431373" y1="772.727272727273" x2="509.803921568627" y2="439.393939393939"/><line x1="509.803921568627" y1="439.393939393939" x2="529.411764705882" y2="757.575757575758"/><line x1="529.411764705882" y1="757.575757575758" x2="549.019607843137" y2="833.333333333333"/><line x1="549.019607843137" y1="833.333333333333" x2="568.627450980392" y2="909.090909090909"/><line x1="568.627450980392" y1="909.090909090909" x2="588.235294117647" y2="833.333333333333"/><line x1="588.235294117647" y1="833.333333333333" x2="607.843137254902" y2="818.181818181818"/><line x1="607.843137254902" y1="818.181818181818" x2="627.450980392157" y2="893.939393939394"/><line x1="627.450980392157" y1="893.939393939394" x2="647.058823529412" y2="848.484848484848"/><line x1="647.058823529412" y1="848.484848484848" x2="666.666666666667" y2="0"/><line x1="666.666666666667" y1="0" x2="686.274509803922" y2="878.787878787879"/><line x1="686.274509803922" y1="878.787878787879" x2="705.882352941176" y2="515.151515151515"/><line x1="705.882352941176" y1="515.151515151515" x2="725.490196078431" y2="803.030303030303"/><line x1="725.490196078431" y1="803.030303030303" x2="745.098039215686" y2="772.727272727273"/><line x1="745.098039215686" y1="772.727272727273" x2="764.705882352941" y2="757.575757575758"/><line x1="764.705882352941" y1="757.575757575758" x2="784.313725490196" y2="969.69696969697"/></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="-9" y="778.878787878788"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="10.6078431372549" y="703.121212121212"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="30.2156862745098" y="51.6060606060605"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="49.8235294117647" y="703.121212121212"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="69.4313725490196" y="839.484848484848"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="89.0392156862745" y="930.393939393939"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="108.647058823529" y="945.545454545455"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="128.254901960784" y="930.393939393939"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="147.862745098039" y="854.636363636364"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="167.470588235294" y="687.969696969697"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="187.078431372549" y="551.606060606061"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="206.686274509804" y="778.878787878788"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="226.294117647059" y="794.030303030303"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="245.901960784314" y="733.424242424242"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="265.509803921569" y="763.727272727273"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="285.117647058824" y="945.545454545455"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="304.725490196078" y="869.787878787879"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="324.333333333333" y="884.939393939394"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="343.941176470588" y="839.484848484848"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="363.549019607843" y="763.727272727273"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="383.156862745098" y="854.636363636364"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="402.764705882353" y="566.757575757576"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="422.372549019608" y="809.181818181818"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="441.980392156863" y="869.787878787879"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="461.588235294118" y="703.121212121212"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="481.196078431373" y="763.727272727273"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="500.803921568627" y="430.393939393939"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="520.411764705882" y="748.575757575758"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="540.019607843137" y="824.333333333333"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="559.627450980392" y="900.090909090909"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="579.235294117647" y="824.333333333333"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="598.843137254902" y="809.181818181818"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="618.450980392157" y="884.939393939394"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="638.058823529412" y="839.484848484848"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="657.666666666667" y="-9"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="677.274509803922" y="869.787878787879"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="696.882352941176" y="506.151515151515"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="716.490196078431" y="794.030303030303"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="736.098039215686" y="763.727272727273"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="755.705882352941" y="748.575757575758"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="775.313725490196" y="960.69696969697"/></g></g><g id="legend" style="fill:lavenderblush;stroke-width:2;stroke:black" transform="translate(1080,500)"><rect id="legend" x="0" y="0" rx="5" ry="5" width="200" height="49"/><text x="10" y="15" style="text-decoration:underline;stroke-width:1;stroke:black;fill:black">Legend:</text><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="6" y="18"/></g><text x="27" y="35" style="stroke-width:1;stroke:green;fill:green">Contracts</text></g></g><g id="tooltip" style="visibility: hidden"><rect id="ttr" x="0" y="0" rx="5" ry="5" width="100" height="16"/><text id="ttt" x="0" y="0" style="visibility: hidden">dyn. Text</text><text x="-10" y="-10">dyn. Text</text><text x="-10" y="-10">dyn. Text</text><text x="-10" y="-10">dyn. Text</text><text x="-10" y="-10">dyn. Text</text><text x="-10" y="-10">dyn. Text</text></g></svg>
Deleted: branches/xml-class-rework/projects/bos/statistics/contracts-by-week.xml
===================================================================
--- branches/xml-class-rework/projects/bos/statistics/contracts-by-week.xml 2006-10-14 06:59:35 UTC (rev 1985)
+++ branches/xml-class-rework/projects/bos/statistics/contracts-by-week.xml 2006-10-14 07:00:17 UTC (rev 1986)
@@ -1,2 +0,0 @@
-<?xml version="1.0"?>
-<graphData xmlns:loop="http://informatik.hu-berlin.de/loop"><sets><set title="Contracts" marker-type="triangle" color="green"><measure><xvalue>1</xvalue><yvalue>14</yvalue></measure><measure><xvalue>2</xvalue><yvalue>19</yvalue></measure><measure><xvalue>3</xvalue><yvalue>62</yvalue></measure><measure><xvalue>4</xvalue><yvalue>19</yvalue></measure><measure><xvalue>5</xvalue><yvalue>10</yvalue></measure><measure><xvalue>6</xvalue><yvalue>4</yvalue></measure><measure><xvalue>7</xvalue><yvalue>3</yvalue></measure><measure><xvalue>8</xvalue><yvalue>4</yvalue></measure><measure><xvalue>9</xvalue><yvalue>9</yvalue></measure><measure><xvalue>10</xvalue><yvalue>20</yvalue></measure><measure><xvalue>11</xvalue><yvalue>29</yvalue></measure><measure><xvalue>12</xvalue><yvalue>14</yvalue></measure><measure><xvalue>13</xvalue><yvalue>13</yvalue></measure><measure><xvalue>14</xvalue><yvalue>17</yvalue></measure><measure><xvalue>15</xvalue><yvalue>15</yvalue></measure><measure><xvalue>16</xvalue><yvalue>3</yvalue></measure><measure><xvalue>17</xvalue><yvalue>8</yvalue></measure><measure><xvalue>18</xvalue><yvalue>7</yvalue></measure><measure><xvalue>19</xvalue><yvalue>10</yvalue></measure><measure><xvalue>20</xvalue><yvalue>15</yvalue></measure><measure><xvalue>21</xvalue><yvalue>9</yvalue></measure><measure><xvalue>22</xvalue><yvalue>28</yvalue></measure><measure><xvalue>23</xvalue><yvalue>12</yvalue></measure><measure><xvalue>24</xvalue><yvalue>8</yvalue></measure><measure><xvalue>25</xvalue><yvalue>19</yvalue></measure><measure><xvalue>26</xvalue><yvalue>15</yvalue></measure><measure><xvalue>27</xvalue><yvalue>37</yvalue></measure><measure><xvalue>28</xvalue><yvalue>16</yvalue></measure><measure><xvalue>29</xvalue><yvalue>11</yvalue></measure><measure><xvalue>30</xvalue><yvalue>6</yvalue></measure><measure><xvalue>31</xvalue><yvalue>11</yvalue></measure><measure><xvalue>32</xvalue><yvalue>12</yvalue></measure><measure><xvalue>33</xvalue><yvalue>7</yvalue></measure><measure><xvalue>34</xvalue><yvalue>10</yvalue></measure><measure><xvalue>35</xvalue><yvalue>66</yvalue></measure><measure><xvalue>36</xvalue><yvalue>8</yvalue></measure><measure><xvalue>37</xvalue><yvalue>32</yvalue></measure><measure><xvalue>38</xvalue><yvalue>13</yvalue></measure><measure><xvalue>39</xvalue><yvalue>15</yvalue></measure><measure><xvalue>40</xvalue><yvalue>16</yvalue></measure><measure><xvalue>41</xvalue><yvalue>2</yvalue></measure></set></sets><minx>1</minx><maxx>52</maxx><miny>0</miny><maxy>66</maxy><title>Contracts by week for year 2006</title><yvalues><yvalue><value>20</value><label>20</label><gridline>true</gridline></yvalue><yvalue><value>40</value><label>40</label><gridline>true</gridline></yvalue><yvalue><value>60</value><label>60</label><gridline>true</gridline></yvalue></yvalues></graphData>
1
0

[bknr-cvs] r1985 - in branches/xml-class-rework/projects/bos: . statistics
by bknr@bknr.net 14 Oct '06
by bknr@bknr.net 14 Oct '06
14 Oct '06
Author: hhubner
Date: 2006-10-14 02:59:35 -0400 (Sat, 14 Oct 2006)
New Revision: 1985
Added:
branches/xml-class-rework/projects/bos/statistics/
branches/xml-class-rework/projects/bos/statistics/Makefile
branches/xml-class-rework/projects/bos/statistics/buildSVGLineChart.xsl
branches/xml-class-rework/projects/bos/statistics/contracts-by-week-2005.svg
branches/xml-class-rework/projects/bos/statistics/contracts-by-week-2006.svg
branches/xml-class-rework/projects/bos/statistics/contracts-by-week.lxsl
branches/xml-class-rework/projects/bos/statistics/contracts-by-week.xml
branches/xml-class-rework/projects/bos/statistics/contracts-by-week.xsl
branches/xml-class-rework/projects/bos/statistics/loop-compiler.xslt
Log:
Generate SVG charts from statistical data.
Added: branches/xml-class-rework/projects/bos/statistics/Makefile
===================================================================
--- branches/xml-class-rework/projects/bos/statistics/Makefile 2006-09-24 19:13:31 UTC (rev 1984)
+++ branches/xml-class-rework/projects/bos/statistics/Makefile 2006-10-14 06:59:35 UTC (rev 1985)
@@ -0,0 +1,21 @@
+
+BASE_URL = http://192.168.254.132:8080/reports-xml
+YEAR = 2005
+LOGIN = ?__username=hans&__password=ognep
+
+GRAPHICS = contracts-by-week.svg
+
+all:
+ $(MAKE) graphics YEAR=2005
+ $(MAKE) graphics YEAR=2006
+
+graphics: $(GRAPHICS)
+
+.SUFFIXES: .lxsl .xsl .svg
+
+.lxsl.xsl:
+ xsltproc -o $@ loop-compiler.xslt $*.lxsl
+
+.xsl.svg:
+ xsltproc -o $*.xml $*.xsl '$(BASE_URL)/$*/$(YEAR)$(LOGIN)'
+ xsltproc -o $*-$(YEAR).svg buildSVGLineChart.xsl $*.xml
\ No newline at end of file
Property changes on: branches/xml-class-rework/projects/bos/statistics/Makefile
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:eol-style
+ native
Added: branches/xml-class-rework/projects/bos/statistics/buildSVGLineChart.xsl
===================================================================
--- branches/xml-class-rework/projects/bos/statistics/buildSVGLineChart.xsl 2006-09-24 19:13:31 UTC (rev 1984)
+++ branches/xml-class-rework/projects/bos/statistics/buildSVGLineChart.xsl 2006-10-14 06:59:35 UTC (rev 1985)
@@ -0,0 +1,827 @@
+<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+ xmlns:xlink="http://www.w3.org/2000/xlink/namespace/"
+ version="1.0">
+ <xsl:output omit-xml-declaration="yes"/>
+ <xsl:template match="/graphData">
+ <xsl:variable name="max">
+ <xsl:value-of select="maxy"/>
+ </xsl:variable>
+ <xsl:variable name="min">
+ <xsl:value-of select="miny"/>
+ </xsl:variable>
+ <xsl:variable name="maxy2">
+ <xsl:value-of select="maxy2"/>
+ </xsl:variable>
+ <xsl:variable name="miny2">
+ <xsl:value-of select="miny2"/>
+ </xsl:variable>
+ <xsl:variable name="maxx">
+ <xsl:value-of select="maxx"/>
+ </xsl:variable>
+ <xsl:variable name="minx">
+ <xsl:value-of select="minx"/>
+ </xsl:variable>
+ <svg width="1200" height="1200" onload="getSVGDoc(evt)" onzoom="ZoomControl()">
+ <defs>
+ <g id="star" transform="scale(0.21)">
+ <polyline points="48,16,16,96,96,48,0,48,80,96">
+ </polyline>
+ </g>
+ <g id="triangle" transform="scale(0.7)">
+ <path id="Triangle" d="M 0 25 L 10 15 L 20 25 z" style="stroke:none"/>
+ </g>
+ <g id="square" transform="scale(1)">
+ <rect width="18" height="18">
+ </rect>
+ </g>
+ <g id="rectangle" transform="scale(1)">
+ <rect width="7" height="22">
+ </rect>
+ </g>
+ <script type="text/javascript">
+ <![CDATA[
+ /* this code was largely reused from the excellent website SVG - Learning by Coding (http://svglbc.datenverdrahten.de/) */
+ var svgdoc,svgroot;
+ function getSVGDoc(load_evt)
+ {
+ svgdoc=load_evt.target.ownerDocument;
+ svgroot=svgdoc.documentElement;
+
+ texte=svgdoc.getElementById("tooltip").getElementsByTagName("text");
+ }
+ function ShowTooltip(mousemove_event,txt)
+ {
+ var ttrelem,tttelem,posx,posy,curtrans,ctx,cty,txt;
+ var sollbreite,maxbreite,ges,anz,tmp,txl,neu,i,k,l
+ ttrelem=svgdoc.getElementById("ttr");
+ tttelem=svgdoc.getElementById("ttt");
+ posx=mousemove_event.clientX;
+ posy=mousemove_event.clientY;
+ for(i=1;i<=5;i++)texte.item(i).firstChild.data="";
+ sollbreite=150;
+ tttelem.childNodes.item(0).data=txt;
+ ges=tttelem.getComputedTextLength();
+ tttelem.childNodes.item(0).data="";
+ anz=Math.ceil(ges/sollbreite);
+ tmp=txt.split(" ");
+ txl=new Array(tmp.length);
+ neu=new Array(anz);
+ for(i=0;i<tmp.length;i++)
+ {
+ tttelem.childNodes.item(0).data=tmp[i];
+ txl[i]=tttelem.getComputedTextLength();
+ }
+ k=0;
+ maxbreite=0;
+ for(i=0;i<anz;i++)
+ {
+ l=0,neu[i]="";
+ while(l+txl[k]<1.1*sollbreite && k<tmp.length)
+ {
+ l+=txl[k];
+ neu[i]+=tmp[k]+" ";
+ k++;
+ if(maxbreite<l)maxbreite=l;
+ }
+ }
+ curtrans=svgroot.currentTranslate;
+ ctx=curtrans.x;
+ cty=curtrans.y;
+ ttrelem.setAttribute("x",posx-ctx+10);
+ ttrelem.setAttribute("y",posy-cty-20+10);
+ ttrelem.setAttribute("width",maxbreite+2*(maxbreite-sollbreite)+40);
+ ttrelem.setAttribute("height",anz*15+3);
+ ttrelem.setAttribute("style","fill: #FFC; stroke: #000; stroke-width: 0.5px");
+ for(i=1;i<=anz;i++)
+ {
+ texte.item(i).firstChild.data=neu[i-1];
+ texte.item(i).setAttribute("x",posx-ctx+15);
+ texte.item(i).setAttribute("y",parseInt(i-1)*15+posy-cty+3);
+ texte.item(i).setAttribute("style","fill: #00C; font-size: 11px");
+ }
+ svgdoc.getElementById("tooltip").style.setProperty("visibility","visible");
+ }
+ function HideTooltip()
+ {
+ svgdoc.getElementById("tooltip").style.setProperty("visibility","hidden");
+ }
+ function ZoomControl()
+ {
+ var curzoom;
+ curzoom=svgroot.currentScale;
+ svgdoc.getElementById("tooltip").setAttribute("transform","scale("+1/curzoom+")");
+ }
+ ]]>
+ </script>
+ </defs>
+ <g transform="translate(150,50) scale(0.5)">
+ <!--Heading-->
+ <text x="5" y="-40" text-anchor="left" font-weight="bolder"
+ font-size="40" fill="maroon" text-decoration="underline">
+ <xsl:value-of select="title"/>
+ </text>
+ <!--Caption (Vertical)-->
+ <g transform="translate(-220, 80) rotate(270, 0, 0)">
+ <text x="0" y="0" text-anchor="middle" font-weight="bolder"
+ font-size="36" fill="black">
+ <xsl:value-of select="ytitle"/>
+ </text>
+ </g>
+ <g transform="translate(1220, 80) rotate(90, 0, 0)">
+ <text x="0" y="0" text-anchor="middle" font-weight="bolder"
+ font-size="36" fill="black">
+ <xsl:value-of select="y2title"/>
+ </text>
+ </g>
+ <!--Caption (Horizontal)-->
+ <text x="1070" y="1000" font-size="36" font-weight="bolder" fill="black">
+ <xsl:value-of select="xtitle"/>
+ </text>
+ <!-- Now Draw the main X and Y axis -->
+ <g style="stroke-width:5; stroke:black">
+ <!-- X Axis -->
+ <path d="M 0 1000 L 1000 1000 Z"/>
+ <!-- Y Axis -->
+ <path d="M 0 0 L 0 1000 Z"/>
+ <xsl:if test="y2axis='true'">
+ <!-- Y2 Axis -->
+ <path d="M 1000 0 L 1000 1000 Z"/>
+ </xsl:if>
+ </g>
+ <xsl:for-each select="sets/set">
+ <!-- display the x-axis labels -->
+ <g style="stroke:red; stroke-width: 3; fill:black; stroke:none ;font-size:24; text-anchor:middle">
+ <xsl:for-each select="measure[xlabel]">
+ <!-- for all measures with an xlabel -->
+ <xsl:call-template name="xlabel">
+ <xsl:with-param name="xvalue" select="xvalue"/>
+ <xsl:with-param name="xlabel" select="xlabel"/>
+ <xsl:with-param name="minx" select="$minx"/>
+ <xsl:with-param name="maxx" select="$maxx"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ <xsl:for-each select="../../xvalues/xvalue">
+ <!-- for all (explicit) xvalues -->
+ <xsl:call-template name="xlabel">
+ <xsl:with-param name="xvalue" select="value"/>
+ <xsl:with-param name="xlabel" select="label"/>
+ <xsl:with-param name="minx" select="$minx"/>
+ <xsl:with-param name="maxx" select="$maxx"/>
+ <xsl:with-param name="gridline" select="gridline"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ </g>
+ <xsl:for-each select="../../xvalues/xmarkers">
+ <!-- draw y-markers on the vertical axis -->
+ <xsl:call-template name="xmarker">
+ <xsl:with-param name="start" select="minvalue"/>
+ <xsl:with-param name="n" select="steps"/>
+ <xsl:with-param name="stepsize"
+ select="(maxvalue - minvalue) div steps"/>
+ <xsl:with-param name="min" select="$minx"/>
+ <xsl:with-param name="max" select="$maxx"/>
+ <xsl:with-param name="gridline" select="gridline"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ <!-- end of x-axis markers, labels and vertical grid-lines -->
+ <!-- create the y-axis markers -->
+ <xsl:for-each select="measure[ylabel]">
+ <!-- for all measures with an ylabel -->
+ <xsl:call-template name="ylabel">
+ <xsl:with-param name="yvalue" select="yvalue"/>
+ <xsl:with-param name="ylabel" select="ylabel"/>
+ <xsl:with-param name="min" select="$min"/>
+ <xsl:with-param name="max" select="$max"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ <xsl:for-each select="../../yvalues/yvalue">
+ <!-- for all (explicit) yvalues -->
+ <xsl:call-template name="ylabel">
+ <xsl:with-param name="yvalue" select="value"/>
+ <xsl:with-param name="ylabel" select="label"/>
+ <xsl:with-param name="min" select="$min"/>
+ <xsl:with-param name="max" select="$max"/>
+ <xsl:with-param name="gridline" select="gridline"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ <xsl:for-each select="../../yvalues/ymarkers">
+ <!-- draw y-markers on the vertical axis -->
+ <xsl:call-template name="ymarker">
+ <xsl:with-param name="start" select="minvalue"/>
+ <xsl:with-param name="n" select="steps"/>
+ <xsl:with-param name="stepsize"
+ select="(maxvalue - minvalue) div steps"/>
+ <xsl:with-param name="min" select="$min"/>
+ <xsl:with-param name="max" select="$max"/>
+ <xsl:with-param name="gridline" select="gridline"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ <!-- end of y-axis markers, labels and horizontal grid-lines -->
+ <!-- create the y2-axis markers -->
+ <xsl:for-each select="measure[y2label]">
+ <!-- for all measures with an ylabel -->
+ <xsl:call-template name="ylabel">
+ <xsl:with-param name="yvalue" select="y2value"/>
+ <xsl:with-param name="ylabel" select="y2label"/>
+ <xsl:with-param name="min" select="$miny2"/>
+ <xsl:with-param name="max" select="$maxy2"/>
+ <xsl:with-param name="axis" select="2"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ <xsl:for-each select="../../y2values/y2value">
+ <!-- for all (explicit) yvalues -->
+ <xsl:call-template name="ylabel">
+ <xsl:with-param name="yvalue" select="value"/>
+ <xsl:with-param name="ylabel" select="label"/>
+ <xsl:with-param name="min" select="$miny2"/>
+ <xsl:with-param name="max" select="$maxy2"/>
+ <xsl:with-param name="gridline" select="gridline"/>
+ <xsl:with-param name="axis" select="2"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ <xsl:for-each select="../../y2values/y2markers">
+ <!-- draw y-markers on the vertical axis -->
+ <xsl:call-template name="ymarker">
+ <xsl:with-param name="start" select="minvalue"/>
+ <xsl:with-param name="n" select="steps"/>
+ <xsl:with-param name="stepsize"
+ select="(maxvalue - minvalue) div steps"/>
+ <xsl:with-param name="min" select="$miny2"/>
+ <xsl:with-param name="max" select="$maxy2"/>
+ <xsl:with-param name="gridline" select="gridline"/>
+ <xsl:with-param name="axis" select="2"/>
+ </xsl:call-template>
+ </xsl:for-each>
+ <!-- end of y2-axis markers, labels and horizontal grid-lines -->
+
+ <!-- go and draw the line of the chart itself -->
+ <g stylet="stroke:red; stroke-width: 3; fill : none;">
+ <xsl:attribute name="style">
+ stroke:<xsl:value-of select="@color"/>;stroke-width: 3; fill : none;
+ </xsl:attribute>
+ <!-- instead of a polyline, make a line from the previous to each new point -->
+ <xsl:for-each select="measure">
+ <xsl:variable name="x">
+ <xsl:value-of select=" 1000* ((xvalue - ($minx)) div ($maxx - $minx))"/>
+ </xsl:variable>
+ <xsl:variable name="y">
+ <xsl:choose>
+ <xsl:when test="yvalue">
+ <xsl:value-of select="1000 - 1000* ((yvalue - ($min)) div ($max - $min))"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="1000 - 1000* ((y2value - ($miny2)) div ($maxy2 - $miny2))"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:if test="not(../@showline='false')">
+ <xsl:if test="(position() > 1)">
+ <line>
+ <xsl:attribute name="x1">
+ <xsl:value-of select=" 1000* ((preceding-sibling::measure[position()=1]/xvalue - ($minx)) div ($maxx - $minx))"/>
+ </xsl:attribute>
+ <xsl:attribute name="y1">
+ <xsl:choose>
+ <xsl:when test="yvalue">
+ <xsl:value-of select="1000 - 1000* ((preceding-sibling::measure[position()=1]/yvalue - ($min)) div ($max - $min))"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="1000 - 1000* ((preceding-sibling::measure[position()=1]/y2value - ($miny2)) div ($maxy2 - $miny2))"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:attribute name="x2">
+ <xsl:value-of select="$x"/>
+ </xsl:attribute>
+ <xsl:attribute name="y2">
+ <xsl:value-of select="$y"/>
+ </xsl:attribute>
+ </line>
+ </xsl:if>
+ </xsl:if>
+ <xsl:if test="xgrid = 'true'">
+ <xsl:call-template name="gridline">
+ <xsl:with-param name="x1" select="$x"/>
+ <xsl:with-param name="y1" select="$y"/>
+ <xsl:with-param name="type">vertical</xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="ygrid = 'true'">
+ <xsl:call-template name="gridline">
+ <xsl:with-param name="x1" select="$x"/>
+ <xsl:with-param name="y1" select="$y"/>
+ <xsl:with-param name="type">horizontal</xsl:with-param>
+ <xsl:with-param name="yaxis">
+ <xsl:choose>
+ <xsl:when test="yvalue">1</xsl:when>
+ <xsl:otherwise>2</xsl:otherwise>
+ </xsl:choose>
+ </xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:for-each> <!-- measure -->
+ </g>
+ </xsl:for-each> <!-- sets -->
+ <!-- now again traverse all measures to place markers and create annotations;
+ by doing this in a second go, we ensure (according to the 'painters algoritm'
+ (see: http://wiki.svg.org/index.php/ChangingDrawingOrder)) that the annotations
+ and markers are on top of everything else.
+ -->
+ <xsl:for-each select="sets/set">
+ <xsl:for-each select="measure">
+ <xsl:variable name="x">
+ <xsl:value-of select=" 1000* ((xvalue - ($minx)) div ($maxx - $minx))"/>
+ </xsl:variable>
+ <xsl:variable name="y">
+ <xsl:choose>
+ <xsl:when test="yvalue">
+ <xsl:value-of select="1000 - 1000* ((yvalue - ($min)) div ($max - $min))"/>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:value-of select="1000 - 1000* ((y2value - ($miny2)) div ($maxy2 - $miny2))"/>
+ </xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <g >
+ <xsl:attribute name="style">stroke:<xsl:value-of select="../@color"/> stroke-width: 3; fill : none;</xsl:attribute>
+ <!-- draw a marker -->
+ <xsl:call-template name="marker">
+ <xsl:with-param name="x" select="$x"/>
+ <xsl:with-param name="y" select="$y"/>
+ <xsl:with-param name="label" select="label"/>
+ <xsl:with-param name="marker" select="../@marker-type"/>
+ <xsl:with-param name="color" select="../@color"/>
+ </xsl:call-template>
+ <xsl:if test="annotation">
+ <!-- currently the annotation is written before the line ; that means that the line will cover the annotation -->
+ <xsl:call-template name="annotation">
+ <xsl:with-param name="x" select="$x"/>
+ <xsl:with-param name="y" select="$y"/>
+ <xsl:with-param name="annotation" select="annotation"/>
+ </xsl:call-template>
+ </xsl:if>
+ </g>
+ </xsl:for-each> <!-- measures in set -->
+ </xsl:for-each> <!-- sets -->
+ <!-- legend per set -->
+ <g id="legend" style="fill:lavenderblush;stroke-width:2;stroke:black" transform="translate(1080,500)">
+ <!-- Tooltip - Beginn (ttr=Tooltip-Rechteck, ttt=Tooltip-Text) -->
+ <rect id="legend" x="0" y="0" rx="5" ry="5" width="200" >
+ <xsl:attribute name="height"><xsl:value-of select="29+ 20* count(sets/set)"/></xsl:attribute>
+ </rect>
+ <text x="10" y="15" style="text-decoration:underline;stroke-width:1;stroke:black;fill:black">Legend:</text>
+ <xsl:for-each select="sets/set">
+ <xsl:call-template name="marker">
+ <xsl:with-param name="x">15</xsl:with-param>
+ <xsl:with-param name="y" select="7+20*(position())"/>
+ <xsl:with-param name="label" select="title"/>
+ <xsl:with-param name="marker" select="@marker-type"/>
+ <xsl:with-param name="color" select="@color"/>
+ </xsl:call-template>
+ <text x="27">
+ <xsl:attribute name="y"><xsl:value-of select="15+20*(position())"/></xsl:attribute>
+ <xsl:attribute name="style">stroke-width:1;stroke:<xsl:value-of select="@color" />;fill:<xsl:value-of select="@color" /></xsl:attribute>
+ <xsl:value-of select="@title"/>
+ </text>
+ </xsl:for-each>
+ </g>
+
+ </g>
+ <g id="tooltip" style="visibility: hidden">
+ <!-- Tooltip - Beginn (ttr=Tooltip-Rechteck, ttt=Tooltip-Text) -->
+ <rect id="ttr" x="0" y="0" rx="5" ry="5" width="100" height="16"/>
+ <text id="ttt" x="0" y="0" style="visibility: hidden">dyn. Text</text>
+ <text x="-10" y="-10">dyn. Text</text>
+ <text x="-10" y="-10">dyn. Text</text>
+ <text x="-10" y="-10">dyn. Text</text>
+ <text x="-10" y="-10">dyn. Text</text>
+ <text x="-10" y="-10">dyn. Text</text>
+ </g>
+ <!-- Tooltip - Ende -->
+ </svg>
+ </xsl:template>
+ <xsl:template name="xlabel">
+ <xsl:param name="xvalue"/>
+ <xsl:param name="maxx"/>
+ <xsl:param name="minx"/>
+ <xsl:param name="xlabel"/>
+ <xsl:param name="gridline"/>
+ <g>
+ <xsl:attribute name="transform">rotate(315,
+
+
+ <xsl:value-of select="1000* (($xvalue - ($minx)) div ($maxx - $minx))"/>
+
+
+,1014)</xsl:attribute>
+ <text y="1014" style="text-anchor:end">
+ <xsl:attribute name="x">
+ <xsl:value-of select="1000* (($xvalue - ($minx)) div ($maxx - $minx))"/>
+ </xsl:attribute>
+ <xsl:value-of select="$xlabel"/>
+ </text>
+ </g>
+ <xsl:if test="$gridline = 'true'">
+ <xsl:call-template name="gridline">
+ <xsl:with-param name="x1">
+ <xsl:value-of select="1000* (($xvalue - ($minx)) div ($maxx - $minx))"/>
+ </xsl:with-param>
+ <xsl:with-param name="y1">0</xsl:with-param>
+ <xsl:with-param name="type">vertical</xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+ <!-- xlabel -->
+ <xsl:template name="ylabel">
+ <xsl:param name="yvalue"/>
+ <xsl:param name="max"/>
+ <xsl:param name="min"/>
+ <xsl:param name="ylabel"/>
+ <xsl:param name="gridline"/>
+ <xsl:param name="axis">1</xsl:param>
+ <g id="ylabel">
+ <xsl:attribute name="transform">rotate(<xsl:value-of select="325 + ($axis - 1) * -300 "/>, <xsl:value-of select="-10 + ($axis - 1) * 1020 "/>,
+
+
+ <xsl:value-of select="1000-1000* (($yvalue - ($min)) div ($max - $min))"/>
+
+ )</xsl:attribute>
+ <text x="-10" >
+ <xsl:attribute name="style">text-anchor:
+ <xsl:choose>
+ <xsl:when test="$axis=1">end</xsl:when>
+ <xsl:otherwise>start</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:attribute name="x">
+ <xsl:value-of select="-10 + ($axis - 1) * 1020 "/>
+ </xsl:attribute>
+ <xsl:attribute name="y">
+ <xsl:value-of select="1000 - 1000* (($yvalue - ($min)) div ($max - $min))"/>
+ </xsl:attribute>
+ <xsl:value-of select="$ylabel"/>
+ </text>
+ </g>
+ <xsl:if test="$gridline = 'true'">
+ <xsl:call-template name="gridline">
+ <xsl:with-param name="y1">
+ <xsl:value-of select="1000 - 1000* (($yvalue - ($min)) div ($max - $min))"/>
+ </xsl:with-param>
+ <xsl:with-param name="x1"><xsl:value-of select="1000- 1000*($axis -1 )" /></xsl:with-param>
+ <xsl:with-param name="type">horizontal</xsl:with-param>
+ <xsl:with-param name="yaxis"><xsl:value-of select="$axis" /></xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+ <!-- ylabel -->
+ <xsl:template name="annotation">
+ <xsl:param name="x"/>
+ <xsl:param name="y"/>
+ <xsl:param name="annotation"/>
+ <!-- display an annotation -->
+ <g style="stroke-width:1;stroke:blue">
+ <xsl:variable name="height">
+ <xsl:value-of select="8+16*round(string-length($annotation) div 25)"/>
+ </xsl:variable>
+ <xsl:variable name="y_anno">
+ <xsl:choose>
+ <xsl:when test="$y < 300">-150</xsl:when>
+ <xsl:otherwise>150</xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <xsl:variable name="line_y">
+ <xsl:choose>
+ <xsl:when test="$y < 300"><xsl:value-of select="-40+ $y - $y_anno + 0.35* $height" /></xsl:when>
+ <xsl:otherwise><xsl:value-of select="-40+ $y - $y_anno + 0.65* $height"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:variable>
+ <line>
+ <!-- vertical line either upwards (default) or downwards (for the over the 70% of max values -->
+ <xsl:attribute name="x1">
+ <xsl:value-of select="$x"/>
+ </xsl:attribute>
+ <xsl:attribute name="y1">
+ <xsl:value-of select="$y"/>
+ </xsl:attribute>
+ <xsl:attribute name="x2">
+ <xsl:value-of select="$x"/>
+ </xsl:attribute>
+ <xsl:attribute name="y2">
+ <xsl:value-of select="$line_y "/>
+ </xsl:attribute>
+ </line>
+ <line>
+ <!-- horizontal line to right (default) or left (for the over 80% of max x values -->
+ <xsl:attribute name="x1">
+ <xsl:value-of select="$x"/>
+ </xsl:attribute>
+ <xsl:attribute name="y1">
+ <xsl:value-of select="$line_y "/>
+ </xsl:attribute>
+ <xsl:attribute name="x2">
+ <xsl:choose>
+ <xsl:when test="$x > 750"><xsl:value-of select="-7+$x"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="7+$x"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:attribute name="y2">
+ <xsl:value-of select="$line_y"/>
+ </xsl:attribute>
+ </line>
+ <rect width="210" style="fill:lightyellow" >
+ <!-- box to hold the annotation; starts at the horizontal line and extends to the right (default) or left (for over 80% of max x value -->
+ <xsl:attribute name="height">
+ <xsl:value-of select="$height"/>
+ </xsl:attribute>
+ <xsl:attribute name="x">
+ <xsl:choose>
+ <xsl:when test="$x > 750"><xsl:value-of select="-7+$x -210"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="7+$x"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:attribute name="y">
+ <xsl:value-of select="-40+$y - $y_anno"/>
+ </xsl:attribute>
+ </rect>
+ <!-- we may need to split the text in multiple lines; our annotation textbox has a width of 40 which means around 17 characters??-->
+ <xsl:call-template name="annotationLine">
+ <xsl:with-param name="x" select="$x"/>
+ <xsl:with-param name="y" select="$y - $y_anno"/>
+ <xsl:with-param name="annotation" select="$annotation"/>
+ <xsl:with-param name="line">1</xsl:with-param>
+ </xsl:call-template>
+ </g>
+ </xsl:template>
+ <xsl:template name="marker">
+ <xsl:param name="x"/>
+ <xsl:param name="y"/>
+ <xsl:param name="label"/>
+ <xsl:param name="marker">circle</xsl:param>
+ <xsl:param name="color">red</xsl:param>
+ <g onmouseout="HideTooltip(evt)" transform="scale(1)">
+ <xsl:attribute name="style">
+ stroke:<xsl:value-of select="$color"/>;fill:<xsl:value-of select="$color"/>
+ </xsl:attribute>
+ <xsl:attribute name="onmouseover">
+ ShowTooltip(evt,'<xsl:value-of select="$label"/>')
+ </xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="$marker='square'">
+ <use xlink:href="#square">
+ <xsl:attribute name="x">
+ <xsl:value-of select="$x -9"/>
+ </xsl:attribute>
+ <xsl:attribute name="y">
+ <xsl:value-of select="$y -9"/>
+ </xsl:attribute>
+ </use>
+ </xsl:when>
+ <xsl:when test="$marker='triangle'">
+ <use xlink:href="#triangle">
+ <xsl:attribute name="x">
+ <xsl:value-of select="$x -9"/>
+ </xsl:attribute>
+ <xsl:attribute name="y">
+ <xsl:value-of select="$y -9"/>
+ </xsl:attribute>
+ </use>
+ </xsl:when>
+ <xsl:when test="$marker='rectangle'">
+ <use xlink:href="#rectangle">
+ <xsl:attribute name="x">
+ <xsl:value-of select="$x -4"/>
+ </xsl:attribute>
+ <xsl:attribute name="y">
+ <xsl:value-of select="$y -4"/>
+ </xsl:attribute>
+ </use>
+ </xsl:when>
+ <xsl:when test="$marker='star'">
+ <use xlink:href="#star">
+ <xsl:attribute name="x">
+ <xsl:value-of select="$x -9"/>
+ </xsl:attribute>
+ <xsl:attribute name="y">
+ <xsl:value-of select="$y -9"/>
+ </xsl:attribute>
+ </use>
+ </xsl:when>
+ <xsl:when test="$marker='diamond'">
+ <!-- diamond is just a square rotated about its own center for 45 degrees -->
+ <use xlink:href="#square">
+ <xsl:attribute name="x">
+ <xsl:value-of select="$x -9"/>
+ </xsl:attribute>
+ <xsl:attribute name="y">
+ <xsl:value-of select="$y -9"/>
+ </xsl:attribute>
+ <xsl:attribute name="transform">
+ rotate(45,<xsl:value-of select="$x"/>,<xsl:value-of select="$y "/>)
+ </xsl:attribute>
+ </use>
+ </xsl:when>
+ <xsl:when test="$marker='circle'">
+ <circle r="9">
+ <xsl:attribute name="cx">
+ <xsl:value-of select="$x"/>
+ </xsl:attribute>
+ <xsl:attribute name="cy">
+ <xsl:value-of select="$y"/>
+ </xsl:attribute>
+ </circle>
+ </xsl:when>
+ <xsl:when test="$marker='smallcircle'">
+ <circle r="4">
+ <xsl:attribute name="cx">
+ <xsl:value-of select="$x"/>
+ </xsl:attribute>
+ <xsl:attribute name="cy">
+ <xsl:value-of select="$y"/>
+ </xsl:attribute>
+ </circle>
+ </xsl:when>
+ <xsl:otherwise>
+ </xsl:otherwise>
+ </xsl:choose>
+ </g>
+ </xsl:template>
+ <xsl:template name="xmarker">
+ <xsl:param name="n"/>
+ <xsl:param name="i">0</xsl:param>
+ <xsl:param name="stepsize"/>
+ <xsl:param name="min"/>
+ <xsl:param name="max"/>
+ <xsl:param name="gridline">false</xsl:param>
+ <xsl:param name="start">
+ <xsl:value-of select="$min"/>
+ </xsl:param>
+ <xsl:variable name="x">
+ <xsl:value-of select="1000* (($start + $i* $stepsize - $min) div ($max - $min))"/>
+ </xsl:variable>
+ <line y1="1000" y2="985">
+ <xsl:attribute name="x1">
+ <xsl:value-of select="$x"/>
+ </xsl:attribute>
+ <xsl:attribute name="x2">
+ <xsl:value-of select="$x"/>
+ </xsl:attribute>
+ </line>
+ <xsl:call-template name="xlabel">
+ <xsl:with-param name="xvalue" select="$start + $i* $stepsize"/>
+ <xsl:with-param name="xlabel">
+ <xsl:value-of select="round($i * $stepsize +$start)"/>
+"</xsl:with-param>
+ <xsl:with-param name="minx" select="$min"/>
+ <xsl:with-param name="maxx" select="$max"/>
+ </xsl:call-template>
+ <xsl:if test="$gridline = 'true'">
+ <xsl:call-template name="gridline">
+ <xsl:with-param name="y1">0</xsl:with-param>
+ <xsl:with-param name="x1" select="$x"/>
+ <xsl:with-param name="type">vertical</xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="$i < $n">
+ <xsl:call-template name="xmarker">
+ <xsl:with-param name="i" select="$i+1"/>
+ <xsl:with-param name="n" select="$n"/>
+ <xsl:with-param name="stepsize" select="$stepsize"/>
+ <xsl:with-param name="min" select="$min"/>
+ <xsl:with-param name="max" select="$max"/>
+ <xsl:with-param name="start" select="$start"/>
+ <xsl:with-param name="gridline" select="$gridline"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+ <!-- end of xmarker -->
+ <xsl:template name="ymarker">
+ <xsl:param name="n"/>
+ <xsl:param name="i">0</xsl:param>
+ <xsl:param name="stepsize"/>
+ <xsl:param name="min"/>
+ <xsl:param name="max"/>
+ <xsl:param name="gridline">false</xsl:param>
+ <xsl:param name="start">
+ <xsl:value-of select="$min"/>
+ </xsl:param>
+ <xsl:param name="axis">1</xsl:param>
+ <xsl:variable name="y">
+ <xsl:value-of select="1000 - 1000* (($start + $i* $stepsize - $min) div ($max - $min))"/>
+ </xsl:variable>
+ <xsl:value-of select="$i"/>
+ <line x1="0" x2="18">
+ <xsl:attribute name="y1">
+ <xsl:value-of select="$y"/>
+ </xsl:attribute>
+ <xsl:attribute name="y2">
+ <xsl:value-of select="$y"/>
+ </xsl:attribute>
+ </line>
+ <text x="-20">
+ <xsl:attribute name="x">
+ <xsl:value-of select="-20 + 1030*($axis -1)"/>
+ </xsl:attribute>
+ <xsl:attribute name="style">text-anchor:
+ <xsl:choose>
+ <xsl:when test="$axis=1">end</xsl:when>
+ <xsl:otherwise>start</xsl:otherwise>
+ </xsl:choose>
+ ;font-size:
+ <xsl:choose>
+ <xsl:when test="$i=$n">40</xsl:when>
+ <xsl:when test="$i=0">40</xsl:when>
+ <xsl:otherwise>20</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:attribute name="y">
+ <xsl:value-of select="$y +5"/>
+ </xsl:attribute>
+ <xsl:value-of select="round($i * $stepsize +$start)"/>
+ </text>
+ <xsl:if test="$gridline = 'true'">
+ <xsl:call-template name="gridline">
+ <xsl:with-param name="x1"><xsl:value-of select="1000 - 1000*( $axis -1)"/></xsl:with-param>
+ <xsl:with-param name="y1" select="$y"/>
+ <xsl:with-param name="type">horizontal</xsl:with-param>
+ <xsl:with-param name="yaxis"><xsl:value-of select="$axis"/></xsl:with-param>
+ </xsl:call-template>
+ </xsl:if>
+ <xsl:if test="$i < $n">
+ <xsl:call-template name="ymarker">
+ <xsl:with-param name="i" select="$i+1"/>
+ <xsl:with-param name="n" select="$n"/>
+ <xsl:with-param name="stepsize" select="$stepsize"/>
+ <xsl:with-param name="min" select="$min"/>
+ <xsl:with-param name="max" select="$max"/>
+ <xsl:with-param name="start" select="$start"/>
+ <xsl:with-param name="gridline" select="$gridline"/>
+ <xsl:with-param name="axis" select="$axis"/>
+ </xsl:call-template>
+ </xsl:if>
+ </xsl:template>
+ <!-- ymarker -->
+ <xsl:template name="gridline">
+ <xsl:param name="x1"/>
+ <xsl:param name="y1"/>
+ <xsl:param name="type"/>
+ <xsl:param name="yaxis">1</xsl:param>
+ <line style="fill:none; stroke:#B0B0B0; stroke-width:2; stroke-dasharray:2 4">
+ <xsl:attribute name="x1">
+ <xsl:value-of select="$x1"/>
+ </xsl:attribute>
+ <xsl:choose>
+ <xsl:when test="$type='horizontal'">
+ <xsl:attribute name="x2"><xsl:value-of select="($yaxis -1)* 1000 "/></xsl:attribute>
+ <xsl:attribute name="y2">
+ <xsl:value-of select="$y1"/>
+ </xsl:attribute>
+ </xsl:when>
+ <xsl:otherwise>
+ <xsl:attribute name="y2">1000</xsl:attribute>
+ <xsl:attribute name="x2">
+ <xsl:value-of select="$x1"/>
+ </xsl:attribute>
+ </xsl:otherwise>
+ </xsl:choose>
+ <xsl:attribute name="y1">
+ <xsl:value-of select="$y1"/>
+ </xsl:attribute>
+ </line>
+ </xsl:template>
+ <!-- gridline -->
+
+ <!-- write line in annotation box -->
+ <xsl:template name="annotationLine" >
+ <xsl:param name="x"/>
+ <xsl:param name="y"/>
+ <xsl:param name="annotation"/>
+ <xsl:param name="line">1</xsl:param>
+ <text font-size="16" fill="black">
+ <xsl:attribute name="text-anchor">
+ <xsl:choose>
+ <xsl:when test="$x > 750">end</xsl:when>
+ <xsl:otherwise>start</xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:attribute name="x">
+ <xsl:choose>
+ <xsl:when test="$x > 750"><xsl:value-of select="-10+$x"/></xsl:when>
+ <xsl:otherwise><xsl:value-of select="10+$x"/></xsl:otherwise>
+ </xsl:choose>
+ </xsl:attribute>
+ <xsl:attribute name="y">
+ <xsl:value-of select="-25+$y +16*($line -1)"/>
+ </xsl:attribute>
+ <xsl:value-of select="substring($annotation,1,25)"/>
+ </text>
+ <xsl:if test="string-length($annotation) > 25">
+ <xsl:call-template name="annotationLine">
+ <xsl:with-param name="x" select="$x"/>
+ <xsl:with-param name="y" select="$y"/>
+ <xsl:with-param name="annotation" select="substring($annotation,26)"/>
+ <xsl:with-param name="line" select="$line+1"/>
+ </xsl:call-template>
+ </xsl:if>
+</xsl:template>
+
+</xsl:stylesheet>
Property changes on: branches/xml-class-rework/projects/bos/statistics/buildSVGLineChart.xsl
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/xml-class-rework/projects/bos/statistics/contracts-by-week-2005.svg
===================================================================
--- branches/xml-class-rework/projects/bos/statistics/contracts-by-week-2005.svg 2006-09-24 19:13:31 UTC (rev 1984)
+++ branches/xml-class-rework/projects/bos/statistics/contracts-by-week-2005.svg 2006-10-14 06:59:35 UTC (rev 1985)
@@ -0,0 +1,75 @@
+<svg xmlns:xlink="http://www.w3.org/2000/xlink/namespace/" width="1200" height="1200" onload="getSVGDoc(evt)" onzoom="ZoomControl()"><defs><g id="star" transform="scale(0.21)"><polyline points="48,16,16,96,96,48,0,48,80,96"/></g><g id="triangle" transform="scale(0.7)"><path id="Triangle" d="M 0 25 L 10 15 L 20 25 z" style="stroke:none"/></g><g id="square" transform="scale(1)"><rect width="18" height="18"/></g><g id="rectangle" transform="scale(1)"><rect width="7" height="22"/></g><script type="text/javascript">
+
+ /* this code was largely reused from the excellent website SVG - Learning by Coding (http://svglbc.datenverdrahten.de/) */
+ var svgdoc,svgroot;
+ function getSVGDoc(load_evt)
+ {
+ svgdoc=load_evt.target.ownerDocument;
+ svgroot=svgdoc.documentElement;
+
+ texte=svgdoc.getElementById("tooltip").getElementsByTagName("text");
+ }
+ function ShowTooltip(mousemove_event,txt)
+ {
+ var ttrelem,tttelem,posx,posy,curtrans,ctx,cty,txt;
+ var sollbreite,maxbreite,ges,anz,tmp,txl,neu,i,k,l
+ ttrelem=svgdoc.getElementById("ttr");
+ tttelem=svgdoc.getElementById("ttt");
+ posx=mousemove_event.clientX;
+ posy=mousemove_event.clientY;
+ for(i=1;i<=5;i++)texte.item(i).firstChild.data="";
+ sollbreite=150;
+ tttelem.childNodes.item(0).data=txt;
+ ges=tttelem.getComputedTextLength();
+ tttelem.childNodes.item(0).data="";
+ anz=Math.ceil(ges/sollbreite);
+ tmp=txt.split(" ");
+ txl=new Array(tmp.length);
+ neu=new Array(anz);
+ for(i=0;i<tmp.length;i++)
+ {
+ tttelem.childNodes.item(0).data=tmp[i];
+ txl[i]=tttelem.getComputedTextLength();
+ }
+ k=0;
+ maxbreite=0;
+ for(i=0;i<anz;i++)
+ {
+ l=0,neu[i]="";
+ while(l+txl[k]<1.1*sollbreite && k<tmp.length)
+ {
+ l+=txl[k];
+ neu[i]+=tmp[k]+" ";
+ k++;
+ if(maxbreite<l)maxbreite=l;
+ }
+ }
+ curtrans=svgroot.currentTranslate;
+ ctx=curtrans.x;
+ cty=curtrans.y;
+ ttrelem.setAttribute("x",posx-ctx+10);
+ ttrelem.setAttribute("y",posy-cty-20+10);
+ ttrelem.setAttribute("width",maxbreite+2*(maxbreite-sollbreite)+40);
+ ttrelem.setAttribute("height",anz*15+3);
+ ttrelem.setAttribute("style","fill: #FFC; stroke: #000; stroke-width: 0.5px");
+ for(i=1;i<=anz;i++)
+ {
+ texte.item(i).firstChild.data=neu[i-1];
+ texte.item(i).setAttribute("x",posx-ctx+15);
+ texte.item(i).setAttribute("y",parseInt(i-1)*15+posy-cty+3);
+ texte.item(i).setAttribute("style","fill: #00C; font-size: 11px");
+ }
+ svgdoc.getElementById("tooltip").style.setProperty("visibility","visible");
+ }
+ function HideTooltip()
+ {
+ svgdoc.getElementById("tooltip").style.setProperty("visibility","hidden");
+ }
+ function ZoomControl()
+ {
+ var curzoom;
+ curzoom=svgroot.currentScale;
+ svgdoc.getElementById("tooltip").setAttribute("transform","scale("+1/curzoom+")");
+ }
+
+ </script></defs><g transform="translate(150,50) scale(0.5)"><text x="5" y="-40" text-anchor="left" font-weight="bolder" font-size="40" fill="maroon" text-decoration="underline">Contracts by week for year 2005</text><g transform="translate(-220, 80) rotate(270, 0, 0)"><text x="0" y="0" text-anchor="middle" font-weight="bolder" font-size="36" fill="black"></text></g><g transform="translate(1220, 80) rotate(90, 0, 0)"><text x="0" y="0" text-anchor="middle" font-weight="bolder" font-size="36" fill="black"></text></g><text x="1070" y="1000" font-size="36" font-weight="bolder" fill="black"></text><g style="stroke-width:5; stroke:black"><path d="M 0 1000 L 1000 1000 Z"/><path d="M 0 0 L 0 1000 Z"/></g><g style="stroke:red; stroke-width: 3; fill:black; stroke:none ;font-size:24; text-anchor:middle"/><g id="ylabel" transform="rotate(325, -10, 692.307692307692 )"><text x="-10" style="text-anchor: end" y="692.307692307692">20</text></g><line style="fill:none; stroke:#B0B0B0; stroke-width:2; stroke-dasharray:2 4" x1="1000" x2="0" y2="692.307692307692" y1="692.307692307692"/><g id="ylabel" transform="rotate(325, -10, 384.615384615385 )"><text x="-10" style="text-anchor: end" y="384.615384615385">40</text></g><line style="fill:none; stroke:#B0B0B0; stroke-width:2; stroke-dasharray:2 4" x1="1000" x2="0" y2="384.615384615385" y1="384.615384615385"/><g id="ylabel" transform="rotate(325, -10, 76.9230769230769 )"><text x="-10" style="text-anchor: end" y="76.9230769230769">60</text></g><line style="fill:none; stroke:#B0B0B0; stroke-width:2; stroke-dasharray:2 4" x1="1000" x2="0" y2="76.9230769230769" y1="76.9230769230769"/><g stylet="stroke:red; stroke-width: 3; fill : none;" style=" stroke:green;stroke-width: 3; fill : none; "><line x1="117.647058823529" y1="892.307692307692" x2="137.254901960784" y2="938.461538461538"/><line x1="137.254901960784" y1="938.461538461538" x2="156.862745098039" y2="184.615384615385"/><line x1="156.862745098039" y1="184.615384615385" x2="176.470588235294" y2="861.538461538462"/><line x1="176.470588235294" y1="861.538461538462" x2="196.078431372549" y2="923.076923076923"/><line x1="196.078431372549" y1="923.076923076923" x2="215.686274509804" y2="923.076923076923"/><line x1="215.686274509804" y1="923.076923076923" x2="235.294117647059" y2="876.923076923077"/><line x1="235.294117647059" y1="876.923076923077" x2="254.901960784314" y2="907.692307692308"/><line x1="254.901960784314" y1="907.692307692308" x2="274.509803921569" y2="938.461538461538"/><line x1="274.509803921569" y1="938.461538461538" x2="294.117647058824" y2="984.615384615385"/><line x1="294.117647058824" y1="984.615384615385" x2="313.725490196078" y2="876.923076923077"/><line x1="313.725490196078" y1="876.923076923077" x2="333.333333333333" y2="876.923076923077"/><line x1="333.333333333333" y1="876.923076923077" x2="352.941176470588" y2="876.923076923077"/><line x1="352.941176470588" y1="876.923076923077" x2="372.549019607843" y2="938.461538461538"/><line x1="372.549019607843" y1="938.461538461538" x2="392.156862745098" y2="784.615384615385"/><line x1="392.156862745098" y1="784.615384615385" x2="411.764705882353" y2="876.923076923077"/><line x1="411.764705882353" y1="876.923076923077" x2="431.372549019608" y2="923.076923076923"/><line x1="431.372549019608" y1="923.076923076923" x2="450.980392156863" y2="892.307692307692"/><line x1="450.980392156863" y1="892.307692307692" x2="470.588235294118" y2="938.461538461538"/><line x1="470.588235294118" y1="938.461538461538" x2="490.196078431373" y2="984.615384615385"/><line x1="490.196078431373" y1="984.615384615385" x2="509.803921568627" y2="923.076923076923"/><line x1="509.803921568627" y1="923.076923076923" x2="529.411764705882" y2="938.461538461538"/><line x1="529.411764705882" y1="938.461538461538" x2="568.627450980392" y2="984.615384615385"/><line x1="568.627450980392" y1="984.615384615385" x2="588.235294117647" y2="876.923076923077"/><line x1="588.235294117647" y1="876.923076923077" x2="607.843137254902" y2="892.307692307692"/><line x1="607.843137254902" y1="892.307692307692" x2="627.450980392157" y2="461.538461538462"/><line x1="627.450980392157" y1="461.538461538462" x2="647.058823529412" y2="707.692307692308"/><line x1="647.058823529412" y1="707.692307692308" x2="666.666666666667" y2="815.384615384615"/><line x1="666.666666666667" y1="815.384615384615" x2="686.274509803922" y2="923.076923076923"/><line x1="686.274509803922" y1="923.076923076923" x2="705.882352941176" y2="876.923076923077"/><line x1="705.882352941176" y1="876.923076923077" x2="725.490196078431" y2="953.846153846154"/><line x1="725.490196078431" y1="953.846153846154" x2="745.098039215686" y2="907.692307692308"/><line x1="745.098039215686" y1="907.692307692308" x2="764.705882352941" y2="876.923076923077"/><line x1="764.705882352941" y1="876.923076923077" x2="784.313725490196" y2="615.384615384615"/><line x1="784.313725490196" y1="615.384615384615" x2="803.921568627451" y2="784.615384615385"/><line x1="803.921568627451" y1="784.615384615385" x2="823.529411764706" y2="846.153846153846"/><line x1="823.529411764706" y1="846.153846153846" x2="843.137254901961" y2="861.538461538462"/><line x1="843.137254901961" y1="861.538461538462" x2="862.745098039216" y2="923.076923076923"/><line x1="862.745098039216" y1="923.076923076923" x2="882.352941176471" y2="830.769230769231"/><line x1="882.352941176471" y1="830.769230769231" x2="901.960784313726" y2="646.153846153846"/><line x1="901.960784313726" y1="646.153846153846" x2="921.56862745098" y2="630.769230769231"/><line x1="921.56862745098" y1="630.769230769231" x2="941.176470588235" y2="415.384615384615"/><line x1="941.176470588235" y1="415.384615384615" x2="960.78431372549" y2="246.153846153846"/><line x1="960.78431372549" y1="246.153846153846" x2="980.392156862745" y2="0"/><line x1="980.392156862745" y1="0" x2="1000" y2="876.923076923077"/></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="108.647058823529" y="883.307692307692"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="128.254901960784" y="929.461538461538"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="147.862745098039" y="175.615384615385"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="167.470588235294" y="852.538461538462"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="187.078431372549" y="914.076923076923"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="206.686274509804" y="914.076923076923"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="226.294117647059" y="867.923076923077"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="245.901960784314" y="898.692307692308"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="265.509803921569" y="929.461538461538"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="285.117647058824" y="975.615384615385"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="304.725490196078" y="867.923076923077"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="324.333333333333" y="867.923076923077"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="343.941176470588" y="867.923076923077"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="363.549019607843" y="929.461538461538"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="383.156862745098" y="775.615384615385"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="402.764705882353" y="867.923076923077"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="422.372549019608" y="914.076923076923"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="441.980392156863" y="883.307692307692"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="461.588235294118" y="929.461538461538"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="481.196078431373" y="975.615384615385"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="500.803921568627" y="914.076923076923"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="520.411764705882" y="929.461538461538"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="559.627450980392" y="975.615384615385"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="579.235294117647" y="867.923076923077"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="598.843137254902" y="883.307692307692"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="618.450980392157" y="452.538461538462"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="638.058823529412" y="698.692307692308"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="657.666666666667" y="806.384615384615"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="677.274509803922" y="914.076923076923"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="696.882352941176" y="867.923076923077"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="716.490196078431" y="944.846153846154"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="736.098039215686" y="898.692307692308"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="755.705882352941" y="867.923076923077"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="775.313725490196" y="606.384615384615"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="794.921568627451" y="775.615384615385"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="814.529411764706" y="837.153846153846"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="834.137254901961" y="852.538461538462"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="853.745098039216" y="914.076923076923"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="873.352941176471" y="821.769230769231"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="892.960784313726" y="637.153846153846"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="912.56862745098" y="621.769230769231"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="932.176470588235" y="406.384615384615"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="951.78431372549" y="237.153846153846"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="971.392156862745" y="-9"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="991" y="867.923076923077"/></g></g><g id="legend" style="fill:lavenderblush;stroke-width:2;stroke:black" transform="translate(1080,500)"><rect id="legend" x="0" y="0" rx="5" ry="5" width="200" height="49"/><text x="10" y="15" style="text-decoration:underline;stroke-width:1;stroke:black;fill:black">Legend:</text><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="6" y="18"/></g><text x="27" y="35" style="stroke-width:1;stroke:green;fill:green">Contracts</text></g></g><g id="tooltip" style="visibility: hidden"><rect id="ttr" x="0" y="0" rx="5" ry="5" width="100" height="16"/><text id="ttt" x="0" y="0" style="visibility: hidden">dyn. Text</text><text x="-10" y="-10">dyn. Text</text><text x="-10" y="-10">dyn. Text</text><text x="-10" y="-10">dyn. Text</text><text x="-10" y="-10">dyn. Text</text><text x="-10" y="-10">dyn. Text</text></g></svg>
Added: branches/xml-class-rework/projects/bos/statistics/contracts-by-week-2006.svg
===================================================================
--- branches/xml-class-rework/projects/bos/statistics/contracts-by-week-2006.svg 2006-09-24 19:13:31 UTC (rev 1984)
+++ branches/xml-class-rework/projects/bos/statistics/contracts-by-week-2006.svg 2006-10-14 06:59:35 UTC (rev 1985)
@@ -0,0 +1,75 @@
+<svg xmlns:xlink="http://www.w3.org/2000/xlink/namespace/" width="1200" height="1200" onload="getSVGDoc(evt)" onzoom="ZoomControl()"><defs><g id="star" transform="scale(0.21)"><polyline points="48,16,16,96,96,48,0,48,80,96"/></g><g id="triangle" transform="scale(0.7)"><path id="Triangle" d="M 0 25 L 10 15 L 20 25 z" style="stroke:none"/></g><g id="square" transform="scale(1)"><rect width="18" height="18"/></g><g id="rectangle" transform="scale(1)"><rect width="7" height="22"/></g><script type="text/javascript">
+
+ /* this code was largely reused from the excellent website SVG - Learning by Coding (http://svglbc.datenverdrahten.de/) */
+ var svgdoc,svgroot;
+ function getSVGDoc(load_evt)
+ {
+ svgdoc=load_evt.target.ownerDocument;
+ svgroot=svgdoc.documentElement;
+
+ texte=svgdoc.getElementById("tooltip").getElementsByTagName("text");
+ }
+ function ShowTooltip(mousemove_event,txt)
+ {
+ var ttrelem,tttelem,posx,posy,curtrans,ctx,cty,txt;
+ var sollbreite,maxbreite,ges,anz,tmp,txl,neu,i,k,l
+ ttrelem=svgdoc.getElementById("ttr");
+ tttelem=svgdoc.getElementById("ttt");
+ posx=mousemove_event.clientX;
+ posy=mousemove_event.clientY;
+ for(i=1;i<=5;i++)texte.item(i).firstChild.data="";
+ sollbreite=150;
+ tttelem.childNodes.item(0).data=txt;
+ ges=tttelem.getComputedTextLength();
+ tttelem.childNodes.item(0).data="";
+ anz=Math.ceil(ges/sollbreite);
+ tmp=txt.split(" ");
+ txl=new Array(tmp.length);
+ neu=new Array(anz);
+ for(i=0;i<tmp.length;i++)
+ {
+ tttelem.childNodes.item(0).data=tmp[i];
+ txl[i]=tttelem.getComputedTextLength();
+ }
+ k=0;
+ maxbreite=0;
+ for(i=0;i<anz;i++)
+ {
+ l=0,neu[i]="";
+ while(l+txl[k]<1.1*sollbreite && k<tmp.length)
+ {
+ l+=txl[k];
+ neu[i]+=tmp[k]+" ";
+ k++;
+ if(maxbreite<l)maxbreite=l;
+ }
+ }
+ curtrans=svgroot.currentTranslate;
+ ctx=curtrans.x;
+ cty=curtrans.y;
+ ttrelem.setAttribute("x",posx-ctx+10);
+ ttrelem.setAttribute("y",posy-cty-20+10);
+ ttrelem.setAttribute("width",maxbreite+2*(maxbreite-sollbreite)+40);
+ ttrelem.setAttribute("height",anz*15+3);
+ ttrelem.setAttribute("style","fill: #FFC; stroke: #000; stroke-width: 0.5px");
+ for(i=1;i<=anz;i++)
+ {
+ texte.item(i).firstChild.data=neu[i-1];
+ texte.item(i).setAttribute("x",posx-ctx+15);
+ texte.item(i).setAttribute("y",parseInt(i-1)*15+posy-cty+3);
+ texte.item(i).setAttribute("style","fill: #00C; font-size: 11px");
+ }
+ svgdoc.getElementById("tooltip").style.setProperty("visibility","visible");
+ }
+ function HideTooltip()
+ {
+ svgdoc.getElementById("tooltip").style.setProperty("visibility","hidden");
+ }
+ function ZoomControl()
+ {
+ var curzoom;
+ curzoom=svgroot.currentScale;
+ svgdoc.getElementById("tooltip").setAttribute("transform","scale("+1/curzoom+")");
+ }
+
+ </script></defs><g transform="translate(150,50) scale(0.5)"><text x="5" y="-40" text-anchor="left" font-weight="bolder" font-size="40" fill="maroon" text-decoration="underline">Contracts by week for year 2006</text><g transform="translate(-220, 80) rotate(270, 0, 0)"><text x="0" y="0" text-anchor="middle" font-weight="bolder" font-size="36" fill="black"></text></g><g transform="translate(1220, 80) rotate(90, 0, 0)"><text x="0" y="0" text-anchor="middle" font-weight="bolder" font-size="36" fill="black"></text></g><text x="1070" y="1000" font-size="36" font-weight="bolder" fill="black"></text><g style="stroke-width:5; stroke:black"><path d="M 0 1000 L 1000 1000 Z"/><path d="M 0 0 L 0 1000 Z"/></g><g style="stroke:red; stroke-width: 3; fill:black; stroke:none ;font-size:24; text-anchor:middle"/><g id="ylabel" transform="rotate(325, -10, 696.969696969697 )"><text x="-10" style="text-anchor: end" y="696.969696969697">20</text></g><line style="fill:none; stroke:#B0B0B0; stroke-width:2; stroke-dasharray:2 4" x1="1000" x2="0" y2="696.969696969697" y1="696.969696969697"/><g id="ylabel" transform="rotate(325, -10, 393.939393939394 )"><text x="-10" style="text-anchor: end" y="393.939393939394">40</text></g><line style="fill:none; stroke:#B0B0B0; stroke-width:2; stroke-dasharray:2 4" x1="1000" x2="0" y2="393.939393939394" y1="393.939393939394"/><g id="ylabel" transform="rotate(325, -10, 90.909090909091 )"><text x="-10" style="text-anchor: end" y="90.909090909091">60</text></g><line style="fill:none; stroke:#B0B0B0; stroke-width:2; stroke-dasharray:2 4" x1="1000" x2="0" y2="90.909090909091" y1="90.909090909091"/><g stylet="stroke:red; stroke-width: 3; fill : none;" style=" stroke:green;stroke-width: 3; fill : none; "><line x1="0" y1="787.878787878788" x2="19.6078431372549" y2="712.121212121212"/><line x1="19.6078431372549" y1="712.121212121212" x2="39.2156862745098" y2="60.6060606060605"/><line x1="39.2156862745098" y1="60.6060606060605" x2="58.8235294117647" y2="712.121212121212"/><line x1="58.8235294117647" y1="712.121212121212" x2="78.4313725490196" y2="848.484848484848"/><line x1="78.4313725490196" y1="848.484848484848" x2="98.0392156862745" y2="939.393939393939"/><line x1="98.0392156862745" y1="939.393939393939" x2="117.647058823529" y2="954.545454545455"/><line x1="117.647058823529" y1="954.545454545455" x2="137.254901960784" y2="939.393939393939"/><line x1="137.254901960784" y1="939.393939393939" x2="156.862745098039" y2="863.636363636364"/><line x1="156.862745098039" y1="863.636363636364" x2="176.470588235294" y2="696.969696969697"/><line x1="176.470588235294" y1="696.969696969697" x2="196.078431372549" y2="560.606060606061"/><line x1="196.078431372549" y1="560.606060606061" x2="215.686274509804" y2="787.878787878788"/><line x1="215.686274509804" y1="787.878787878788" x2="235.294117647059" y2="803.030303030303"/><line x1="235.294117647059" y1="803.030303030303" x2="254.901960784314" y2="742.424242424242"/><line x1="254.901960784314" y1="742.424242424242" x2="274.509803921569" y2="772.727272727273"/><line x1="274.509803921569" y1="772.727272727273" x2="294.117647058824" y2="954.545454545455"/><line x1="294.117647058824" y1="954.545454545455" x2="313.725490196078" y2="878.787878787879"/><line x1="313.725490196078" y1="878.787878787879" x2="333.333333333333" y2="893.939393939394"/><line x1="333.333333333333" y1="893.939393939394" x2="352.941176470588" y2="848.484848484848"/><line x1="352.941176470588" y1="848.484848484848" x2="372.549019607843" y2="772.727272727273"/><line x1="372.549019607843" y1="772.727272727273" x2="392.156862745098" y2="863.636363636364"/><line x1="392.156862745098" y1="863.636363636364" x2="411.764705882353" y2="575.757575757576"/><line x1="411.764705882353" y1="575.757575757576" x2="431.372549019608" y2="818.181818181818"/><line x1="431.372549019608" y1="818.181818181818" x2="450.980392156863" y2="878.787878787879"/><line x1="450.980392156863" y1="878.787878787879" x2="470.588235294118" y2="712.121212121212"/><line x1="470.588235294118" y1="712.121212121212" x2="490.196078431373" y2="772.727272727273"/><line x1="490.196078431373" y1="772.727272727273" x2="509.803921568627" y2="439.393939393939"/><line x1="509.803921568627" y1="439.393939393939" x2="529.411764705882" y2="757.575757575758"/><line x1="529.411764705882" y1="757.575757575758" x2="549.019607843137" y2="833.333333333333"/><line x1="549.019607843137" y1="833.333333333333" x2="568.627450980392" y2="909.090909090909"/><line x1="568.627450980392" y1="909.090909090909" x2="588.235294117647" y2="833.333333333333"/><line x1="588.235294117647" y1="833.333333333333" x2="607.843137254902" y2="818.181818181818"/><line x1="607.843137254902" y1="818.181818181818" x2="627.450980392157" y2="893.939393939394"/><line x1="627.450980392157" y1="893.939393939394" x2="647.058823529412" y2="848.484848484848"/><line x1="647.058823529412" y1="848.484848484848" x2="666.666666666667" y2="0"/><line x1="666.666666666667" y1="0" x2="686.274509803922" y2="878.787878787879"/><line x1="686.274509803922" y1="878.787878787879" x2="705.882352941176" y2="515.151515151515"/><line x1="705.882352941176" y1="515.151515151515" x2="725.490196078431" y2="803.030303030303"/><line x1="725.490196078431" y1="803.030303030303" x2="745.098039215686" y2="772.727272727273"/><line x1="745.098039215686" y1="772.727272727273" x2="764.705882352941" y2="757.575757575758"/><line x1="764.705882352941" y1="757.575757575758" x2="784.313725490196" y2="969.69696969697"/></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="-9" y="778.878787878788"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="10.6078431372549" y="703.121212121212"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="30.2156862745098" y="51.6060606060605"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="49.8235294117647" y="703.121212121212"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="69.4313725490196" y="839.484848484848"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="89.0392156862745" y="930.393939393939"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="108.647058823529" y="945.545454545455"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="128.254901960784" y="930.393939393939"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="147.862745098039" y="854.636363636364"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="167.470588235294" y="687.969696969697"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="187.078431372549" y="551.606060606061"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="206.686274509804" y="778.878787878788"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="226.294117647059" y="794.030303030303"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="245.901960784314" y="733.424242424242"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="265.509803921569" y="763.727272727273"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="285.117647058824" y="945.545454545455"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="304.725490196078" y="869.787878787879"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="324.333333333333" y="884.939393939394"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="343.941176470588" y="839.484848484848"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="363.549019607843" y="763.727272727273"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="383.156862745098" y="854.636363636364"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="402.764705882353" y="566.757575757576"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="422.372549019608" y="809.181818181818"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="441.980392156863" y="869.787878787879"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="461.588235294118" y="703.121212121212"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="481.196078431373" y="763.727272727273"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="500.803921568627" y="430.393939393939"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="520.411764705882" y="748.575757575758"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="540.019607843137" y="824.333333333333"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="559.627450980392" y="900.090909090909"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="579.235294117647" y="824.333333333333"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="598.843137254902" y="809.181818181818"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="618.450980392157" y="884.939393939394"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="638.058823529412" y="839.484848484848"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="657.666666666667" y="-9"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="677.274509803922" y="869.787878787879"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="696.882352941176" y="506.151515151515"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="716.490196078431" y="794.030303030303"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="736.098039215686" y="763.727272727273"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="755.705882352941" y="748.575757575758"/></g></g><g style="stroke:green stroke-width: 3; fill : none;"><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="775.313725490196" y="960.69696969697"/></g></g><g id="legend" style="fill:lavenderblush;stroke-width:2;stroke:black" transform="translate(1080,500)"><rect id="legend" x="0" y="0" rx="5" ry="5" width="200" height="49"/><text x="10" y="15" style="text-decoration:underline;stroke-width:1;stroke:black;fill:black">Legend:</text><g onmouseout="HideTooltip(evt)" transform="scale(1)" style=" stroke:green;fill:green" onmouseover=" ShowTooltip(evt,'') "><use xlink:href="#triangle" x="6" y="18"/></g><text x="27" y="35" style="stroke-width:1;stroke:green;fill:green">Contracts</text></g></g><g id="tooltip" style="visibility: hidden"><rect id="ttr" x="0" y="0" rx="5" ry="5" width="100" height="16"/><text id="ttt" x="0" y="0" style="visibility: hidden">dyn. Text</text><text x="-10" y="-10">dyn. Text</text><text x="-10" y="-10">dyn. Text</text><text x="-10" y="-10">dyn. Text</text><text x="-10" y="-10">dyn. Text</text><text x="-10" y="-10">dyn. Text</text></g></svg>
Added: branches/xml-class-rework/projects/bos/statistics/contracts-by-week.lxsl
===================================================================
--- branches/xml-class-rework/projects/bos/statistics/contracts-by-week.lxsl 2006-09-24 19:13:31 UTC (rev 1984)
+++ branches/xml-class-rework/projects/bos/statistics/contracts-by-week.lxsl 2006-10-14 06:59:35 UTC (rev 1985)
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:loop="http://informatik.hu-berlin.de/loop">
+ <xsl:output method="xml"/>
+
+ <xsl:template match="/response">
+ <xsl:variable name="year">
+ <xsl:value-of select="substring(/response/week[1]/@key, 1, 4)"/>
+ </xsl:variable>
+ <xsl:variable name="max_contracts">
+ <xsl:for-each select="week">
+ <xsl:sort select="@contracts" data-type="number" order="descending"/>
+ <xsl:if test="position()=1"><xsl:value-of select="@contracts"/></xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <graphData>
+ <sets>
+ <set title="Contracts" marker-type="triangle" color="green">
+ <xsl:for-each select="week">
+ <measure>
+ <xvalue><xsl:value-of select="substring(@key, 6)"/></xvalue>
+ <yvalue><xsl:value-of select="@contracts"/></yvalue>
+ </measure>
+ </xsl:for-each>
+ </set>
+ </sets>
+ <minx>1</minx>
+ <maxx>52</maxx>
+ <miny>0</miny>
+ <maxy><xsl:value-of select="$max_contracts"/></maxy>
+ <title>Contracts by week for year <xsl:value-of select="$year"/></title>
+ <yvalues>
+ <loop:for name="i" from="20" to="$max_contracts" step="20">
+ <yvalue>
+ <value><xsl:value-of select="$i"/></value>
+ <label><xsl:value-of select="$i"/></label>
+ <gridline>true</gridline>
+ </yvalue>
+ </loop:for>
+ </yvalues>
+ </graphData>
+ </xsl:template>
+</xsl:stylesheet>
Property changes on: branches/xml-class-rework/projects/bos/statistics/contracts-by-week.lxsl
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/xml-class-rework/projects/bos/statistics/contracts-by-week.xml
===================================================================
--- branches/xml-class-rework/projects/bos/statistics/contracts-by-week.xml 2006-09-24 19:13:31 UTC (rev 1984)
+++ branches/xml-class-rework/projects/bos/statistics/contracts-by-week.xml 2006-10-14 06:59:35 UTC (rev 1985)
@@ -0,0 +1,2 @@
+<?xml version="1.0"?>
+<graphData xmlns:loop="http://informatik.hu-berlin.de/loop"><sets><set title="Contracts" marker-type="triangle" color="green"><measure><xvalue>1</xvalue><yvalue>14</yvalue></measure><measure><xvalue>2</xvalue><yvalue>19</yvalue></measure><measure><xvalue>3</xvalue><yvalue>62</yvalue></measure><measure><xvalue>4</xvalue><yvalue>19</yvalue></measure><measure><xvalue>5</xvalue><yvalue>10</yvalue></measure><measure><xvalue>6</xvalue><yvalue>4</yvalue></measure><measure><xvalue>7</xvalue><yvalue>3</yvalue></measure><measure><xvalue>8</xvalue><yvalue>4</yvalue></measure><measure><xvalue>9</xvalue><yvalue>9</yvalue></measure><measure><xvalue>10</xvalue><yvalue>20</yvalue></measure><measure><xvalue>11</xvalue><yvalue>29</yvalue></measure><measure><xvalue>12</xvalue><yvalue>14</yvalue></measure><measure><xvalue>13</xvalue><yvalue>13</yvalue></measure><measure><xvalue>14</xvalue><yvalue>17</yvalue></measure><measure><xvalue>15</xvalue><yvalue>15</yvalue></measure><measure><xvalue>16</xvalue><yvalue>3</yvalue></measure><measure><xvalue>17</xvalue><yvalue>8</yvalue></measure><measure><xvalue>18</xvalue><yvalue>7</yvalue></measure><measure><xvalue>19</xvalue><yvalue>10</yvalue></measure><measure><xvalue>20</xvalue><yvalue>15</yvalue></measure><measure><xvalue>21</xvalue><yvalue>9</yvalue></measure><measure><xvalue>22</xvalue><yvalue>28</yvalue></measure><measure><xvalue>23</xvalue><yvalue>12</yvalue></measure><measure><xvalue>24</xvalue><yvalue>8</yvalue></measure><measure><xvalue>25</xvalue><yvalue>19</yvalue></measure><measure><xvalue>26</xvalue><yvalue>15</yvalue></measure><measure><xvalue>27</xvalue><yvalue>37</yvalue></measure><measure><xvalue>28</xvalue><yvalue>16</yvalue></measure><measure><xvalue>29</xvalue><yvalue>11</yvalue></measure><measure><xvalue>30</xvalue><yvalue>6</yvalue></measure><measure><xvalue>31</xvalue><yvalue>11</yvalue></measure><measure><xvalue>32</xvalue><yvalue>12</yvalue></measure><measure><xvalue>33</xvalue><yvalue>7</yvalue></measure><measure><xvalue>34</xvalue><yvalue>10</yvalue></measure><measure><xvalue>35</xvalue><yvalue>66</yvalue></measure><measure><xvalue>36</xvalue><yvalue>8</yvalue></measure><measure><xvalue>37</xvalue><yvalue>32</yvalue></measure><measure><xvalue>38</xvalue><yvalue>13</yvalue></measure><measure><xvalue>39</xvalue><yvalue>15</yvalue></measure><measure><xvalue>40</xvalue><yvalue>16</yvalue></measure><measure><xvalue>41</xvalue><yvalue>2</yvalue></measure></set></sets><minx>1</minx><maxx>52</maxx><miny>0</miny><maxy>66</maxy><title>Contracts by week for year 2006</title><yvalues><yvalue><value>20</value><label>20</label><gridline>true</gridline></yvalue><yvalue><value>40</value><label>40</label><gridline>true</gridline></yvalue><yvalue><value>60</value><label>60</label><gridline>true</gridline></yvalue></yvalues></graphData>
Added: branches/xml-class-rework/projects/bos/statistics/contracts-by-week.xsl
===================================================================
--- branches/xml-class-rework/projects/bos/statistics/contracts-by-week.xsl 2006-09-24 19:13:31 UTC (rev 1984)
+++ branches/xml-class-rework/projects/bos/statistics/contracts-by-week.xsl 2006-10-14 06:59:35 UTC (rev 1985)
@@ -0,0 +1,49 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<!--
+
+ File generated by translating loops into recursive template calls.
+ XSLT Loop Compiler, Version 1.0
+ GPL (c) O. Becker
+
+ -->
+<xsl:stylesheet xmlns:loop="http://informatik.hu-berlin.de/loop" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
+ <xsl:output method="xml"/>
+
+ <xsl:template match="/response">
+ <xsl:variable name="year">
+ <xsl:value-of select="substring(/response/week[1]/@key, 1, 4)"/>
+ </xsl:variable>
+ <xsl:variable name="max_contracts">
+ <xsl:for-each select="week">
+ <xsl:sort select="@contracts" data-type="number" order="descending"/>
+ <xsl:if test="position()=1"><xsl:value-of select="@contracts"/></xsl:if>
+ </xsl:for-each>
+ </xsl:variable>
+ <graphData>
+ <sets>
+ <set title="Contracts" marker-type="triangle" color="green">
+ <xsl:for-each select="week">
+ <measure>
+ <xvalue><xsl:value-of select="substring(@key, 6)"/></xvalue>
+ <yvalue><xsl:value-of select="@contracts"/></yvalue>
+ </measure>
+ </xsl:for-each>
+ </set>
+ </sets>
+ <minx>1</minx>
+ <maxx>52</maxx>
+ <miny>0</miny>
+ <maxy><xsl:value-of select="$max_contracts"/></maxy>
+ <title>Contracts by week for year <xsl:value-of select="$year"/></title>
+ <yvalues>
+ <xsl:call-template name="for-loop-id4477040"><xsl:with-param name="i" select="20"/><xsl:with-param name="toid4477040" select="$max_contracts"/><xsl:with-param name="stepid4477040" select="20"/><xsl:with-param name="year" select="$year"/><xsl:with-param name="max_contracts" select="$max_contracts"/></xsl:call-template>
+ </yvalues>
+ </graphData>
+ </xsl:template>
+<xsl:template name="for-loop-id4477040"><xsl:param name="i"/><xsl:param name="toid4477040"/><xsl:param name="stepid4477040"/><xsl:param name="year"/><xsl:param name="max_contracts"/>
+ <yvalue>
+ <value><xsl:value-of select="$i"/></value>
+ <label><xsl:value-of select="$i"/></label>
+ <gridline>true</gridline>
+ </yvalue>
+ <xsl:if test="$i+$stepid4477040 <= $toid4477040"><xsl:call-template name="for-loop-id4477040"><xsl:with-param name="i" select="$i + $stepid4477040"/><xsl:with-param name="toid4477040" select="$toid4477040"/><xsl:with-param name="stepid4477040" select="$stepid4477040"/><xsl:with-param name="year" select="$year"/><xsl:with-param name="max_contracts" select="$max_contracts"/></xsl:call-template></xsl:if></xsl:template></xsl:stylesheet>
Property changes on: branches/xml-class-rework/projects/bos/statistics/contracts-by-week.xsl
___________________________________________________________________
Name: svn:executable
+ *
Added: branches/xml-class-rework/projects/bos/statistics/loop-compiler.xslt
===================================================================
--- branches/xml-class-rework/projects/bos/statistics/loop-compiler.xslt 2006-09-24 19:13:31 UTC (rev 1984)
+++ branches/xml-class-rework/projects/bos/statistics/loop-compiler.xslt 2006-10-14 06:59:35 UTC (rev 1985)
@@ -0,0 +1,504 @@
+<?xml version="1.0"?>
+
+<!--
+ XSLT Loop Compiler,
+ translates iteration (for and while) into recursion
+ Version 1.0
+ GPL (c) Oliver Becker, 2000-07-06
+ obecker(a)informatik.hu-berlin.de
+-->
+
+<xslt:transform version="1.0"
+ xmlns:xslt="http://www.w3.org/1999/XSL/Transform"
+ xmlns:axslt="http://www.w3.org/1999/XSL/Transform/Alias"
+ xmlns:loop="http://informatik.hu-berlin.de/loop"
+ exclude-result-prefixes="loop">
+
+<xslt:namespace-alias stylesheet-prefix="axslt" result-prefix="xslt" />
+
+<xslt:output method="xml" indent="no" encoding="iso-8859-1" />
+
+
+<xslt:template match="/">
+ <!-- first validate ... -->
+ <xslt:variable name="errors">
+ <xslt:apply-templates mode="validate-loops" />
+ </xslt:variable>
+ <xslt:if test="string-length($errors)!=0">
+ <xslt:message terminate="yes">
+ <xslt:value-of select="string-length($errors)"/>
+ <xslt:text> error(s) detected</xslt:text>
+ </xslt:message>
+ </xslt:if>
+
+ <!-- ... then generate code -->
+ <xslt:comment>
+
+ File generated by translating loops into recursive template calls.
+ XSLT Loop Compiler, Version 1.0
+ GPL (c) O. Becker
+
+ </xslt:comment>
+ <xslt:apply-templates />
+</xslt:template>
+
+
+<!-- ====================== Validation code ======================= -->
+
+<xslt:template match="loop:for" mode="validate-loops">
+ <xslt:if test="not(@name!='')">
+ <xslt:message>
+ <xslt:text>Missing required attribute 'name' of '</xslt:text>
+ <xslt:value-of select="name()" />' <xslt:text />
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ </xslt:if>
+ <xslt:if test="not(@from!='')">
+ <xslt:message>
+ <xslt:text>Missing required attribute 'from' of '</xslt:text>
+ <xslt:value-of select="name()" />' <xslt:text />
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ </xslt:if>
+ <xslt:if test="not(@to!='')">
+ <xslt:message>
+ <xslt:text>Missing required attribute 'to' of '</xslt:text>
+ <xslt:value-of select="name()" />' <xslt:text />
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ </xslt:if>
+ <xslt:for-each select="@*">
+ <xslt:if test="name()!='name' and name()!='from' and
+ name()!='to' and name()!='step'">
+ <xslt:message>
+ <xslt:text>Unknown attribute '</xslt:text>
+ <xslt:value-of select="name()" />
+ <xslt:text>' of '</xslt:text>
+ <xslt:value-of select="name(..)" />' <xslt:text />
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ </xslt:if>
+ </xslt:for-each>
+ <xslt:apply-templates mode="validate-loops" />
+</xslt:template>
+
+<xslt:template match="loop:while" mode="validate-loops">
+ <xslt:if test="not(@test!='')">
+ <xslt:message>
+ <xslt:text>Missing required attribute 'test' of '</xslt:text>
+ <xslt:value-of select="name()" />' <xslt:text />
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ </xslt:if>
+ <xslt:for-each select="@*">
+ <xslt:if test="name()!='test'">
+ <xslt:message>
+ <xslt:text>Unknown attribute '</xslt:text>
+ <xslt:value-of select="name()" />
+ <xslt:text>' of '</xslt:text>
+ <xslt:value-of select="name(..)" />' <xslt:text />
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ </xslt:if>
+ </xslt:for-each>
+ <xslt:for-each select="*|text()">
+ <xslt:if test="not(self::xslt:variable or self::loop:do or
+ self::loop:last or self::loop:update or
+ (self::text() and normalize-space(.)=''))" >
+ <xslt:message>
+ <xslt:text>Forbidden </xslt:text>
+ <xslt:choose>
+ <xslt:when test="self::text()">
+ <xslt:text>text '</xslt:text>
+ <xslt:value-of select="normalize-space(.)" />
+ </xslt:when>
+ <xslt:otherwise>
+ <xslt:text>element '</xslt:text>
+ <xslt:value-of select="name()" />
+ </xslt:otherwise>
+ </xslt:choose>
+ <xslt:text>' - expected '</xslt:text>
+ <xslt:value-of
+ select="substring-before(name(//xslt:*),':')" />
+ <xslt:text>:variable', '</xslt:text>
+ <xslt:value-of select="substring-before(name(..),':')" />
+ <xslt:text>:do', '</xslt:text>
+ <xslt:value-of select="substring-before(name(..),':')" />
+ <xslt:text>:last' or '</xslt:text>
+ <xslt:value-of select="substring-before(name(..),':')" />
+ <xslt:text>:update'</xslt:text>
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ </xslt:if>
+ </xslt:for-each>
+ <xslt:if test="not(loop:update)">
+ <xslt:message>
+ <xslt:text />Warning: '<xslt:value-of select="name()" />
+ <xslt:text>' contains no '</xslt:text>
+ <xslt:value-of select="substring-before(name(..),':')" />
+ <xslt:text>:update' - infinite loop!</xslt:text>
+ </xslt:message>
+ </xslt:if>
+ <xslt:apply-templates mode="validate-loops" />
+</xslt:template>
+
+<xslt:template match="loop:while/xslt:variable" mode="validate-loops">
+ <xslt:choose>
+ <xslt:when test="preceding-sibling::loop:do">
+ <xslt:message>
+ <xslt:text />'<xslt:value-of select="name()" />
+ <xslt:text>' must not follow a preceding '</xslt:text>
+ <xslt:value-of select="substring-before(name(..),':')" />
+ <xslt:text>:do'</xslt:text>
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ </xslt:when>
+ <xslt:when test="preceding-sibling::loop:last">
+ <xslt:message>
+ <xslt:text />'<xslt:value-of select="name()" />
+ <xslt:text>' must not follow a preceding '</xslt:text>
+ <xslt:value-of select="substring-before(name(..),':')" />
+ <xslt:text>:last'</xslt:text>
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ </xslt:when>
+ <xslt:when test="preceding-sibling::loop:update">
+ <xslt:message>
+ <xslt:text />'<xslt:value-of select="name()" />
+ <xslt:text>' must not follow a preceding '</xslt:text>
+ <xslt:value-of select="substring-before(name(..),':')" />
+ <xslt:text>:update'</xslt:text>
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ </xslt:when>
+ </xslt:choose>
+</xslt:template>
+
+<xslt:template match="loop:do | loop:last" mode="validate-loops">
+ <xslt:if test="not(parent::loop:while)">
+ <xslt:message>
+ <xslt:text />'<xslt:value-of select="name()" />
+ <xslt:text>' must be an immediate child of '</xslt:text>
+ <xslt:value-of select="substring-before(name(),':')" />
+ <xslt:text>:while'</xslt:text>
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ </xslt:if>
+ <xslt:for-each select="@*">
+ <xslt:message>
+ <xslt:text>Unknown attribute '</xslt:text>
+ <xslt:value-of select="name()" />
+ <xslt:text>' of '</xslt:text>
+ <xslt:value-of select="name(..)" />' <xslt:text />
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ </xslt:for-each>
+ <xslt:choose>
+ <xslt:when test="self::loop:do and preceding-sibling::loop:do">
+ <xslt:message>
+ <xslt:text />'<xslt:value-of select="name()" />
+ <xslt:text>' must not follow a preceding '</xslt:text>
+ <xslt:value-of select="substring-before(name(),':')" />
+ <xslt:text>:do'</xslt:text>
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ </xslt:when>
+ <xslt:when test="preceding-sibling::loop:last">
+ <xslt:message>
+ <xslt:text />'<xslt:value-of select="name()" />
+ <xslt:text>' must not follow a preceding '</xslt:text>
+ <xslt:value-of select="substring-before(name(),':')" />
+ <xslt:text>:last'</xslt:text>
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ </xslt:when>
+ <xslt:when test="preceding-sibling::loop:update">
+ <xslt:message>
+ <xslt:text />'<xslt:value-of select="name()" />
+ <xslt:text>' must not follow a preceding '</xslt:text>
+ <xslt:value-of select="substring-before(name(),':')" />
+ <xslt:text>:update'</xslt:text>
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ </xslt:when>
+ </xslt:choose>
+ <xslt:apply-templates mode="validate-loops" />
+</xslt:template>
+
+<xslt:template match="loop:update" mode="validate-loops">
+ <xslt:if test="not(parent::loop:for) and not(parent::loop:while)">
+ <xslt:message>
+ <xslt:text />'<xslt:value-of select="name()" />
+ <xslt:text>' must be an immediate child of '</xslt:text>
+ <xslt:value-of select="substring-before(name(),':')" />
+ <xslt:text>:for' or '</xslt:text>
+ <xslt:value-of select="substring-before(name(),':')" />
+ <xslt:text>:while'</xslt:text>
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ </xslt:if>
+ <xslt:if test="not(@name!='')">
+ <xslt:message>
+ <xslt:text>Missing required attribute 'name' of '</xslt:text>
+ <xslt:value-of select="name()" />'<xslt:text/>
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ </xslt:if>
+ <xslt:for-each select="@*">
+ <xslt:if test="name()!='name' and name()!='select'">
+ <xslt:message>
+ <xslt:text>Unknown attribute '</xslt:text>
+ <xslt:value-of select="name()" />
+ <xslt:text>' of '</xslt:text>
+ <xslt:value-of select="name(..)" />' <xslt:text />
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ </xslt:if>
+ </xslt:for-each>
+ <xslt:if test="preceding-sibling::loop:update
+ [@name=current()/@name]">
+ <xslt:message>
+ <xslt:text />'<xslt:value-of select="name()" />
+ <xslt:text>' for variable '</xslt:text>
+ <xslt:value-of select="@name" />
+ <xslt:text>' already defined</xslt:text>
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ </xslt:if>
+ <xslt:call-template name="var-wrapper">
+ <xslt:with-param name="action" select="'validate-update'" />
+ <xslt:with-param name="loop-node" select=".." />
+ </xslt:call-template>
+ <xslt:apply-templates mode="validate-loops" />
+</xslt:template>
+
+<xslt:template match="loop:*" mode="validate-loops">
+ <xslt:message>
+ <xslt:text />Unknown element '<xslt:value-of select="name()" />
+ <xslt:text>'</xslt:text>
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ <xslt:apply-templates mode="validate-loops" />
+</xslt:template>
+
+<xslt:template match="text()" mode="validate-loops" />
+
+<!-- =================== End of validation ======================== -->
+
+
+
+<!-- ================= General template rules ===================== -->
+
+<xslt:template match="xslt:stylesheet | xslt:transform">
+ <xslt:copy>
+ <xslt:copy-of select="@*" />
+ <xslt:apply-templates />
+ <xslt:apply-templates mode="create-templates" />
+ </xslt:copy>
+</xslt:template>
+
+<xslt:template match="text()" mode="create-templates" />
+
+<xslt:template match="*">
+ <xslt:copy>
+ <xslt:copy-of select="@*" />
+ <xslt:apply-templates />
+ </xslt:copy>
+</xslt:template>
+
+<xslt:template match="comment()|processing-instruction()">
+ <xslt:copy />
+</xslt:template>
+
+
+
+<!-- ========================= for-loop =========================== -->
+
+<xslt:template match="loop:for">
+ <xslt:variable name="step">
+ <xslt:choose>
+ <xslt:when test="not(@step)">1</xslt:when>
+ <xslt:otherwise>
+ <xslt:value-of select="@step" />
+ </xslt:otherwise>
+ </xslt:choose>
+ </xslt:variable>
+ <xslt:variable name="id" select="generate-id()" />
+ <axslt:call-template name="for-loop-{$id}">
+ <axslt:with-param name="{@name}" select="{@from}" />
+ <axslt:with-param name="to{$id}" select="{@to}" />
+ <axslt:with-param name="step{$id}" select="{$step}" />
+ <xslt:call-template name="var-wrapper">
+ <xslt:with-param name="action"
+ select="'create-call-with-params'" />
+ </xslt:call-template>
+ </axslt:call-template>
+</xslt:template>
+
+
+<xslt:template match="loop:for" mode="create-templates">
+ <xslt:variable name="id" select="generate-id()" />
+
+ <axslt:template name="for-loop-{$id}">
+ <axslt:param name="{@name}" />
+ <axslt:param name="to{$id}" />
+ <axslt:param name="step{$id}" />
+ <xslt:call-template name="var-wrapper">
+ <xslt:with-param name="action" select="'create-loop-params'" />
+ </xslt:call-template>
+
+ <xslt:apply-templates />
+
+ <xslt:variable name="comp-op">
+ <xslt:choose>
+ <xslt:when test="@step < 0">>=</xslt:when>
+ <xslt:otherwise><=</xslt:otherwise>
+ </xslt:choose>
+ </xslt:variable>
+
+ <axslt:if test="${@name}+$step{$id} {$comp-op} $to{$id}">
+ <axslt:call-template name="for-loop-{$id}">
+ <axslt:with-param name="{@name}"
+ select="${@name} + $step{$id}" />
+ <axslt:with-param name="to{$id}" select="$to{$id}" />
+ <axslt:with-param name="step{$id}" select="$step{$id}" />
+ <xslt:call-template name="var-wrapper">
+ <xslt:with-param name="action"
+ select="'create-loop-with-params'" />
+ </xslt:call-template>
+ </axslt:call-template>
+ </axslt:if>
+ </axslt:template>
+
+ <xslt:apply-templates mode="create-templates" />
+</xslt:template>
+
+<!-- ============================================================== -->
+
+
+
+<!-- ====================== while-loop ============================ -->
+
+<xslt:template match="loop:while">
+ <axslt:call-template name="while-loop-{generate-id()}">
+ <xslt:call-template name="var-wrapper">
+ <xslt:with-param name="action"
+ select="'create-call-with-params'" />
+ </xslt:call-template>
+ </axslt:call-template>
+</xslt:template>
+
+
+<xslt:template match="loop:while" mode="create-templates">
+ <xslt:variable name="id" select="generate-id()" />
+
+ <axslt:template name="while-loop-{$id}">
+ <xslt:call-template name="var-wrapper">
+ <xslt:with-param name="action" select="'create-loop-params'" />
+ </xslt:call-template>
+
+ <xslt:copy-of select="xslt:variable" />
+ <axslt:choose>
+ <axslt:when test="{@test}">
+ <xslt:apply-templates select="loop:do" />
+ <axslt:call-template name="while-loop-{$id}">
+ <xslt:call-template name="var-wrapper">
+ <xslt:with-param name="action"
+ select="'create-loop-with-params'" />
+ </xslt:call-template>
+ </axslt:call-template>
+ </axslt:when>
+ <xslt:if test="loop:last">
+ <axslt:otherwise>
+ <xslt:apply-templates select="loop:last" />
+ </axslt:otherwise>
+ </xslt:if>
+ </axslt:choose>
+ </axslt:template>
+
+ <xslt:apply-templates mode="create-templates" />
+</xslt:template>
+
+
+<xslt:template match="loop:do | loop:last">
+ <xslt:apply-templates />
+</xslt:template>
+
+
+<xslt:template match="loop:update" />
+
+<!-- ============================================================== -->
+
+
+
+<!-- =================== variable wrapper ========================= -->
+<!-- separated because the expression for $vars was a little bit
+ difficult to determine -->
+
+<xslt:template name="var-wrapper">
+ <xslt:param name="action" />
+ <xslt:param name="loop-node" select="." />
+ <xslt:variable name="vars" select=
+ "$loop-node/ancestor-or-self::*/preceding-sibling::xslt:variable
+ [ancestor::xslt:template] |
+ $loop-node/ancestor-or-self::*/preceding-sibling::xslt:param
+ [ancestor::xslt:template] |
+ $loop-node/ancestor::loop:for" />
+ <xslt:choose>
+ <xslt:when test="$action='create-call-with-params'">
+ <xslt:for-each select="$vars">
+ <axslt:with-param name="{@name}" select="${@name}" />
+ </xslt:for-each>
+ </xslt:when>
+ <xslt:when test="$action='create-loop-params'">
+ <xslt:for-each select="$vars">
+ <axslt:param name="{@name}" />
+ </xslt:for-each>
+ </xslt:when>
+ <xslt:when test="$action='create-loop-with-params'">
+ <xslt:for-each select="$vars">
+ <xslt:variable name="update"
+ select="$loop-node/loop:update
+ [@name=current()/@name]" />
+ <xslt:choose>
+ <xslt:when test="$update">
+ <axslt:with-param name="{@name}">
+ <xslt:if test="$update/@select">
+ <xslt:attribute name="select">
+ <xslt:value-of select="$update/@select" />
+ </xslt:attribute>
+ </xslt:if>
+ <xslt:apply-templates select="$update"
+ mode="process-update" />
+ </axslt:with-param>
+ </xslt:when>
+ <xslt:otherwise>
+ <axslt:with-param name="{@name}" select="${@name}" />
+ </xslt:otherwise>
+ </xslt:choose>
+ </xslt:for-each>
+ </xslt:when>
+
+ <!-- the following is validation code -->
+ <xslt:when test="$action='validate-update'">
+ <xslt:if test="@name and not($vars[@name=current()/@name])">
+ <xslt:message>
+ <xslt:text>Cannot update variable '</xslt:text>
+ <xslt:value-of select="@name" />
+ <xslt:text>' - not locally visible at parent node '</xslt:text>
+ <xslt:value-of select="name(..)" />' <xslt:text />
+ </xslt:message>
+ <xslt:text>.</xslt:text>
+ </xslt:if>
+ </xslt:when>
+
+ </xslt:choose>
+</xslt:template>
+
+
+<xslt:template match="loop:update" mode="process-update">
+ <xslt:apply-templates />
+</xslt:template>
+
+
+</xslt:transform>
Property changes on: branches/xml-class-rework/projects/bos/statistics/loop-compiler.xslt
___________________________________________________________________
Name: svn:executable
+ *
1
0

24 Sep '06
Author: hhubner
Date: 2006-09-24 15:13:31 -0400 (Sun, 24 Sep 2006)
New Revision: 1984
Added:
branches/xml-class-rework/thirdparty/cl-mime/README
branches/xml-class-rework/thirdparty/cl-mime/cl-mime.asd
branches/xml-class-rework/thirdparty/cl-mime/encoding.lisp
branches/xml-class-rework/thirdparty/cl-mime/package.lisp
Removed:
branches/xml-class-rework/thirdparty/cl-mime/fundamentals.lisp
branches/xml-class-rework/thirdparty/cl-mime/mime.asd
Modified:
branches/xml-class-rework/thirdparty/cl-mime/classes.lisp
branches/xml-class-rework/thirdparty/cl-mime/headers.lisp
branches/xml-class-rework/thirdparty/cl-mime/parse-mime.lisp
branches/xml-class-rework/thirdparty/cl-mime/print-mime.lisp
branches/xml-class-rework/thirdparty/cl-mime/utilities.lisp
Log:
Update to cl-mime 0.5.1
Added: branches/xml-class-rework/thirdparty/cl-mime/README
===================================================================
--- branches/xml-class-rework/thirdparty/cl-mime/README 2006-09-15 14:21:24 UTC (rev 1983)
+++ branches/xml-class-rework/thirdparty/cl-mime/README 2006-09-24 19:13:31 UTC (rev 1984)
@@ -0,0 +1,9 @@
+This is a library for reading and printing MIME content. It supports
+automatic conversion between 7bit, quoted-printable and base64
+encodings via cl-base64 and cl-qprint libraries.
+
+The required libraries can be found at:
+http://files.b9.com/cl-base64/cl-base64-latest.tar.gz
+http://www.bobturf.org/software/cl-qprint
+http://weitz.de/cl-ppcre/
+
Added: branches/xml-class-rework/thirdparty/cl-mime/cl-mime.asd
===================================================================
--- branches/xml-class-rework/thirdparty/cl-mime/cl-mime.asd 2006-09-15 14:21:24 UTC (rev 1983)
+++ branches/xml-class-rework/thirdparty/cl-mime/cl-mime.asd 2006-09-24 19:13:31 UTC (rev 1984)
@@ -0,0 +1,42 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;; cl-mime.asd: System Definition
+;;;; Copyright (C) 2004 Robert Marlow <bobstopper(a)bobturf.org>
+;;;;
+;;;; This library is free software; you can redistribute it and/or
+;;;; modify it under the terms of the GNU Library General Public
+;;;; License as published by the Free Software Foundation; either
+;;;; version 2 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
+;;;; Library General Public License for more details.
+;;;;
+;;;; You should have received a copy of the GNU Library 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.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+
+(defpackage :cl-mime-system
+ (:use :asdf :cl))
+
+(in-package :cl-mime-system)
+
+(defsystem :cl-mime
+ :name "MIME"
+ :author "Robert Marlow <bobstopper(a)bobturf.org>"
+ :version "0.5.1"
+ :maintainer "Robert Marlow <bobstopper(a)bobturf.org>"
+ :depends-on (:cl-ppcre :cl-base64 :cl-qprint)
+ :serial t
+ :components
+ ((:file "package")
+ (:file "utilities")
+ (:file "classes")
+ (:file "headers")
+ (:file "encoding")
+ (:file "parse-mime")
+ (:file "print-mime")))
Modified: branches/xml-class-rework/thirdparty/cl-mime/classes.lisp
===================================================================
--- branches/xml-class-rework/thirdparty/cl-mime/classes.lisp 2006-09-15 14:21:24 UTC (rev 1983)
+++ branches/xml-class-rework/thirdparty/cl-mime/classes.lisp 2006-09-24 19:13:31 UTC (rev 1984)
@@ -47,7 +47,16 @@
(content-transfer-encoding
:accessor content-transfer-encoding
:initarg :encoding
- :initform "7bit")
+ :initform :7bit
+ :documentation
+ "Encoding to use when printing the MIME content.
+May be :7BIT :BASE64 or :QUOTED-PRINTABLE")
+ (content-encoding
+ :accessor content-encoding
+ :initarg :content-encoding
+ :initform :7bit
+ :documentation "Encoding the MIME content is currently in.
+May be :7BIT :BASE64 or :QUOTED-PRINTABLE")
(content-disposition
:accessor content-disposition
:initarg :disposition
Added: branches/xml-class-rework/thirdparty/cl-mime/encoding.lisp
===================================================================
--- branches/xml-class-rework/thirdparty/cl-mime/encoding.lisp 2006-09-15 14:21:24 UTC (rev 1983)
+++ branches/xml-class-rework/thirdparty/cl-mime/encoding.lisp 2006-09-24 19:13:31 UTC (rev 1984)
@@ -0,0 +1,46 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;; encoding.lisp: Tools for converting content encoding
+;;;; Copyright (C) 2004 Robert Marlow <bobstopper(a)bobturf.org>
+;;;;
+;;;; This library is free software; you can redistribute it and/or
+;;;; modify it under the terms of the GNU Library General Public
+;;;; License as published by the Free Software Foundation; either
+;;;; version 2 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
+;;;; Library General Public License for more details.
+;;;;
+;;;; You should have received a copy of the GNU Library 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.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+
+(in-package :mime)
+
+
+(defun encode-content (mime)
+ (if (eql (content-transfer-encoding mime)
+ (content-encoding mime))
+ (content mime)
+ (let ((content (decode-content mime)))
+ (ecase (content-transfer-encoding mime)
+ (:7bit content)
+ (:base64
+ (typecase content
+ (string (string-to-base64-string content :columns 75))
+ ((array (unsigned-byte 8))
+ (usb8-array-to-base64-string content :columns 75))))
+ (:quoted-printable (qprint:encode content 75))))))
+
+
+(defun decode-content (mime)
+ (ecase (content-encoding mime)
+ (:7bit (content mime))
+ (:base64 (base64-string-to-usb8-array (content mime)))
+ (:quoted-printable (qprint:decode (content mime)))))
+
Deleted: branches/xml-class-rework/thirdparty/cl-mime/fundamentals.lisp
===================================================================
--- branches/xml-class-rework/thirdparty/cl-mime/fundamentals.lisp 2006-09-15 14:21:24 UTC (rev 1983)
+++ branches/xml-class-rework/thirdparty/cl-mime/fundamentals.lisp 2006-09-24 19:13:31 UTC (rev 1984)
@@ -1,58 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; fundamentals.lisp: Package definition and any globals
-;;;; Copyright (C) 2004 Robert Marlow <bobstopper(a)bobturf.org>
-;;;;
-;;;; This library is free software; you can redistribute it and/or
-;;;; modify it under the terms of the GNU Library General Public
-;;;; License as published by the Free Software Foundation; either
-;;;; version 2 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
-;;;; Library General Public License for more details.
-;;;;
-;;;; You should have received a copy of the GNU Library 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.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-
-
-(defpackage :mime
- (:documentation "A package for constructing MIME objects for printing and
-parsing MIME formatted strings or streams.")
- (:nicknames :cl-mime)
- (:use :cl :kmrcl :cl-ppcre)
- (:shadow :read-stream-to-string)
- (:export :text-mime
- :multipart-mime
- :mime
- :make-content-id
- :content-type
- :content-subtype
- :content-type-parameters
- :content-id
- :content-description
- :content-transfer-encoding
- :content-disposition
- :content-disposition-parameters
- :mime-version
- :charset
- :boundary
- :prologue
- :epilogue
- :content
- :get-header
- :get-mime-headers
- :get-content-type-parameter
- :get-content-disposition-parameter
- :print-headers
- :header-value
- :header-parms
- :header-comments
- :print-mime
- :parse-mime))
-
-(in-package :mime)
Modified: branches/xml-class-rework/thirdparty/cl-mime/headers.lisp
===================================================================
--- branches/xml-class-rework/thirdparty/cl-mime/headers.lisp 2006-09-15 14:21:24 UTC (rev 1983)
+++ branches/xml-class-rework/thirdparty/cl-mime/headers.lisp 2006-09-24 19:13:31 UTC (rev 1984)
@@ -51,16 +51,16 @@
(defmethod get-header ((mime-obj mime) (header (eql :content-disposition)))
- (aif (slot-value mime-obj (intern (string header) :mime))
- (cons header
- (format nil "~A~A"
- (content-disposition mime-obj)
- (format nil "~{~{;~%~5,5T~A=\"~A\"~}~}"
- (mapcar
- (lambda (parm-pair)
- (cons (string-downcase (symbol-name (car parm-pair)))
- (cdr parm-pair)))
- (content-disposition-parameters mime-obj)))))))
+ (when (content-disposition mime-obj)
+ (cons header
+ (format nil "~A~A"
+ (content-disposition mime-obj)
+ (format nil "~{~{;~%~5,5T~A=\"~A\"~}~}"
+ (mapcar
+ (lambda (parm-pair)
+ (cons (string-downcase (symbol-name (car parm-pair)))
+ (cdr parm-pair)))
+ (content-disposition-parameters mime-obj)))))))
(defmethod get-header ((mime-obj mime) (header symbol))
Deleted: branches/xml-class-rework/thirdparty/cl-mime/mime.asd
===================================================================
--- branches/xml-class-rework/thirdparty/cl-mime/mime.asd 2006-09-15 14:21:24 UTC (rev 1983)
+++ branches/xml-class-rework/thirdparty/cl-mime/mime.asd 2006-09-24 19:13:31 UTC (rev 1984)
@@ -1,41 +0,0 @@
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;;;; mime.asd: System Definition
-;;;; Copyright (C) 2004 Robert Marlow <bobstopper(a)bobturf.org>
-;;;;
-;;;; This library is free software; you can redistribute it and/or
-;;;; modify it under the terms of the GNU Library General Public
-;;;; License as published by the Free Software Foundation; either
-;;;; version 2 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
-;;;; Library General Public License for more details.
-;;;;
-;;;; You should have received a copy of the GNU Library 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.
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-
-
-(defpackage :mime-system
- (:use :asdf :cl))
-
-(in-package :mime-system)
-
-(defsystem :mime
- :name "MIME"
- :author "Robert Marlow <rob(a)bobturf.org>"
- :version "0.3.0"
- :maintainer "Robert Marlow <rob(a)bobturf.org>"
- :depends-on (:kmrcl :cl-ppcre)
- :serial t
- :components
- ((:file "fundamentals")
- (:file "utilities")
- (:file "classes")
- (:file "headers")
- (:file "parse-mime")
- (:file "print-mime")))
Added: branches/xml-class-rework/thirdparty/cl-mime/package.lisp
===================================================================
--- branches/xml-class-rework/thirdparty/cl-mime/package.lisp 2006-09-15 14:21:24 UTC (rev 1983)
+++ branches/xml-class-rework/thirdparty/cl-mime/package.lisp 2006-09-24 19:13:31 UTC (rev 1984)
@@ -0,0 +1,62 @@
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+;;;; package.lisp: Package definition
+;;;; Copyright (C) 2004 Robert Marlow <bobstopper(a)bobturf.org>
+;;;;
+;;;; This library is free software; you can redistribute it and/or
+;;;; modify it under the terms of the GNU Library General Public
+;;;; License as published by the Free Software Foundation; either
+;;;; version 2 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
+;;;; Library General Public License for more details.
+;;;;
+;;;; You should have received a copy of the GNU Library 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.
+;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
+
+
+
+(defpackage :cl-mime
+ (:documentation "A package for constructing MIME objects for printing and
+parsing MIME formatted strings or streams.")
+ (:nicknames :mime)
+ (:use :cl :cl-ppcre :base64)
+ (:export :text-mime
+ :multipart-mime
+ :mime
+ :lookup-mime
+ :make-content-id
+ :content-type
+ :content-subtype
+ :content-type-parameters
+ :content-id
+ :content-description
+ :content-transfer-encoding
+ :content-disposition
+ :content-disposition-parameters
+ :mime-version
+ :charset
+ :boundary
+ :prologue
+ :epilogue
+ :content
+ :get-header
+ :get-mime-headers
+ :get-content-type-parameter
+ :get-content-disposition-parameter
+ :header-value
+ :header-parms
+ :header-comments
+ :print-mime
+ :print-headers
+ :parse-mime
+ :parse-body
+ :parse-headers
+ :decode-content
+ :encode-content))
+
+(in-package :mime)
Modified: branches/xml-class-rework/thirdparty/cl-mime/parse-mime.lisp
===================================================================
--- branches/xml-class-rework/thirdparty/cl-mime/parse-mime.lisp 2006-09-15 14:21:24 UTC (rev 1983)
+++ branches/xml-class-rework/thirdparty/cl-mime/parse-mime.lisp 2006-09-24 19:13:31 UTC (rev 1984)
@@ -29,8 +29,7 @@
(defmethod parse-mime ((mime string) &optional headers)
- (declare (ignore headers))
- (parse-mime (make-string-input-stream mime)))
+ (parse-mime (make-string-input-stream mime) headers))
(defmethod parse-mime ((mime stream) &optional headers)
@@ -56,19 +55,23 @@
(if (equal mime-version "1.0")
- (let ((mime-obj-gen
- (list
- mime-type
- :type content-type
- :subtype content-subtype
- ; :parameters content-parm
- :encoding (cdr (assoc :content-transfer-encoding
- headers))
- :description (cdr (assoc :content-description
- headers))
- :id (remove #\< (remove #\> (cdr (assoc :content-id headers))))
- :disposition content-disposition
- :disposition-parameters content-disposition-parm)))
+ (let* ((encoding (intern (or (string-upcase
+ (cdr (assoc :content-transfer-encoding
+ headers)))
+ "7BIT")
+ :keyword))
+ (mime-obj-gen
+ (list
+ mime-type
+ :type content-type
+ :subtype content-subtype
+ :encoding encoding
+ :content-encoding encoding
+ :description (cdr (assoc :content-description
+ headers))
+ :id (remove #\< (remove #\> (cdr (assoc :content-id headers))))
+ :disposition content-disposition
+ :disposition-parameters content-disposition-parm)))
(case mime-type
((text-mime)
@@ -289,3 +292,31 @@
(setq end-type 'end-mime))))
end-type)))
+
+(defparameter *mime-types-file*
+ (make-pathname :directory '(:absolute "etc")
+ :name "mime"
+ :type "types"))
+
+
+(defun lookup-mime (pathname &optional mime-types-file)
+ "Takes a PATHNAME argument and uses MIME-TYPES-FILE (or the system
+default) to determine the mime type of PATHNAME. Returns two values:
+the content type and the the content subtype"
+ (let ((extension (pathname-type pathname)))
+ (with-open-file
+ (mime (or mime-types-file *mime-types-file*) :direction :input)
+ (read-lines
+ (line mime)
+ ((register-groups-bind
+ (extensions)
+ ("^[^#\\s]+\\s+([^#]+)" line)
+ (find extension (split "\\s+" extensions)
+ :test #'string-equal))
+ (if (eq line 'eof)
+ (values "application" "octet-stream")
+ (register-groups-bind
+ (content-type content-subtype)
+ ("^([^\/]+)\/([^\\s]+)" line)
+ (values (or content-type "application")
+ (or content-subtype "octet-stream")))))))))
Modified: branches/xml-class-rework/thirdparty/cl-mime/print-mime.lisp
===================================================================
--- branches/xml-class-rework/thirdparty/cl-mime/print-mime.lisp 2006-09-15 14:21:24 UTC (rev 1983)
+++ branches/xml-class-rework/thirdparty/cl-mime/print-mime.lisp 2006-09-24 19:13:31 UTC (rev 1984)
@@ -30,10 +30,14 @@
(format nil "~A: ~A~%"
(if (eql :mime-version (car it))
"MIME-Version"
- (string-capitalize (symbol-name (car it))))
- (if (eql :content-id (car it))
- (format nil "<~A>" (cdr it))
- (cdr it))))
+ (string-capitalize (symbol-name (car it))))
+ (cond
+ ((eql :content-id (car it))
+ (format nil "<~A>" (cdr it)))
+ ((eql :content-transfer-encoding (car it))
+ (string-downcase (symbol-name (cdr it))))
+ (t
+ (cdr it)))))
headers-out))
@@ -68,6 +72,7 @@
(:documentation
"Prints a mime object's contents, optionally with headers"))
+
(defmethod print-mime (stream (mime-obj mime) headers-p version-p)
(format stream "~A~A"
(if headers-p
@@ -75,8 +80,8 @@
(print-headers nil (get-mime-headers mime-obj)
version-p)
(string #\newline))
- "")
- (content mime-obj)))
+ "")
+ (encode-content mime-obj)))
(defmethod print-mime (stream (mime-obj multipart-mime) headers-p version-p)
Modified: branches/xml-class-rework/thirdparty/cl-mime/utilities.lisp
===================================================================
--- branches/xml-class-rework/thirdparty/cl-mime/utilities.lisp 2006-09-15 14:21:24 UTC (rev 1983)
+++ branches/xml-class-rework/thirdparty/cl-mime/utilities.lisp 2006-09-24 19:13:31 UTC (rev 1984)
@@ -47,3 +47,18 @@
(,exit-clause t)
(princ ,line-var ,string-stream)
(terpri ,string-stream)))))
+
+
+;;; These macros stolen from KMRCL
+(defmacro aif (test then &optional else)
+ `(let ((it ,test))
+ (if it ,then ,else)))
+
+
+(defun ensure-keyword (name)
+ "Returns keyword for a name"
+ (etypecase name
+ (keyword name)
+ (string (nth-value 0 (intern (string-upcase name) :keyword)))
+ (symbol (nth-value 0 (intern (symbol-name name) :keyword)))))
+
1
0

15 Sep '06
Author: hhubner
Date: 2006-09-15 10:21:24 -0400 (Fri, 15 Sep 2006)
New Revision: 1983
Modified:
branches/xml-class-rework/bknr/src/skip-list/skip-list.lisp
Log:
Workaround for Kamen Tomov's problem with multiple inheritance.
Modified: branches/xml-class-rework/bknr/src/skip-list/skip-list.lisp
===================================================================
--- branches/xml-class-rework/bknr/src/skip-list/skip-list.lisp 2006-08-18 16:38:52 UTC (rev 1982)
+++ branches/xml-class-rework/bknr/src/skip-list/skip-list.lisp 2006-09-15 14:21:24 UTC (rev 1983)
@@ -159,7 +159,7 @@
(multiple-value-bind (update node)
(make-update sl key)
- (when (= (node-key node) key)
+ (when (and node (= (node-key node) key))
(do ((level 0 (1+ level)))
((= level (skip-list-level sl)))
(let ((next (node-forward update level)))
1
0

[bknr-cvs] r1982 - in branches/xml-class-rework/bknr/src: data indices rss
by bknr@bknr.net 18 Aug '06
by bknr@bknr.net 18 Aug '06
18 Aug '06
Author: hhubner
Date: 2006-08-18 12:38:52 -0400 (Fri, 18 Aug 2006)
New Revision: 1982
Modified:
branches/xml-class-rework/bknr/src/data/object.lisp
branches/xml-class-rework/bknr/src/data/package.lisp
branches/xml-class-rework/bknr/src/indices/indexed-class.lisp
branches/xml-class-rework/bknr/src/rss/rss.lisp
Log:
Add prepare-for-snapshot method for persistent objects. This method is
called before a snapshot is written and allows the object to perform
cleanup operations before it is written to the snapshot file. This can
be used, for example, to remove references to destroyed objects which
would not be a problem when restoring from a transaction log, but can't
be restored from a snapshot.
The rss module uses this to clean up the list of items in a channel. The
item list may contain dangling references that are filtered out upon access
to the item list. These dangling references are removed before a rss channel
object is written to the snapshot file.
Modified: branches/xml-class-rework/bknr/src/data/object.lisp
===================================================================
--- branches/xml-class-rework/bknr/src/data/object.lisp 2006-08-14 12:57:02 UTC (rev 1981)
+++ branches/xml-class-rework/bknr/src/data/object.lisp 2006-08-18 16:38:52 UTC (rev 1982)
@@ -473,6 +473,8 @@
:if-does-not-exist :create
:if-exists :supersede)
(let ((class-layouts (make-hash-table)))
+ (with-transaction (:prepare-for-snapshot)
+ (map-store-objects #'prepare-for-snapshot))
(map-store-objects (lambda (object) (when (subtypep (type-of object) 'store-object)
(encode-create-object class-layouts object s))))
(map-store-objects (lambda (object) (when (subtypep (type-of object) 'store-object)
@@ -581,6 +583,10 @@
(loop for (slot value) on slots-and-values by #'cddr
do (setf (slot-value object slot) value))))
+(defmethod prepare-for-snapshot (object)
+ nil)
+
+
(defun find-store-object (id-or-name &key (class 'store-object) query-function key-slot-name)
"mock up implementation of find-store-object api as in the old datastore"
(unless id-or-name
Modified: branches/xml-class-rework/bknr/src/data/package.lisp
===================================================================
--- branches/xml-class-rework/bknr/src/data/package.lisp 2006-08-14 12:57:02 UTC (rev 1981)
+++ branches/xml-class-rework/bknr/src/data/package.lisp 2006-08-18 16:38:52 UTC (rev 1982)
@@ -62,6 +62,7 @@
#:store-objects-of-class
#:all-store-objects
#:map-store-objects
+ #:prepare-for-snapshot
#:find-store-object
#:create-object-transaction
#:tx-make-object
Modified: branches/xml-class-rework/bknr/src/indices/indexed-class.lisp
===================================================================
--- branches/xml-class-rework/bknr/src/indices/indexed-class.lisp 2006-08-14 12:57:02 UTC (rev 1981)
+++ branches/xml-class-rework/bknr/src/indices/indexed-class.lisp 2006-08-18 16:38:52 UTC (rev 1982)
@@ -451,3 +451,4 @@
(slot-value object 'destroyed-p)
(unbound-slot () nil)
(simple-error () nil)))
+
Modified: branches/xml-class-rework/bknr/src/rss/rss.lisp
===================================================================
--- branches/xml-class-rework/bknr/src/rss/rss.lisp 2006-08-14 12:57:02 UTC (rev 1981)
+++ branches/xml-class-rework/bknr/src/rss/rss.lisp 2006-08-18 16:38:52 UTC (rev 1982)
@@ -50,6 +50,9 @@
(max-item-age :update :initform (* 4 7 3600))
(items :update :initform nil)))
+(defmethod prepare-for-snapshot ((channel rss-channel))
+ (setf (rss-channel-items channel) (remove-if #'object-destroyed-p (rss-channel-items channel))))
+
;; Mixin for items
(define-persistent-class rss-item ()
@@ -75,13 +78,18 @@
(dolist (slot '(title link description))
(render-mandatory-element channel slot))
- (dolist (item (remove-if-not #'rss-item-published (rss-channel-items channel)))
+ (dolist (item (remove-if-not #'(lambda (item)
+ (and (not (object-destroyed-p item))
+ (rss-item-published item)))
+ (rss-channel-items channel)))
(rss-item-xml item))))))
(defmethod rss-channel-items ((channel rss-channel))
"Return all non-expired items in channel."
(let ((expiry-time (- (get-universal-time) (rss-channel-max-item-age channel))))
- (remove-if (lambda (item) (< (rss-item-pub-date item) expiry-time)) (slot-value channel 'items))))
+ (remove-if (lambda (item) (or (object-destroyed-p item)
+ (< (rss-item-pub-date item) expiry-time)))
+ (slot-value channel 'items))))
(deftransaction rss-channel-cleanup (channel)
"Remove expired items from the items list. Can be used to reduce
1
0

14 Aug '06
Author: hhubner
Date: 2006-08-14 08:57:02 -0400 (Mon, 14 Aug 2006)
New Revision: 1981
Modified:
branches/xml-class-rework/projects/bos/worldpay-test/tags.lisp
Log:
Added left-out format which prevented worldpay payments from working
Modified: branches/xml-class-rework/projects/bos/worldpay-test/tags.lisp
===================================================================
--- branches/xml-class-rework/projects/bos/worldpay-test/tags.lisp 2006-08-13 14:43:32 UTC (rev 1980)
+++ branches/xml-class-rework/projects/bos/worldpay-test/tags.lisp 2006-08-14 12:57:02 UTC (rev 1981)
@@ -30,7 +30,7 @@
(sponsor (contract-sponsor contract)))
(change-slot-values sponsor 'bknr.web::email email)
(sponsor-set-country sponsor country)
- (contract-set-paidp contract "~A: paid via worldpay" (format-date-time))
+ (contract-set-paidp contract (format nil "~A: paid via worldpay" (format-date-time)))
(setf (get-template-var :master-code) (sponsor-master-code sponsor))
(setf (get-template-var :sponsor-id) (sponsor-id sponsor))))
(mapc #'emit-template-node children))
1
0

[bknr-cvs] r1980 - in branches/xml-class-rework/projects/bos/payment-website/infosystem: . bilder de en
by bknr@bknr.net 13 Aug '06
by bknr@bknr.net 13 Aug '06
13 Aug '06
Author: hhubner
Date: 2006-08-13 10:43:32 -0400 (Sun, 13 Aug 2006)
New Revision: 1980
Modified:
branches/xml-class-rework/projects/bos/payment-website/infosystem/bilder/uebersichtskarte_klein.gif
branches/xml-class-rework/projects/bos/payment-website/infosystem/de/satellitenkarte.htm
branches/xml-class-rework/projects/bos/payment-website/infosystem/en/satellitenkarte.htm
branches/xml-class-rework/projects/bos/payment-website/infosystem/javascript.js
Log:
Shrunk overview image so that more space is available for the POI list.
Modified: branches/xml-class-rework/projects/bos/payment-website/infosystem/bilder/uebersichtskarte_klein.gif
===================================================================
(Binary files differ)
Modified: branches/xml-class-rework/projects/bos/payment-website/infosystem/de/satellitenkarte.htm
===================================================================
--- branches/xml-class-rework/projects/bos/payment-website/infosystem/de/satellitenkarte.htm 2006-08-13 14:09:31 UTC (rev 1979)
+++ branches/xml-class-rework/projects/bos/payment-website/infosystem/de/satellitenkarte.htm 2006-08-13 14:43:32 UTC (rev 1980)
@@ -143,7 +143,7 @@
</form>
</div>
</div>
- <div id="UebersichtKlein" style="position:absolute; width:138px; height:132px; z-index:10; left: 10px; top: 79px;" class="KarteRahmen">
+ <div id="UebersichtKlein" style="position:absolute; width:138px; height:76px; z-index:10; left: 10px; top: 79px;" class="KarteRahmen">
<table width="138" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="InfoKopf">Übersichtskarte</td>
@@ -151,7 +151,7 @@
<tr>
<td align="center" valign="middle"><div id="UebersichtPosition" style="position:absolute; width:4px; height:4px; z-index:5"><img src="../bilder/spacer.gif" width="4" height="4" border="0"/></div>
<a href="#" class="Navigation" onclick="Uebersicht_anzeigen(); self.focus();">
- <img src="../bilder/uebersichtskarte_klein.gif" width="118" height="118" border="0"/>
+ <img src="../bilder/uebersichtskarte_klein.gif" width="118" height="62" border="0"/>
</a>
</td>
</tr>
@@ -200,7 +200,7 @@
<div id="Faehnchen" style="position:absolute; width:120px; height:15px; z-index:7; left: 169px; top: 100px; visibility: hidden;">
<img src="../bilder/spacer.gif" width="1" height="1"/>
</div>
- <div id="Uebersichthome" style="position:absolute; width:140px; height:20px; z-index:6; left: 10px; top: 220px; visibility: inherit;" class="Navigation">
+ <div id="Uebersichthome" style="position:absolute; width:140px; height:20px; z-index:6; left: 10px; top: 164px; visibility: inherit;" class="Navigation">
Points of Interest
<div id="UebersichtPoiNavi" style="position:absolute; width:125px; height:80px; z-index:7; left: 19px; top: 17px; visibility: inherit;"></div>
</div>
@@ -302,7 +302,7 @@
<div id="ThumbLink5" style="position:absolute; width:55px; height:55px; z-index:4; top: 73px; left: 60px; visibility: inherit;"><a href="#" onClick="ThumbVergoessern(5)"><img src="../bilder/spacer.gif" width="55" height="55" border="0"/></a></div>
<div id="ThumbLink6" style="position:absolute; width:55px; height:55px; z-index:4; top: 73px; left: 117px; visibility: inherit;"><a href="#" onClick="ThumbVergoessern(6)"><img src="../bilder/spacer.gif" width="55" height="55" border="0"/></a></div>
</div>
- <div id="home" style="position:absolute; width:140px; height:20px; z-index:6; left: 10px; top: 218px; visibility: inherit;" class="NavigationAktiv">
+ <div id="home" style="position:absolute; width:140px; height:20px; z-index:6; left: 10px; top: 164px; visibility: inherit;" class="NavigationAktiv">
Points of Interest
<div id="PoiNavi" style="position:absolute; width:125px; height:80px; z-index:7; left: 19px; top: 17px; visibility: inherit;"></div>
</div>
Modified: branches/xml-class-rework/projects/bos/payment-website/infosystem/en/satellitenkarte.htm
===================================================================
--- branches/xml-class-rework/projects/bos/payment-website/infosystem/en/satellitenkarte.htm 2006-08-13 14:09:31 UTC (rev 1979)
+++ branches/xml-class-rework/projects/bos/payment-website/infosystem/en/satellitenkarte.htm 2006-08-13 14:43:32 UTC (rev 1980)
@@ -143,7 +143,7 @@
</form>
</div>
</div>
- <div id="UebersichtKlein" style="position:absolute; width:138px; height:132px; z-index:10; left: 10px; top: 79px;" class="KarteRahmen">
+ <div id="UebersichtKlein" style="position:absolute; width:138px; height:76px; z-index:10; left: 10px; top: 79px;" class="KarteRahmen">
<table width="138" border="0" cellspacing="0" cellpadding="0">
<tr>
<td class="InfoKopf">Overview</td>
@@ -151,7 +151,7 @@
<tr>
<td align="center" valign="middle"><div id="UebersichtPosition" style="position:absolute; width:4px; height:4px; z-index:5"><img src="../bilder/spacer.gif" width="4" height="4" border="0"/></div>
<a href="#" class="Navigation" onclick="Uebersicht_anzeigen(); self.focus();">
- <img src="../bilder/uebersichtskarte_klein.gif" width="118" height="118" border="0"/>
+ <img src="../bilder/uebersichtskarte_klein.gif" width="118" height="62" border="0"/>
</a>
</td>
</tr>
@@ -200,7 +200,7 @@
<div id="Faehnchen" style="position:absolute; width:120px; height:15px; z-index:7; left: 169px; top: 100px; visibility: hidden;">
<img src="../bilder/spacer.gif" width="1" height="1"/>
</div>
- <div id="Uebersichthome" style="position:absolute; width:140px; height:20px; z-index:6; left: 10px; top: 220px; visibility: inherit;" class="Navigation">
+ <div id="Uebersichthome" style="position:absolute; width:140px; height:20px; z-index:6; left: 10px; top: 164px; visibility: inherit;" class="Navigation">
Points of Interest
<div id="UebersichtPoiNavi" style="position:absolute; width:125px; height:80px; z-index:7; left: 19px; top: 17px; visibility: inherit;"></div>
</div>
@@ -296,7 +296,7 @@
<div id="ThumbLink5" style="position:absolute; width:55px; height:55px; z-index:4; top: 73px; left: 60px; visibility: inherit;"><a href="#" onClick="ThumbVergoessern(5)"><img src="../bilder/spacer.gif" width="55" height="55" border="0"/></a></div>
<div id="ThumbLink6" style="position:absolute; width:55px; height:55px; z-index:4; top: 73px; left: 117px; visibility: inherit;"><a href="#" onClick="ThumbVergoessern(6)"><img src="../bilder/spacer.gif" width="55" height="55" border="0"/></a></div>
</div>
- <div id="home" style="position:absolute; width:140px; height:20px; z-index:6; left: 10px; top: 218px; visibility: inherit;" class="NavigationAktiv">
+ <div id="home" style="position:absolute; width:140px; height:20px; z-index:6; left: 10px; top: 164px; visibility: inherit;" class="NavigationAktiv">
Points of Interest
<div id="PoiNavi" style="position:absolute; width:125px; height:80px; z-index:7; left: 19px; top: 17px; visibility: inherit;"></div>
</div>
Modified: branches/xml-class-rework/projects/bos/payment-website/infosystem/javascript.js
===================================================================
--- branches/xml-class-rework/projects/bos/payment-website/infosystem/javascript.js 2006-08-13 14:09:31 UTC (rev 1979)
+++ branches/xml-class-rework/projects/bos/payment-website/infosystem/javascript.js 2006-08-13 14:43:32 UTC (rev 1980)
@@ -966,7 +966,7 @@
// setzen des Positionskaestchens auf der kleinen �bersichtskarte
uebersicht_x = parseInt(((the_poi['x'] / 10800) * 118) + 8);
- uebersicht_y = parseInt(((the_poi['y'] / 10800) * 118) + 8);
+ uebersicht_y = parseInt(((the_poi['y'] / 10800) * 118) + 8) - 37;
document.getElementById("UebersichtPosition").style.left = uebersicht_x + "px";
document.getElementById("UebersichtPosition").style.top = uebersicht_y + "px";
@@ -1138,10 +1138,14 @@
}
// setzen des Positionskaestchens auf der kleinen �bersichtskarte
- var uebersicht_x = parseInt(((x_koord / 10800) * 118) + 14)
- var uebersicht_y = parseInt(((y_koord / 10800) * 118 ) + 10)
- if (uebersicht_y < 13) {uebersicht_y = 13};
- if (uebersicht_x > 125) {uebersicht_x = 125};
+ var uebersicht_x = parseInt(((x_koord / 10800) * 118) + 14);
+ var uebersicht_y = parseInt(((y_koord / 10800) * 118 ) + 10) - 37;
+ if (uebersicht_y < 13) {
+ uebersicht_y = 13;
+ }
+ if (uebersicht_x > 125) {
+ uebersicht_x = 125;
+ }
document.getElementById("UebersichtPosition").style.left = uebersicht_x + "px";
document.getElementById("UebersichtPosition").style.top = uebersicht_y + "px";
1
0

13 Aug '06
Author: hhubner
Date: 2006-08-13 10:09:31 -0400 (Sun, 13 Aug 2006)
New Revision: 1979
Added:
branches/xml-class-rework/projects/bos/worldpay-test/contract-rss.lisp
Modified:
branches/xml-class-rework/projects/bos/worldpay-test/boi-handlers.lisp
branches/xml-class-rework/projects/bos/worldpay-test/sponsor-handlers.lisp
branches/xml-class-rework/projects/bos/worldpay-test/tags.lisp
Log:
log payment time and method for tracing
Modified: branches/xml-class-rework/projects/bos/worldpay-test/boi-handlers.lisp
===================================================================
--- branches/xml-class-rework/projects/bos/worldpay-test/boi-handlers.lisp 2006-08-13 13:31:52 UTC (rev 1978)
+++ branches/xml-class-rework/projects/bos/worldpay-test/boi-handlers.lisp 2006-08-13 14:09:31 UTC (rev 1979)
@@ -82,7 +82,9 @@
(when (contract-paidp contract)
(error "contract has already been paid for"))
(with-transaction (:contract-paid)
- (contract-set-paidp contract t)
+ (contract-set-paidp contract (format nil "~A: manually set paid by ~A"
+ (format-date-time)
+ (user-login (bknr-request-user req))))
(when name
(setf (user-full-name (contract-sponsor contract)) name))))
(with-xml-response ()
Added: branches/xml-class-rework/projects/bos/worldpay-test/contract-rss.lisp
===================================================================
--- branches/xml-class-rework/projects/bos/worldpay-test/contract-rss.lisp 2006-08-13 13:31:52 UTC (rev 1978)
+++ branches/xml-class-rework/projects/bos/worldpay-test/contract-rss.lisp 2006-08-13 14:09:31 UTC (rev 1979)
@@ -0,0 +1,28 @@
+(in-package :bos.m2)
+
+(defmethod rss-item-channel ((contract contract))
+ "news")
+
+(defmethod rss-item-published ((contract contract))
+ (contract-paidp contract))
+
+(defmethod rss-item-title ((contract contract))
+ (format nil (case (intern (worldpay-test::current-website-language))
+ (de "~A Quadratmeter wurden ~@[von ~A ~]gekauft")
+ (t "~A square meters bought~@[ by ~A~]"))
+ (length (contract-m2s contract))
+ (user-full-name (contract-sponsor contract))))
+
+(defmethod rss-item-description ((contract contract))
+ (rss-item-title contract))
+
+(defmethod rss-item-link ((contract contract))
+ #+(or)
+ (format nil "http://createrainforest.org/~A/news-extern/~A" (worldpay-test::current-website-language) (store-object-id item)))
+
+(defmethod rss-item-guid ((item contract))
+ #+(or)
+ (format nil "http://createrainforest.org/~A/news-extern/~A" (worldpay-test::current-website-language) (store-object-id item)))
+
+(defmethod rss-item-pub-date ((contract contract))
+ (contract-date contract))
Modified: branches/xml-class-rework/projects/bos/worldpay-test/sponsor-handlers.lisp
===================================================================
--- branches/xml-class-rework/projects/bos/worldpay-test/sponsor-handlers.lisp 2006-08-13 13:31:52 UTC (rev 1978)
+++ branches/xml-class-rework/projects/bos/worldpay-test/sponsor-handlers.lisp 2006-08-13 14:09:31 UTC (rev 1979)
@@ -30,20 +30,24 @@
(when count
(setf count (parse-integer count)))
(with-bos-cms-page (req :title "Sponsor search results")
- (:table
- (:tr (:th "ID") (:th "Date") (:th "Email") (:th "Name"))
+ ((:table :border "1")
+ (:tr (:th "ID") (:th "Date") (:th "Email") (:th "Name") (:th "SQM") (:th "Cert-Type") (:th "Paid by"))
(dolist (sponsor (sort (remove-if-not #'sponsor-contracts (class-instances 'sponsor))
#'> :key #'(lambda (sponsor) (contract-date (first (sponsor-contracts sponsor))))))
(when (or count
(or (ignore-errors (scan regex (user-full-name sponsor)))
(ignore-errors (scan regex (user-email sponsor)))))
- (html (:tr (:td (cmslink #?"edit-sponsor/$((store-object-id sponsor))" (:princ-safe (store-object-id sponsor))))
- (:td (:princ-safe (format-date-time (contract-date (first (sponsor-contracts sponsor))) :show-time nil)))
- (:td (:princ-safe (or (user-email sponsor) "<unknown>")))
- (:td (:princ-safe (or (user-full-name sponsor) "<unknown>")))))
+ (let ((contract (first (sponsor-contracts sponsor))))
+ (html (:tr (:td (cmslink #?"edit-sponsor/$((store-object-id sponsor))" (:princ-safe (store-object-id sponsor))))
+ (:td (:princ-safe (format-date-time (contract-date contract) :show-time nil)))
+ (:td (:princ-safe (or (user-email sponsor) "<unknown>")))
+ (:td (:princ-safe (or (user-full-name sponsor) "<unknown>")))
+ (:td (:princ-safe (length (contract-m2s contract))))
+ (:td (:princ-safe (if (contract-download-only-p contract) "Download" "Print")))
+ (:td (:princ-safe (contract-paidp contract))))))
(when (eql (incf found) count)
(return))))
- (:tr ((:th :colspan "4") (:princ-safe (format nil "~A sponsor~:p ~A" found (if count "shown" "found"))))))))
+ (:tr ((:th :colspan "7") (:princ-safe (format nil "~A sponsor~:p ~A" found (if count "shown" "found"))))))))
(return-from handle-object-form)))
(with-bos-cms-page (req :title "Find or Create Sponsor")
(html
@@ -203,7 +207,8 @@
(progn
(html (:h2 "Completing square meter sale"))
(sponsor-set-country (contract-sponsor contract) country)
- (contract-set-paidp contract t)
+ (contract-set-paidp contract (format nil "~A: wire transfer processed by ~A"
+ (format-date-time) (user-login (bknr-request-user req))))
(contract-issue-cert contract name :address postaladdress :language language)
(when email
(html (:p "Sending instruction email to " (:princ-safe email)))
Modified: branches/xml-class-rework/projects/bos/worldpay-test/tags.lisp
===================================================================
--- branches/xml-class-rework/projects/bos/worldpay-test/tags.lisp 2006-08-13 13:31:52 UTC (rev 1978)
+++ branches/xml-class-rework/projects/bos/worldpay-test/tags.lisp 2006-08-13 14:09:31 UTC (rev 1979)
@@ -30,7 +30,7 @@
(sponsor (contract-sponsor contract)))
(change-slot-values sponsor 'bknr.web::email email)
(sponsor-set-country sponsor country)
- (contract-set-paidp contract t)
+ (contract-set-paidp contract "~A: paid via worldpay" (format-date-time))
(setf (get-template-var :master-code) (sponsor-master-code sponsor))
(setf (get-template-var :sponsor-id) (sponsor-id sponsor))))
(mapc #'emit-template-node children))
1
0