将 XSLT 1.0 转换为 2.0 [英] Convert XSLT 1.0 to 2.0
问题描述
我需要帮助将 XSLT 1.0 文件转换为 2.0(以便我可以使用 XSLT 2.0 replace() 函数调用).
我用谷歌搜索过,搜索过不同的书,但没有成功.我尝试将 version="1.0"
更改为 2.0
并更改 html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"
到简单的 html
但这只会导致 XSLTProcessor 错误.
非常感谢任何帮助.提前致谢.
这是我的 XSLT:
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns="http://www.w3.org/1999/xhtml" version="1.0"><xsl:output method="xml" omit-xml-declaration="yes" indent="no"doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"doctype-public="-//W3C//DTD XHTML 1.0 Transitional//EN" encoding="ISO-8859-1"/><xsl:template match="/"><html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"><头><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/><xsl:element name="meta"><xsl:attribute name="name">描述</xsl:attribute><xsl:attribute name="content"><xsl:value-of select="EventList/title"/></xsl:attribute></xsl:element><xsl:element name="link"><xsl:attribute name="rel">alternate</xsl:attribute><xsl:attribute name="type">application/rss+xml</xsl:attribute><xsl:attribute name="title">RSS</xsl:attribute><xsl:attribute name="href"><xsl:value-of select="EventList/rssURL"/></xsl:attribute></xsl:element>头部><身体><xsl:apply-templates select="EventList"/>