日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

xslt三种带图片的超链接(a标签,img标签)写法

發布時間:2023/12/15 编程问答 28 豆豆
生活随笔 收集整理的這篇文章主要介紹了 xslt三种带图片的超链接(a标签,img标签)写法 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

來源:http://www.notsee.info/tech/XSLT/XSLT-detail-333.xml


第一種帶圖片的超鏈接寫法
?

xml
? <notsee ID="a002">
??????? <Name>分享交流互助,從看不見的地方找答案</Name>
??????? <img>notsee.gif</img>
??????? <url>http://www.notsee.info</url>
??? </notsee>

xsl

<xsl:element name="a">
??????????? <xsl:attribute name="href">
??????????????? <xsl:value-of select="./url"/>
??????????? </xsl:attribute>
??????????? <xsl:element name="img">
??????????????? <xsl:attribute name="src">
??????????????????? <xsl:value-of select="./img"/>
??????????????? </xsl:attribute>
??????????? </xsl:element>
</xsl:element>

?

第二種帶圖片的超鏈接寫法
xml 同上

xslt

? <a href="{url}">
??????????? <img src="{img}"/>
?</a>

因為{url}和<xsl:value-of select="url"/>是等價關系

?

第三種帶圖片的超鏈接寫法,http://notsee.info采用的多屬性方法,有點模擬a 標簽寫法
?

xml

<htmls><a order="1" title="head區域的代碼可以知道設計師的專業" href="http://www.notsee.info/tech/html/html-detail-71.xml" author="notsee">head區域的代碼可以知道設計師的專業</a><htmls>

xslt

<xsl:for-each?select="body/htmls/*">

-?<xsl:element?name="a">-?<xsl:attribute?name="href">??<xsl:value-of?select="@href"?/>??</xsl:attribute>-?<xsl:attribute?name="title">??<xsl:value-of?select="@title"?/>??</xsl:attribute>??<xsl:attribute?name="hidefocus">true</xsl:attribute>??<xsl:attribute?name="target">_blank</xsl:attribute>-?<span>??<xsl:value-of?select="@order"?/>??.??</span>??[HTML][??<xsl:value-of?select="@title"?/>??][??<xsl:value-of?select="@author"?/>??]??</xsl:element>??</xsl:for-each>
創作挑戰賽新人創作獎勵來咯,堅持創作打卡瓜分現金大獎

總結

以上是生活随笔為你收集整理的xslt三种带图片的超链接(a标签,img标签)写法的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。