发帖
查看:2021|回复:4
  • 1
When you buy via links in posts, huaren.us may earn a commission
Advertisement

XSL 问题请教, 谢谢!

头像
0操作1 #
头像
1 #
0
04-04-12 08:46操作
只看楼主AA分享不感兴趣
XSL 问题请教, 谢谢!
我想这栏应该最火了, 别的栏也没有适合我贴这个的, 就放这了, 如果有会的, 请指点下, 谢谢


我有个 XML 文件, 内容包括像:
http://www.w3schools.com/xsl/cdcatalog.xml
但如果这 XML 文件没有 Record, 像,


我想写 "No record found". 有用 XSL 写的办法么?

我可以用 Jsp or java 写出 "No record found" faking xml data, 但是请问有没有直接用 xsl 写出 “No record found” 的? 我查了, xsl:when, xsl:otherwise 和我的情况不符合。

谢谢


[此贴子已经被作者于2004-4-12 8:49:38编辑过]

头像
0操作2 #
头像
2 #
0
04-04-12 15:07操作
只看TAAA分享
you should put it under 电脑世界吧?
Advertisement
头像
0操作3 #
头像
3 #
0
04-04-13 03:32操作
只看TAAA分享
三年前写过的XSL了,不知道对不对。
总之,可以用xsl:variable拿到/catalog/cd的value,然后用xsl:if来test这个value是不是empty string.

头像
0操作4 #
头像
4 #
0
04-04-13 08:34操作
只看楼主AA分享
以下是引用cathylan在2004-4-13 3:32:23的发言:
三年前写过的XSL了,不知道对不对。
总之,可以用xsl:variable拿到/catalog/cd的value,然后用xsl:if来test这个value是不是empty string.





I was thinking about that too, thought about the otherwise also, but if variable such as
头像
0操作5 #
头像
5 #
0
04-04-13 18:44操作
只看TAAA分享


If you just want to insert "No Record Found" in the XML input file as the value of tag




以下是引用iceox在2004-4-13 8:34:13的发言:
以下是引用cathylan在2004-4-13 3:32:23的发言:
三年前写过的XSL了,不知道对不对。
总之,可以用xsl:variable拿到/catalog/cd的value,然后用xsl:if来test这个value是不是empty string.





I was thinking about that too, thought about the otherwise also, but if variable such as
Advertisement
发帖回复
查看:2021|回复:4
  • 1
Advertisement
打开收藏板块打开个人中心
边缘侧滑返回