How to add links in XSLT

Source: Internet
Author: User
Tags xsl xslt

Do not underestimate this problem, we generally are so kind of understanding: if you want to add a link, then use the <a> tag it, such as

<a href= "<xsl:value-of select= ... ">

However, such syntax is not feasible because there are multiple double quotes that interfere with each other.

So how do you solve the problem? You should use the following syntax

<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>

In other words, in an attribute way, in particular, refer to the attribute of href, and assign it a value

Then, the effect we see on the page is similar to the following

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.