<***--如何使用JDOM构造XSLT中的这类节点?--***>

leolee 2001-09-17 03:51:03
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output/>
<xsl:template match="/html">

...全文
97 7 打赏 收藏 转发到动态 举报
写回复
用AI写文章
7 条回复
切换为时间正序
请发表友善的回复…
发表回复
wilddragon 2001-09-25
  • 打赏
  • 举报
回复
up
wilddragon 2001-09-24
  • 打赏
  • 举报
回复
支持支持
leolee 2001-09-24
  • 打赏
  • 举报
回复
还是我把答案贴出来吧(JGuru提供的解答,JGuru is a nice web forum。那里真是java高手多多)!免得你睡着了。不过分浪费就可惜了。
try {


Namespace prefix = Namespace.getNamespace("xsl", "http://www.w3.org/1999/XSL/Transform");
Element elt = new Element("stylesheet", prefix).setAttribute("version","1.0");
elt.addContent(new Element("output",prefix).setAttribute("method","html").setAttribute("indent","no"));
elt.addContent(new Element("template",prefix).setAttribute("match","/html"));
XMLOutputter outputter = new XMLOutputter(" ", true, "ISO-8859-1");
outputter.output(elt, System.out);
} catch (Exception ex) {

ex.printStackTrace();
}


wilddragon 2001-09-22
  • 打赏
  • 举报
回复
好困呀
wilddragon 2001-09-21
  • 打赏
  • 举报
回复
等待中...
leolee 2001-09-17
  • 打赏
  • 举报
回复
答案我已经知道了,但是分不能浪费阿,有谁贴答案?我把分送给他了!!哈哈哈
leolee 2001-09-17
  • 打赏
  • 举报
回复
这些节点该如何构造呢?

8,906

社区成员

发帖
与我相关
我的任务
社区描述
XML/XSL相关问题讨论专区
社区管理员
  • XML/XSL社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧