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

RE: would you please give some helps about Xalan extension fun


bill yao
Title: Message
You should raise this on a Xalan list (go to the apache site).
 
-----Original Message-----
From: Bill Yao [mailto:bill.yao@p...]
Sent: 30 April 2003 11:01
To: xml-dev@l...
Subject: would you please give some helps about Xalan extension function problems?

GRID: 15.6pt none">

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,

Bill

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>

<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

]]></lxslt:script></lxslt:component>

</xsl:stylesheet>


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
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

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-2007 All Rights Reserved.