我无法弄清楚为什么当我尝试运行我的程序时,我总是收到错误“无法编译stlyesheet”。我假设这是我的样式表中的错误,但我似乎无法找到它。XSL无法编译样式表
我可能只是看着它,但任何帮助将不胜感激。
谢谢! xsl可以在下面找到。
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
version="1.0">
<xsl:output method="xml" indent="yes"/>
<xsl:template match="/">
<PhoneBook>
<xsl:apply-templates/>
</PhoneBook>
</xsl:template>
<xsl:template match="AddressEntry">
<Entry>
<xsl:apply-templates select="Name"/>
<xsl:apply-templates select="Address"/>
</Entry>
</xsl:template>
<xsl:template match="Name">
<Name>
<xsl:apply-templates select="LastName"/>,
<xsl:apply-templates select="FirstName"/>
</Name>
</xsl:template>
<xsl:template match="Address">
<LocatorInfo>
<xsl:apply-templates select="PostalAddress/Street"/>
<xsl:apply-templates select="PostalAddress/City"/>
<xsl:apply-templates select="PostalAddress/PostalCode"/>
<xsl:apply-templates select="Phone"/>
</LocatorInfo>
</xsl:template>
<xsl:template match="FirstName">
<xsl:value-of select="."/>
<xsl:value-of select="."/>
</xsl:template>
<xsl:template match="LastName">
<xsl:value-of select="."/>
</xsl:template>
</xsl:stylesheet>
+1,尽管xsltc只适用于XSLT 1.0(从问题OP是否打算使用1.0或2.0,尽管当前样式表不使用任何特定于2.0的东西)。 – 2013-02-08 17:00:49
非常感谢你,我想我今天早上需要更多的咖啡,应该已经看到了。并感谢您在将来肯定会使用这些建议。 – parchambeau 2013-02-08 17:11:45
+1这是一个疯狂的长类名。 – JLRishe 2013-02-08 17:14:11