ADVERTISEMENT
ADVERTISEMENT
等级大校
威望22
贴子17028
魅力17450
注册时间@2013-08-09
iceox
XSL 问题请教, 谢谢!
1958
4
2004-04-12 08:46:00
我想这栏应该最火了, 别的栏也没有适合我贴这个的, 就放这了, 如果有会的, 请指点下, 谢谢
我有个 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 和我的情况不符合。
谢谢
我有个 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编辑过]
等级大校
威望22
贴子17028
魅力17450
注册时间@2013-08-09
you should put it under 电脑世界吧?
等级大校
威望22
贴子17028
魅力17450
注册时间@2013-08-09
三年前写过的XSL了,不知道对不对。
总之,可以用xsl:variable拿到/catalog/cd的value,然后用xsl:if来test这个value是不是empty string.
总之,可以用xsl:variable拿到/catalog/cd的value,然后用xsl:if来test这个value是不是empty string.
等级大校
威望22
贴子17028
魅力17450
注册时间@2013-08-09
以下是引用cathylan在2004-4-13 3:32:23的发言:
三年前写过的XSL了,不知道对不对。
总之,可以用xsl:variable拿到/catalog/cd的value,然后用xsl:if来test这个value是不是empty string.
三年前写过的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
等级大校
威望22
贴子17028
魅力17450
注册时间@2013-08-09
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
HOT DEALS
立即省25%购买WOLFBOX 12寸4K后视镜摄像头 - 现价$149.99,原价$199.99 | 包含64GB卡和GPS
Vitafit 数字厨房食品秤现价 $8.99,原价 $15.99
Kipling 多买多省促销,最高额外优惠40%
Nordstrom Rack Timberland 时尚大促 最高63% Off
Reebok九月优惠:鞋款低于$60 & 服饰低于$25
Crocs 精选款式限时促销,2双仅需$50!
Vegamour Haircare Sale Extra 25% OFF
Neiman Marcus 友好亲友特卖 - 额外25%折扣
Levis 全场优惠活动 满$250减$100,满$200减$75,满$150减$50
Sephora 2024年终限量版套装 La Mer四件套 $180
HUNDA iPhone车载充电器:现在仅需$12.59(原价:$13.99) - 超快充电,配备5FT螺旋闪电数据线
独家72%折扣BSOD蘑菇灯:复古玻璃桌面照明
Under Armour 儿童服装特卖 额外30%折扣
ADVERTISEMENT