【发布时间】:2011-05-30 03:31:32
【问题描述】:
我希望删除所有空格,以便我的最终代码看起来像一个文本块。
这是我的标题
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml"
doctype-public="-W3CDTD XHTML 1.0 Strict//EN"
doctype-system="http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"
omit-xml-declaration="yes"
encoding="UTF-8"
indent="no" />
这似乎大部分时间都有效,但我遇到了问题。见source
问题区域似乎是
<!-- clinical research coordinator -->
<xsl:template match="clinical-research-coordinators">
<xsl:variable name="id" select="item/@id" />
<xsl:variable name="entry" select="//people/entry[@id=$id]" />
<xsl:value-of select="$entry/display-name" />,
clinical research coordinator, at
<xsl:element name="a">
<xsl:attribute name="href">mailto:<xsl:value-of select="$entry/email" /></xsl:attribute>
<xsl:attribute name="class">email</xsl:attribute>
<xsl:value-of select="$entry/email" />
</xsl:element>
or
<xsl:value-of select="$entry/phone" />
</xsl:template>
我正在使用 Symphony CSM 生成数据。我只想删除所有空格,但我想保留缩进模式以提高可读性。
【问题讨论】:
-
我不同意,这是独一无二的,我不想使用 stip-space
-
这里有一个跟这篇帖子相关的后续问题see.weareinto.com/3klB
标签: xml xslt symphony-cms removing-whitespace