找不到与xslt中的命名空间关联的脚本或扩展对象

时间:2015-02-02 12:22:14

标签: xml xslt altova

我已经使用altova mapforce生成了XSLT,并且在altova中生成了xslt和output xml而没有任何问题。

当我在visual studio 2013中复制相同的xslt并尝试运行但最终出现以下错误时 找不到与命名空间“http://www.w3.org/2001/XMLSchema”关联的脚本或扩展程序对象。

<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
     xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:core="http://www.altova.com/MapForce/UDF/core" 
  xmlns:vmf="http://www.altova.com/MapForce/UDF/vmf" 
  xmlns:ns0="http://www.altova.com/xslt-extensions"   
  xmlns:fn="http://www.w3.org/2005/xpath-functions" exclude-result-prefixes="core vmf ns0 xs fn">
    <xsl:template name="core:firstCharacter">
        <xsl:param name="value" select="()"/>
        <xsl:param name="default" select="()"/>
        <xsl:choose>
            <xsl:when test="(fn:string-length($value) = xs:integer('0'))">
                <xsl:sequence select="$default"/>
            </xsl:when>
            <xsl:otherwise>
                <xsl:variable name="var1_resultof_cast" as="xs:double" select="xs:double(xs:integer('1'))"/>
                <xsl:sequence select="fn:substring($value, $var1_resultof_cast, $var1_resultof_cast)"/>
            </xsl:otherwise>
        </xsl:choose>
    </xsl:template>

<xsl:template match="/">
        <xsl:variable name="var1_resultof_cast" as="xs:string" select="xs:string(xs:decimal('0'))"/>
        <xsl:variable name="var2_entry" as="node()?" select="entry"/>
        <xsl:variable name="var3_resultof_map" as="xs:string*">

以下行出错:

<xsl:variable name="var1_resultof_cast" as="xs:string" select="xs:string(xs:decimal('0'))"/>

0 个答案:

没有答案