本文介绍了XslCompiledTransform .Net 4.5-不支持XSLT unparsed-entity-uri的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当我尝试使用XslCompiledTransform执行转换时(在带有.Net 4.5的VS 2012中),我收到一条错误消息"unparsed-entity-uri()是不受支持的XSLT函数.我已经阅读了.NET 4.5 XSLT文档,它表明此功能是 在XSLT中受支持.这是我的变换:

When I try to execute a transform with XslCompiledTransform (in VS 2012 with .Net 4.5) I get an error message "unparsed-entity-uri() is an unsupported XSLT function. I have reviewed the .NET 4.5 XSLT documentation and it shows that this function is supported in XSLT. Here is my transform:

  < xsl:template match ="GRAPHIC">

  <xsl:template match="GRAPHIC">

    < xsl:element name =" img">

    <xsl:element name="img">

     < xsl:attribute name ="src">

      <xsl:attribute name="src">

       < xsl:value-of select ="unparsed-entity-uri('@ entity')"//>

        <xsl:value-of select="unparsed-entity-uri('@entity')"/>

     </xsl:attribute>

      </xsl:attribute>

     < xsl:attribute name ="alt">

      <xsl:attribute name="alt">

       < xsl:value-of select ="@ alt"/>

        <xsl:value-of select="@alt"/>

     </xsl:attribute>

      </xsl:attribute>

     < xsl:apply-templates/>

      <xsl:apply-templates/>

    </xsl:element>

    </xsl:element>

  </xsl:template>

  </xsl:template>

这是MS文档中的错误吗?

Is this an error in the MS documentation?

谢谢

推荐答案

这是设计使然. Visual Studio仍然不支持XSLT 2.0,因此无法识别unparsed-entity-uri()XSLT函数.

This is by design. Visual Studio still does not support XSLT 2.0 and hence is unable to recognize unparsed-entity-uri() XSLT function.

谢谢

Kunal(MSFT)

Kunal (MSFT)


这篇关于XslCompiledTransform .Net 4.5-不支持XSLT unparsed-entity-uri的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

08-19 18:32