Xslt 如何在工具提示中显示表:XSL
我在xml文件中有以下标记:Xslt 如何在工具提示中显示表:XSL,xslt,tooltip,jquery-tooltip,Xslt,Tooltip,Jquery Tooltip,我在xml文件中有以下标记: <more_details> <source>192.168.1.1</source> <destination>10.10.10.10</destination> <vlan>192.168.0.0/24</vlan> <date>29/3/1391</date> <count>24</count&g
<more_details>
<source>192.168.1.1</source>
<destination>10.10.10.10</destination>
<vlan>192.168.0.0/24</vlan>
<date>29/3/1391</date>
<count>24</count>
</more_details>
我想在表的一列中显示上面的每个标记。(待组织)
但当我运行程序时,它显示的数据不是结构化格式(不在表中)
我还考察了第二种方法:
<a href="">
<xsl:attribute name="title"><table style='color:#efefef; background:none !important;'>
<tr>
<td><xsl:value-of select="source"/></td>
<td><xsl:value-of select="destination"/></td>
<td><xsl:value-of select="vlan"/></td>
<td><xsl:value-of select="date"/></td>
<td><xsl:value-of select="count"/></td>
</tr>
</table></xsl:attribute>
more details
</a>
而且它也不起作用。
第二种方法的结果是:
我真的需要你的帮助,任何回答都将不胜感激。thanx很多在HTML
标题
属性中不能有表。这是不可能的,停止尝试
您可以做什么:
标题
属性中的换行符,并将其显示在屏幕上。虽然没有桌子那么漂亮,但可能已经足够了<a href="">
<xsl:attribute name="title">
<xsl:value-of select="concat('Source: ', source, ' ')" />
<xsl:value-of select="concat('Destination: ', destination, ' ')" />
<xsl:value-of select="concat('VLAN: ', source, ' ')" />
<xsl:value-of select="concat('Date: ', date, ' ')" />
<xsl:value-of select="concat('Count: ', count)" />
</xsl:attribute>
<xsl:text>more details</xsl:text>
</a>
HTML标题属性中不能有表。HTML(以及XML)仅支持属性值中的字符串。hmmm。。。但是,当我把这段代码放在html文件(而不是xsl)的title属性中时,工具提示会显示一个表。什么浏览器?你能为此制作一个JSFIDLE吗?谢谢你,亲爱的Tomalak。现在它有了一个更好的结构(每个标记都在单独的行中)结果是:Source:Destination:VLAN:Date:Count:问题是它没有显示标记的值。我有一个问题:为什么下面的行在xsl中不起作用?:它没有显示的值!!这意味着在的title属性中不允许使用xsl或html标记?那么解决方案是什么呢?
192.168.2.1125.45.24.5192.168.0.0/2429/2/1390 - 12:1424
<a href="">
<xsl:attribute name="title"><table style='color:#efefef; background:none !important;'>
<tr>
<td><xsl:value-of select="source"/></td>
<td><xsl:value-of select="destination"/></td>
<td><xsl:value-of select="vlan"/></td>
<td><xsl:value-of select="date"/></td>
<td><xsl:value-of select="count"/></td>
</tr>
</table></xsl:attribute>
more details
</a>
<a href="">
<xsl:attribute name="title">
<xsl:value-of select="concat('Source: ', source, ' ')" />
<xsl:value-of select="concat('Destination: ', destination, ' ')" />
<xsl:value-of select="concat('VLAN: ', source, ' ')" />
<xsl:value-of select="concat('Date: ', date, ' ')" />
<xsl:value-of select="concat('Count: ', count)" />
</xsl:attribute>
<xsl:text>more details</xsl:text>
</a>