我正在为源节点做一个非常简单的 xslt,例如:
<p>
<media type="photo" id="lr002662" rights="licensed">
<title>Logging in Canada</title>
</media>Logging is cutting down trees for <definition>
<word-term>lumber</word-term>
<word-definition>wood</word-definition>
</definition>. Loggers are also called <i>lumberjacks.</i>
</p>
我在我的 xslt 样式表上运行这个源节点,一旦在 xmlspy 中,我得到以下输出:
<para>
<media type="photo" source="lr002662" rights="licensed">
<resource.title>Logging in Canada</resource.title>
</media>Logging is cutting down trees for <italic>lumber</italic> (wood). Loggers are also called <italic>lumberjacks.</italic>
</para>
但后来我使用相同的 xslt 样式表在 saxon9he.jar 文件的命令行中运行它,我得到以下信息:
<para>
<media type="photo" source="lr002662" rights="licensed">
<resource.title>Logging in Canada</resource.title>
</media>Logging is cutting down trees for
<italic>lumber</italic>
(wood)
. Loggers are also called <italic>lumberjacks.</italic>
</para>
正如你所看到的,媒体标签后面的文本现在包含了很多回车,这不是我想要的。我一直在使用 XMLSpy,所以从来没有注意到这个问题。任何专家都可以建议一种调试或提供我的 xslt 的方法吗?