Altova Mailing List Archives>Archive Index >microsoft.public.xsl Archive Home >Recent entries >Thread Prev - Newbie Question on msxsl:script [Thread Next] RE: Newbie Question on msxsl:scriptTo: NULL Date: 11/10/2006 1:29:00 AM
a syntax example i must use in this case
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
xmlns:fo="http://www.w3.org/XSL/Format/1.0" version="1.1"
xmlns:msxml="urn:schemas-microsoft-com:xslt" xmlns:SC="autre"
extension-element-prefixes="SC msxml">
<xsl:template match="/">
<r>
<xsl:value-of select="SC:resul(/r)"/>
</r>
</xsl:template>
<msxml:script language="JScript" implements-prefix="SC"><![CDATA[
var truc
function resul(truc) {
var test;
test=truc;
return test;
}
]]></msxml:script>
</xsl:stylesheet>
--
My english is (very) rusted, please, don't hesitate to correct me
Thanks
redacteur/moderateur xml sur developpez.com
"Kkaa" wrote:
> The following code gives me a "Reference to undeclared namespace
> prefix: 'trig'" error. Any help would be appreciated:
>
> in test.xslt:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
> <xsl:include href="trig.xslt"/>
> <xsl:output method="text"/>
> <xsl:value-of select="trig:cos(0.5)"/>
> </xsl:stylesheet>
>
> in trig.xslt:
>
> <?xml version="1.0" encoding="UTF-8"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> xmlns:msxsl="urn:schemas-microsoft-com:xslt"
> extension-element-prefixes="msxsl">
> <msxsl:script language="JavaScript" implements-prefix="trig">
> <![CDATA[
> function cos(arg){ return Math.cos(arg);}
> ]]>
> </msxsl:script>
> </xsl:stylesheet>
>
> Thanks!
>
>
| ||||||
| Company | Legal | Press | Partners | Careers | Sitemap | Contact Us | Altova Blog | Mobile | Full Site | |||
|
