XMLドキュメントがあり、XSLを使用して別のXMLを作成しています。いくつかの特定の条件を確認する必要があります。そのために、XSLでJavascriptを使用したいと思います。試してみましたが、思い通りの結果が得られませんでした。XSL変数を頻繁に変更できなかったため、Javascriptを使用しようとしています。
XSL-
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:es="http://ucmservice"
version="1.0" xmlns="http://filenet.com/namespaces/wcm/apps/1.0" xmlns:java="http://xml.apache.org/xalan/java" xmlns:js="urn:custom-javascript" xmlns:lxslt="http://xml.apache.org/xslt"
xmlns:totalSys="TotalSystem" extension-element-prefixes="totalSys">
<lxslt:component prefix="totalSys" functions="checkFirstProp">
<lxslt:script lang="javascript">
var firstPropVal = "";
var secondPropVal = "";
var completedFirstPropVal= new Array();
var completedSecondPropVal= new Array();
var firstDecisionFlag = 0;
function checkFirstProp(xmlValue)
{
firstDecisionFlag = 0;
if(firstPropVal.length == 0)
{
firstPropVal = xmlValue;
firstDecisionFlag = 1;
}
else
{
if(firstPropVal != xmlValue)
{
firstPropVal = xmlValue;
firstDecisionFlag = 2;
}
}
return firstDecisionFlag;
}
</lxslt:script>
</lxslt:component>
<xsl:template match="/">
<xsl:apply-templates select="XMLTag"/>
</xsl:template>
<xsl:template match="XMLTag">
<xsl:variable name="firstPropDecisionFlag">
<xsl:value-of select="totalSys:checkFirstProp(param)"/>
</xsl:variable>
<xsl:if test="$firstPropDecisionFlag=2">
{
task
}
</xsl:if>
</xsl:template>
bvk</xsl:stylesheet>
これは私にエラーメッセージを与えました-
[7/20/10 16:41:47:106 IST] 0000002e SystemErr R
org.apache.xalan.extensions.ObjectFactory$ConfigurationError
:プロバイダーorg.apache.bsf.BSFManager
が見つかりません
どこが間違っているのか教えてください。