title: XSLT to DOCX (OOXML) - How to handle hyperlinks
body: <p>I am trying to convert from XML to DOCX file, however I have a problem with hyperlinks (to external source) as it requires Relationship declaration in the <code>document.xml.rels</code>. Like so:</p>
  
  <pre><code>&lt;Relationship Id="rId5" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="http://www.google.com/" TargetMode="External"/&gt;
  </code></pre>
  
  <p>then I can reference this Relationship by it's id:</p>
  
  <pre><code>&lt;w:hyperlink r:id="rId5"&gt;
    &lt;w:r&gt;
      &lt;w:rPr&gt;
        &lt;w:color w:val="#0070BB"/&gt;
        &lt;w:i/&gt;
      &lt;/w:rPr&gt;
      &lt;w:t&gt;
        &lt;xsl:value-of select="string(.)"/&gt;
      &lt;/w:t&gt;
    &lt;/w:r&gt;
  &lt;/w:hyperlink&gt;
  </code></pre>
  
  <p>Is it possible to specify the link URL within the hyperlink tag, as an attribute? So I don't have so use another file...</p>
  
  <p>Something like this:</p>
  
  <pre><code>&lt;w:hyperlink external-url="http://..."&gt;
    &lt;w:r&gt;
      &lt;w:rPr&gt;
        &lt;w:color w:val="#0070BB"/&gt;
        &lt;w:i/&gt;
      &lt;/w:rPr&gt;
      &lt;w:t&gt;
        &lt;xsl:value-of select="string(.)"/&gt;
      &lt;/w:t&gt;
    &lt;/w:r&gt;
  &lt;/w:hyperlink&gt;
  </code></pre>