title: How to extract domain name from url using xslt 1.0
body: <p>If you searched in google scholar for example: <a href="http://scholar.google.com/scholar?q=filetype%3Apdf" rel="nofollow noreferrer">http://scholar.google.com/scholar?q=filetype:pdf</a>, you can see at the right side the download links for those with pdf (picture below).</p>
  
  <p><img src="https://i.stack.imgur.com/nu7IO.png" alt="enter image description here"></p>
  
  <p>How can I extract the domain name from the url using xslt? In the picture above, google scholar just displayed the domain names for the url (eg sciencenet.cn, unive.it). The url can be in http, https, ftp.</p>
  
  <p>What I'm trying to achieve is like this SO <a href="https://stackoverflow.com/questions/2059707/extract-domain-or-domain-with-subdomain-from-a-link">post</a> but using xslt.</p>
  
  <p>Thanks in advance.</p>