对齐 html 文件
我正在使用 xslt1.0 将 xml 转换为 html。我的结果 html 是分散的形式,
span style="
font-family:Cambria;
font-weight:bold;
color:#848057;
font-size:14pt;
font-family:Cambria;
font-weight:bold;
color:#848057;
font-size:14pt;
white-space:pre-wrap;
">Overview</span>
我希望它作为单行对齐。哪些工具适合我或有其他想法? 提前致谢。
I am converting xml to html using xslt1.0.My result html is in scattered form like,
span style="
font-family:Cambria;
font-weight:bold;
color:#848057;
font-size:14pt;
font-family:Cambria;
font-weight:bold;
color:#848057;
font-size:14pt;
white-space:pre-wrap;
">Overview</span>
I want it to be aligned as a single line. Which tools makes this for me or any other ideas?
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
间距首先从哪里来?
看起来您的空白没有得到正确处理。它可以来自传入的 XML,也可以作为 XSLT 中的意外文本节点。治疗取决于起源。
您可能会发现这两篇关于处理空白的文章很有趣: http ://www.xml.com/pub/a/2001/11/07/whitespace.html 和 http://www.xml.com/pub/a/2001/12/05/whitespace.html
Where does the spacing come from in the first place?
It looks like you have white-space not treated properly. It can either come from the incoming XML or as accidental text-nodes in your XSLT. The cure depends on the origin.
You might find these two articles on dealing with white-space interesting: http://www.xml.com/pub/a/2001/11/07/whitespace.html and http://www.xml.com/pub/a/2001/12/05/whitespace.html