OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help



   would you please give some helps about Xalan extension function problems

[ Lists Home | Date Index | Thread Index ]
  • To: <xml-dev@lists.xml.org>
  • Subject: would you please give some helps about Xalan extension function problems?
  • From: "Bill Yao" <bill.yao@poweri.biz>
  • Date: Wed, 30 Apr 2003 18:00:39 +0800
  • Importance: Normal

Dear all,


I am trying to embed some extension functions written in java and vbscript,perl language in one xslt file.

The xslt parser is Xalan. I tried many times, but failed. Would you please give me some suggestions or give some samples for java,vbscript and perl language?


The xslt and error message are as follows. Thanks in advance.


Best regards,


PowerI Technology


Xslt file:


<xsl:stylesheet xmlns:pif="xalan://xdi.XdiExtFuncs" exclude-result-prefixes="xsl pif lxslt" extension-element-prefixes="my-ext" version="1.0" xmlns:lxslt="http://xml.apache.org/xslt" xmlns:my-ext="ext1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<!--xsl:output method="xml" omit-xml-declaration="yes"/-->

<xsl:template match="/">

<xsl:apply-templates select="XDFRoot"/>


<xsl:template match="XDFRoot"><XDFRoot><E00><xsl:for-each select="E00/C1"><C1><xsl:value-of select="substring(./text(),3,'1')"/></C1></xsl:for-each><xsl:for-each select="E00/C1"><C2><xsl:value-of select="my-ext:PowerXdiCustomFunc8(string(my-ext:PowerXdiCustomFunc8(string(./text()))))"/></C2></xsl:for-each><C4><xsl:value-of select="pif:PowerXdiCustomFunc5()"/></C4><xsl:for-each select="E00/C5"><C5><xsl:value-of select="./text()"/></C5></xsl:for-each><xsl:for-each select="E00/C6"><C6><xsl:value-of select="./text()"/></C6></xsl:for-each></E00></XDFRoot></xsl:template>

<lxslt:component elements=" PowerXdiCustomFunc6 PowerXdiCustomFunc5 PowerXdiCustomFunc8" functions=" PowerXdiCustomFunc6 PowerXdiCustomFunc5 PowerXdiCustomFunc8" prefix="my-ext"><lxslt:script lang="vbscript"><![CDATA[

Function PowerXdiCustomFunc5(Var hello)

       PowerXdiCustomFunc5 = "vb5"

End Function


Function PowerXdiCustomFunc6(Var hello)

       PowerXdiCustomFunc6 = "vb6"

End Function


Function PowerXdiCustomFunc8(Var hello)

       PowerXdiCustomFunc8 = "vb8"

End Function




News | XML in Industry | Calendar | XML Registry
Marketplace | Resources | MyXML.org | Sponsors | Privacy Statement

Copyright 2001 XML.org. This site is hosted by OASIS