删除 XSLT 中的空行 [英] Removing blank lines in XSLT

查看:34
本文介绍了删除 XSLT 中的空行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用:

<xsl:template match="material_id | location_code"></xsl:template>

删除源 XML 中名为 material_idlocation_code 的元素,但保留空白行,留下类似如下的输出 XML:

To get rid of elements in the source XML called material_id and location_code, but whitespace lines remain, leaving an output XML something like:

<entries>
    <Identity>conflab1</Identity>


    <price>24.36</price>
    <pricedate>15-Jul-2010 13:35:18 UTC</price_date>
</entries>

我应该如何阻止它离开换行符?

How should I stop it from leaving the newline characters?

谢谢,

马特

推荐答案

尝试:

<xsl:strip-space  elements="*"/>

在文档的顶部.

这篇关于删除 XSLT 中的空行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆