Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Technoology (for whom) ??

From: reffy:ulrich at: 22-Oct-2002 17:07

Hi List, I used to enjoy reading technoology books "for the common man" ... I would love to share the following from Microsoft's "XML Pocket Consultant" A fast-answers guide to XML technologies and standards Provides quick-reference tables, lists, step-by-step instructions, and code samples I like the book, it is physically small and can be carted to a coffee shop without hernia-ville ... Now, like most everyone on the list, I am reading this XML stuff because I fancy myself as someone who enjoys TRYING to keep up with what is happening in the techno world ... Passing Parameter Values to Templates <xsl:template name="SquareOrRectangleArea"> <xsl:param name="width" /> <xsl:param name="height" /> <xsl:value-of select="$width * $height" /> </xsl:template> Now, to invoke the function that was just defined: <xsl:call-template name="SquareOrRectangleArea"> <xsl:with-param name="width" select="10" /> <xsl:with-param name="height" select="20" /> </xsl:call-template> The resulting output from this template call is: 200 Now, can't we just see the smile on this Author's face at getting this into the book? Of course, he had a typo, which I corrected for our benefit. And, I have been wanting to learn this stuff??? I must have lost it somewhere along the way!! Who is all of this new techno stuff for? --------------------------------------------------------------------------------------------- Define a function Define r Is SquareOrRectangleArea wh { r Is */ wh } Now, to invoke the function that was just defined: SquareOrRectangleArea 10 20 200 --------------------------------------------------------------------------------------------------------------- I agree with Petr and Scott ... where are we, and where are we headed???? Assume that */ is a reduction operation, reducing the rank of the right argument by 1, by inserting * in between the elements to yield a product. This yields a single number in the case of a vector of numbers, and would yield row products if the right argument is a matrix. If desired, the coordinate may be specified along which the operation will take place. So *[1]/ would operate along the first coordinate to yield column products, etc. --------------------------------------------------------------------------------------------------------------- You can probably figure out what +/ 10 20 30 would yield? --------------------------------------------------------------------------------------------------------------- I am not sure if I should be impressed that any particular browser can read and execute XML, XSL, XSLT, FO, XPATH, etc. --------------------------------------------------------------------------------------------------------------- I often wonder, what if some other language instead of HTML had gotten there first, what would it be like to code up a web page? Cheers, Dick