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

how to use xslt extension functions?

Subject: how to use xslt extension functions?
From: "Smith BC (Brian) at MSXSSC" <BS185791@xxxxxxxxxxxxxxxx>
Date: Thu, 20 May 1999 07:00:07 -0500
xslt escape function

I have been using XSL for a month, and I 
am now trying to use XSLT, but I have a 
few (simple) question that have me stuck.

1) I am trying to use James Clark xslt 
   processor and I keep getting the following  
   error message:
       "implementation of extension namespace not available"
   below are my files (xml and xsl).  What does this mean?
   I have tried lots of different things, but can not get
   around this.

2) According to the xt documentation the "this" pointer
     can be passed around, but how would this be done?
     I would expect something like:
     <xsl:call-templates name="connect">
        <xsl:param name="db"       expr="sqlxml:new()"/>
        <xsl:param name="db"       expr="database"/>             
        <xsl:param name="username" expr="user"/>
        <xsl:param name="pswd"     expr="password"/>
        <!-- other stuff -->
        <xsl:call-templates name="insert"> 
-->what value do I use for the this parameter?
           <xsl:param name="db"   expr="this"/>
           <xsl:param name="arg1" expr="arg1"/>
           <xsl:param name="arg2" expr="arg2"/>

3) For James clark nxml.xsl demo:
      <xsl:template match="/">
            <escape char="\">\\</escape>
   What in the heck is this doing?  Is it calling a 
   java function NXMLOutputHandler.nxml ?  What are
   the arguements?  The escape has attributes, but
   the data has elements...? 

4) Again in the xt documentation James says that
      extension functions can "return objects of
      arbitrary typs which can then be passed
      as arguements to other extension functions or
      stored in variables"
     How in the heck is this done?

<?xml version="1.0"?>

  <database>jdbc:odbc:riccardo_cis </database>
  <EMS_ID>12345 </EMS_ID>
       <ADDR1>PO box 4569</ADDR1>

<xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0" >

<xsl:template match="cis">
          <xsl:call-template name="connect">
              <xsl:param name="db"       expr="database"/>
              <xsl:param name="username" expr="user"/>
              <xsl:param name="pswd"     expr="password"/>
          <xsl:for-each select="PARTY">
              <!-- put this here to make sure we are processing the data -->
                 <xsl:apply-templates />

<xsl:template name="connect">
  <xsl:param-variable name="db"/>
  <xsl:param-variable name="username"/>
  <xsl:param-variable name="pswd"/>
  <xsl:value-of select="w:connect(string($db),string($username),
     xmlns:w="file:///e:development/sqlxml/sqlxml" />
<!-- have also tried xmlns="java:sqlxml" -->


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

Current Thread


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.
First Name
Last Name
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.