Home >Backend Development >XML/RSS Tutorial >XML-code sharing for adding links in xslt
Don’t underestimate this problem. We generally understand it this way: If you want to add a link, use the tag, for example
<a href=”<xsl: value-of select=。。。”>
However, the syntax is It doesn't work because there are multiple double quotes interfering with each other.
So how to solve this problem? The following syntax should be used
<h4>第七部分:依赖</h4> <table> <tr class="RowHeader"> <td>类别</td> <td>架构</td> <td>名称</td> </tr> <xsl:for-each select="ParentDependencies/ParentDependency"> <tr> <td> <xsl:value-of select="Type"/> </td> <td> <xsl:value-of select="Schema"/> </td> <td> <a> <xsl:attribute name="href"> <xsl:value-of select="Schema"/>.<xsl:value-of select="Name"/>.htm </xsl:attribute> <xsl:value-of select="Name"/> </a> </td> </tr> </xsl:for-each> </table>
That is to say, use an attribute method to reference the href attribute and assign a value to it
Then, the effect we see on the page is similar to the following
The above is the detailed content of XML-code sharing for adding links in xslt. For more information, please follow other related articles on the PHP Chinese website!