code: private void beginInternalLink(ResourceReference reference, boolean freestanding,
          Map<String, String> parameters)
      {
          Map<String, String> spanAttributes = new LinkedHashMap<String, String>();
          Map<String, String> anchorAttributes = new LinkedHashMap<String, String>();
  
          // Add all parameters to the A attributes
          anchorAttributes.putAll(parameters);
  
          if (StringUtils.isEmpty(reference.getReference())) {
              spanAttributes.put(CLASS, WIKILINK);
              renderAutoLink(reference, spanAttributes, anchorAttributes);
          } else if (this.wikiModel.isDocumentAvailable(reference)) {
              spanAttributes.put(CLASS, WIKILINK);
              anchorAttributes.put(XHTMLLinkRenderer.HREF, this.wikiModel.getDocumentViewURL(reference));
          } else {
              // The wiki document doesn't exist
              spanAttributes.put(CLASS, "wikicreatelink");
              anchorAttributes.put(XHTMLLinkRenderer.HREF, this.wikiModel.getDocumentEditURL(reference));
          }
  
          getXHTMLWikiPrinter().printXMLStartElement(SPAN, spanAttributes);
          getXHTMLWikiPrinter().printXMLStartElement(XHTMLLinkRenderer.ANCHOR, anchorAttributes);
      }
docs: Start of an internal link.
  
  @param reference the reference to the link
  @param freestanding if true then the link is a free standing URI directly in the text
  @param parameters a generic list of parameters. Example: style="background-color: blue"