Subject: how to use xslt extension functions? From: "Smith BC (Brian) at MSXSSC" <BS185791@xxxxxxxxxxxxxxxx> Date: Thu, 20 May 1999 07:00:07 -0500 |
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"/> </xsl:call-template> </xsl:call-template> 3) For James clark nxml.xsl demo: <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0" xmlns="java:com.jclark.xsl.sax.NXMLOutputHandler" result-ns=""> <xsl:template match="/"> <nxml> <escape char="\">\\</escape> <data>&<>\</data> <control>&<>\</control> </nxml> </xsl:template> </xsl:stylesheet> 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? =============>file.xml <?xml version="1.0"?> <cis> <database>jdbc:odbc:riccardo_cis </database> <user>ems_user</user> <password>ems_user</password> <EMS_ID>12345 </EMS_ID> <PARTY> <PARTYID>2</PARTYID> <ADDR1>PO box 4569</ADDR1> <ADDR2></ADDR2> <POSTAL>30302</POSTAL> <CITY>Atlanta</CITY> <STATE>Georgia</STATE> </PARTY> </cis> =============>file.xsl <xsl:stylesheet xmlns:xsl="http://www.w3.org/XSL/Transform/1.0" > <xsl:template match="cis"> <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:call-template> <xsl:for-each select="PARTY"> <!-- put this here to make sure we are processing the data --> <xsl:copy> <xsl:apply-templates /> </xsl:copy> </xsl:for-each> </cis> </xsl:template> <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), string($pswd))" xmlns:w="file:///e:development/sqlxml/sqlxml" /> <!-- have also tried xmlns="java:sqlxml" --> </xsl:template> </xsl:stylesheet> XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Whitespace problem in IE5, Dave Pawson | Thread | a schema validator-generator, francis |
RE: XSLT: conditional output, or l1, Kay Michael | Date | Re: SAX2 and XSLT processors, Oren Ben-Kiki |
Month |