Project

Profile

Help

still xsl:script problem

Added by Anonymous over 19 years ago

Legacy ID: #2912115 Legacy Poster: Jim Yin (xpdz)

I'm very new to xsl and saxon, I'm using saxonb8.2 and JDK1.5. I got the seem error with http://sourceforge.net/forum/message.php?msg_id=2729365 when I evaluating the ChartSVG project(http://www.hardcoded.net/chartsvg/). I changed the xsl version to 1.1 and still got the error(Unknown XSLT element: script). Can you give me some sample code about how to use xsl:script in java? below is the xsl from ChartSVG: <?xml version="1.0"?> ... <xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:math="http://exslt.org/math" extension-element-prefixes="math"> <xsl:script implements-prefix="math" language="java" src="java:java.lang.Math" /> <xsl:output method="xml" doctype-public="-//W3C//DTD SVG 1.0//EN" doctype-system="http://www.w3.org/TR/SVG/DTD/svg10.dtd" indent="yes"/> <xsl:template name="draw_pie"> <!-- This is called when the main script processes the 'series' element --> TIA xpdz


Replies (1)

RE: still xsl:script problem - Added by Anonymous over 19 years ago

Legacy ID: #2912302 Legacy Poster: Michael Kay (mhkay)

There is no xsl:script element in either XSLT 1.0 or XSLT 2.0. There was an xsl:script element in the draft XSLT 1.1, but this never progressed beyond a working draft. To see how to call Java methods see the documentation sections on extensions and extensibility. For supported EXSLT functions, you don't need to declare anything: just use the correct namespace, and it will all work. extension-element-prefixes is for extension instructions, not extension functions. Michael Kay

    (1-1/1)

    Please register to reply