Re: [Jscodee-devel] More progress on updating the XSLT
Status: Alpha
Brought to you by:
garyfred
From: Gary F. <gar...@js...> - 2003-02-14 11:23:20
|
On Fri, 2003-02-14 at 04:42, Allen Demers wrote: > What is the svg XSLT for? What are you translating it to? I am a > little unclear about what is happening I think... > > Allen Glad you asked!!! Here is a long answer:-) JSCode is an XML application. The XML lets us represent programs. We use XSLT to generate MindScript, NQC and SVG. The SVG displays the program in blocks like this http://jscodee.sourceforge.net/jscode/images/box.png That image came from an SVG file. The SVG file was generated from an XML file that was processed by an XSLT stylesheet that converts JSCode XML into SVG. phew :-) So, we use our html pages to create XML. To add 1.0 to var1, start here http://jscodee.sourceforge.net/jscode/buildBlocks/basic/Add.html the JSCode XML is <block kind="basic" name="Add"> <param kind="variable">var1</param> <param kind="value">1.0</param> </block> We add that XML to a program. We can generate Mindscript var1 = 100 or perhaps NQC or Java var1 = 100; or SVG. The SVG would be something like this: <rect stroke="black" fill="forestgreen" rx="5px" y="51px" x="55px" width="80px" height="60px"/> <rect stroke="black" fill="yellow" y="106px" x="65px" width="60px" height="8px"/> <rect stroke="black" fill="forestgreen" y="60px" x="129px" width="12px" height="42px"/> <text fill="white" x="65" y="77">Set</text> <text fill="white" x="59" y="91">var1 = 1.0</text> We get MindScript or SVG or Java because we have XSLT stylesheets that translate JSCode XML. I'm updating the XSLT to understand V0.3 JSCode XML. When that is done, we can update the SVG generated to use CSS. If we want to be able to change the color of a basic block from forestgreen to some other color, we will change the SVG something like this <rect class="basicBlock" rx="5px" y="51px" x="55px" width="80px" height="60px"/> and have CSS that sets or resets the stroke and fill for anything of the 'class' "basicBlock". and... I'm using the SVG to get graphics. Some day when most browsers support SVG out of the box, we can display the graphics directly. Till then I generate images so everyone can see them. Some day... Better? Gary The original message. http://sourceforge.net/mailarchive/forum.php?thread_id=1650986&forum_id=23380 |