code: public CmsLink getLink(CmsObject cms) {
  
          if (m_linkValue == null) {
              // need to to calculate link value twice
              Element linkElement = m_element.element(CmsXmlPage.NODE_LINK);
              if (linkElement == null) {
                  setStringValue(cms, m_element.getText());
              } else {
                  CmsLinkUpdateUtil.updateType(linkElement, getRelationType(getPath()));
                  CmsLink link = new CmsLink(linkElement);
                  if (link.isInternal()) {
                      // link management check
                      link.checkConsistency(cms);
                  }
                  if (CmsStringUtil.isEmptyOrWhitespaceOnly(link.getTarget())) {
                      // this may just be an anchor link
                      m_linkValue = CmsLink.NULL_LINK;
                  } else {
                      m_linkValue = link;
                  }
              }
          }
          if (m_linkValue == CmsLink.NULL_LINK) {
              return null;
          }
          return m_linkValue;
      }
docs: Returns the link object represented by this XML content value.<p>
  
  @param cms the cms context, can be <code>null</code> but in this case no link check is performed,
  and the target is marked as "external"
  
  @return the link object represented by this XML content value