[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: literal result element as stylesheet with JavaScri

Subject: Re: literal result element as stylesheet with JavaScript?
From: "cutlass" <cutlass@xxxxxxxxxxx>
Date: Wed, 5 Dec 2001 18:25:02 -0000
literal result element as stylesheet
the reason why u get this error is because

you need the namespace defined in the stylesheet ,and.....

.......what is confusing me is why u have this constructed to use literal
result elements

if u move the namespaces into stylesheet and move msxsl:script as a top
level this will help you to get something working.....

but only u know why u need this particular construction.

cheers, jim fuller

----- Original Message -----
From: "Dan Diebolt" <dandiebolt@xxxxxxxxx>
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Sent: Wednesday, December 05, 2001 6:01 PM
Subject:  literal result element as stylesheet with JavaScript?


> Is there a way to include JavaScript in a 'literal result element
> as stylesheet'? I tried the attached but obtain an error:
>
>   "Namespace 'mynamespace' does not contain any functions."
>
> I am suspecting that <msxsl:script> must be a "top-level" element
> and may be impossilbe within 'literal result element as stylesheet'.
>
> Are there any workarounds?
>
> -------------------------------------------------------
> <html xsl:version="1.0"
>        xmlns="http://www.w3.org/TR/xhtml1/strict"
>        xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>        xmlns:msxsl="urn:schemas-microsoft-com:xslt"
>        xmlns:user="mynamespace">
>
>   <msxsl:script language="javascript" implements-prefix="user">
>    <![CDATA[
>     function foo(arg) {
>       return foo*foo;
>     }
>    ]]>
>   </msxsl:script>
>
>   <head>
>    <title>Literal Result Element as Stylesheet</title>
>   </head>
>   <body>
>    <xsl:value-of select="user:foo(number(tag))"/>
>   </body>
> </html>
>
> __________________________________________________
> Do You Yahoo!?
> Buy the perfect holiday gifts at Yahoo! Shopping.
> http://shopping.yahoo.com
>
>  XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
>


 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.