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

Re: OpenXML/XSL:P some problem

Subject: Re: OpenXML/XSL:P some problem
From: "Garriss Jr.,James P." <jgarriss@xxxxxxxxx>
Date: Fri, 15 Oct 1999 09:21:41 -0400
xsl p
At 06:12 AM 10/15/99 , Alexandre Trusch wrote:
>Hello, I use XSL/XML only since one week. I have th folllowing problem :
>
>1) It seems impossible to create this kind of link with XSL:P
>2) How can I add script in the XSL file (All the &,<,... are replaced  by
>&amp;,...). My goal is to create an HTML file with a Javascript section in
>it.

XSL:P currently uses the Apr99 spec and therefore supports extension functions. I suggest that you look at the spec for starters. Here's an example:

****

<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0"
  xmlns:jpg=""
  result-ns="text"
  default-space="strip">

<xsl:functions ns="jpg" type="text/javascript">
<![CDATA[

var intLength = 0;

function fcnResetLength()
{
  intLength = 0;
  return;
}

]]>
</xsl:functions>

<!-- root -->
<xsl:template match="/">
  <foo>
  <xsl:apply-templates select="*"/>
  </foo>
</xsl:template>

<!-- linear sets -->
<xsl:template match="*[@settype='linear']">
  <xsl:text>&#xD;&#xA;</xsl:text>
  <xsl:variable name="hokey1" expr="jpg:fcnResetLength()"/>
</xsl:template>

</xsl:stylesheet>

*******

Note that I have had some problems getting extension functions to work, having to do with the ECMAScript handler that is used. Keith is looking into fixing this problem, perhaps by adding support for JPython.


James Garriss | The MITRE Corporation | jgarriss @ mitre.org



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.