Thread: [Jscodee-devel] More progress on updating the XSLT
Status: Alpha
Brought to you by:
garyfred
From: Gary F. <gar...@js...> - 2003-02-13 11:59:48
|
When we moved the JSCode XML to V0.3, the XSLT stylesheets were not updated. They sorta worked but did not do everything they needed to do to generate code. The V0.2 XML had info for each language that made the XSLT somewhat easier to write. V0.3 requires the XSLT 'do more'. I have the XSLT for going from JSCode to MindScript working pretty well. I did a bit with the NQC XSLT to see how hard it will be to update the various languages. It will be easy. I have the XSLT that generates SVG updated. That was actually easier than MindScript. And I added much better support for tasks and MindScript watcher tasks and variables and constant declarations and the select statement :-) I just added XML for sensors and declaring events // these MindScript statements sensor t on 3 t is switch as boolean event touched when t.pressed are generated from this XML <block kind="basic" name="Sensor"> <param kind="variable">t</param> <param kind="value">3</param> </block> <block kind="basic" name="SensorAssign"> <param kind="variable">t</param> <param kind="type">switch</param> <param kind="mode">boolean</param> </block> <block kind="basic" name="Event"> <param kind="variable">touched</param> <param kind="value">t.pressed</param> </block> The above may change a bit before it is final. For example, I have the 'kind' of block as "basic". That was to pick up the SVG image for a basic block when generating SVG. I may make it another kind, like what I did to get the Spybot specific blocks. I have not built the web pages for these blocks yet. If someone wants to try their hand at building those pages, let me know. I would like to have a different image for them, close to the images we have but different enough to make it easy to see they are not basic blocks. I'm going to continue working with the MindScript and SVG XSLT. Then I'll update the NQC XSLT then the other pages. I plan on having everything ready to be V0.3 by the end of February. Back to XSLT land :-) Gary |
From: Allen D. <far...@be...> - 2003-02-14 02:42:24
|
What is the svg XSLT for? What are you translating it to? I am a little unclear about what is happening I think... Allen Gary Frederick wrote: > When we moved the JSCode XML to V0.3, the XSLT stylesheets were not > updated. They sorta worked but did not do everything they needed to do > to generate code. The V0.2 XML had info for each language that made the > XSLT somewhat easier to write. V0.3 requires the XSLT 'do more'. > > I have the XSLT for going from JSCode to MindScript working pretty well. > I did a bit with the NQC XSLT to see how hard it will be to update the > various languages. It will be easy. I have the XSLT that generates SVG > updated. That was actually easier than MindScript. > > And I added much better support for tasks and MindScript watcher tasks > and variables and constant declarations and the select statement :-) > > I just added XML for sensors and declaring events > > // these MindScript statements > sensor t on 3 > t is switch as boolean > event touched when t.pressed > > are generated from this XML > > <block kind="basic" name="Sensor"> > <param kind="variable">t</param> > <param kind="value">3</param> > </block> > <block kind="basic" name="SensorAssign"> > <param kind="variable">t</param> > <param kind="type">switch</param> > <param kind="mode">boolean</param> > </block> > <block kind="basic" name="Event"> > <param kind="variable">touched</param> > <param kind="value">t.pressed</param> > </block> > > The above may change a bit before it is final. For example, I have the > 'kind' of block as "basic". That was to pick up the SVG image for a > basic block when generating SVG. I may make it another kind, like what I > did to get the Spybot specific blocks. > > I have not built the web pages for these blocks yet. If someone wants to > try their hand at building those pages, let me know. I would like to > have a different image for them, close to the images we have but > different enough to make it easy to see they are not basic blocks. > > I'm going to continue working with the MindScript and SVG XSLT. Then > I'll update the NQC XSLT then the other pages. I plan on having > everything ready to be V0.3 by the end of February. > > Back to XSLT land :-) > > Gary > > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Jscodee-devel mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscodee-devel > |
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 |
From: Allen D. <far...@be...> - 2003-02-14 11:49:18
|
So you use one source file to generate the code for mindscript, the code to display for the user and the code to define what is being shown to make it all pretty? They all then get piped together to form one HTML file? If that is right, that is cool! Allen Gary Frederick wrote: > 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 > > > > > ------------------------------------------------------- > This SF.NET email is sponsored by: FREE SSL Guide from Thawte > are you planning your Web Server Security? Click here to get a FREE > Thawte SSL guide and find the answers to all your SSL security issues. > http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en > _______________________________________________ > Jscodee-devel mailing list > Jsc...@li... > https://lists.sourceforge.net/lists/listinfo/jscodee-devel > |