Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
如何使用 xslt 仅显示字符串的特定部分,例如:
我只想在第二张图片中显示最伟大的图片。只有第一部分要显示。
您应该像这样使用 substring 函数:
<xsl:value-of select="substring-before($yourstring, ' ')"/>
它只选择空白之前的字符串部分。还有substring和substring-after。
substring
substring-after
值得研究一下。