/**
   * Parse Attribution
   *
   * @param layerElem
   * @return Attribution
   * @throws XMLParsingException
   */
  protected Attribution parseAttribution(Element layerElem) throws XMLParsingException {
    LOG.entering();

    Attribution attribution = null;
    Node node = XMLTools.getNode(layerElem, "./Attribution", nsContext);
    if (node != null) {
      String title = XMLTools.getRequiredNodeAsString(layerElem, "./Attribution/Title", nsContext);
      Node onlineR = XMLTools.getRequiredNode(node, "./OnlineResource", nsContext);
      OnlineResource onLineResource = parseOnLineResource((Element) onlineR);
      node = XMLTools.getNode(node, "./LogoURL", nsContext);
      LogoURL logoURL = null;
      if (node != null) {
        int width = XMLTools.getRequiredNodeAsInt(node, "./@width", nsContext);
        int height = XMLTools.getRequiredNodeAsInt(node, "./@height", nsContext);
        String format = XMLTools.getRequiredNodeAsString(node, "./Format", nsContext);
        onlineR = XMLTools.getRequiredNode(node, "./OnlineResource", nsContext);
        OnlineResource logoOR = parseOnLineResource((Element) onlineR);
        logoURL = new LogoURL(width, height, format, logoOR.getLinkage().getHref());
      }
      attribution = new Attribution(title, onLineResource.getLinkage().getHref(), logoURL);
    }

    LOG.exiting();
    return attribution;
  }
  /**
   * Parse Style Sheet URL
   *
   * @param node
   * @return StyleSheetURL
   * @throws XMLParsingException
   */
  protected StyleSheetURL parseStyleSheetURL(Node node) throws XMLParsingException {
    LOG.entering();

    StyleSheetURL styleSheetURL = null;
    Node styleNode = XMLTools.getNode(node, "./StyleSheetURL", nsContext);

    if (styleNode != null) {
      String format = XMLTools.getRequiredNodeAsString(styleNode, "./Format", nsContext);
      Element tmp = (Element) XMLTools.getRequiredNode(styleNode, "./OnlineResource", nsContext);
      OnlineResource olr = parseOnLineResource(tmp);
      styleSheetURL = new StyleSheetURL(format, olr.getLinkage().getHref());
    }

    LOG.exiting();
    return styleSheetURL;
  }
  /**
   * Parse AuthorityURL
   *
   * @param layerElem
   * @return AuthorityURL[]
   * @throws XMLParsingException
   */
  protected AuthorityURL[] parseAuthorityURLs(Element layerElem) throws XMLParsingException {
    LOG.entering();

    List nl = XMLTools.getNodes(layerElem, "./AuthorityURL", nsContext);
    AuthorityURL[] authorityURLs = new AuthorityURL[nl.size()];
    for (int i = 0; i < authorityURLs.length; i++) {
      String name = XMLTools.getRequiredNodeAsString((Node) nl.get(i), "./@name", nsContext);
      Element tmp =
          (Element) XMLTools.getRequiredNode((Node) nl.get(i), "./OnlineResource", nsContext);
      OnlineResource olr = parseOnLineResource(tmp);
      authorityURLs[i] = new AuthorityURL(name, olr.getLinkage().getHref());
    }

    LOG.exiting();
    return authorityURLs;
  }
  /**
   * Parse FeatureListURL
   *
   * @param layerElem
   * @return FeatureListURL[]
   * @throws XMLParsingException
   */
  protected FeatureListURL[] parseFeatureListURL(Element layerElem) throws XMLParsingException {
    LOG.entering();

    List nl = XMLTools.getNodes(layerElem, "./FeatureListURL", nsContext);
    FeatureListURL[] flURL = new FeatureListURL[nl.size()];
    for (int i = 0; i < flURL.length; i++) {

      String format = XMLTools.getRequiredNodeAsString((Node) nl.get(i), "./Format", nsContext);
      Element tmp =
          (Element) XMLTools.getRequiredNode((Node) nl.get(i), "./OnlineResource", nsContext);
      OnlineResource olr = parseOnLineResource(tmp);
      flURL[i] = new FeatureListURL(format, olr.getLinkage().getHref());
    }

    LOG.exiting();
    return flURL;
  }
  /**
   * Parse MetadataURL
   *
   * @param layerElem
   * @return MetadataURL[]
   * @throws XMLParsingException
   */
  protected MetadataURL[] parseMetadataURLs(Element layerElem) throws XMLParsingException {
    LOG.entering();

    List nl = XMLTools.getNodes(layerElem, "./MetadataURL", nsContext);
    MetadataURL[] metadataURL = new MetadataURL[nl.size()];
    for (int i = 0; i < metadataURL.length; i++) {
      String type = XMLTools.getRequiredNodeAsString((Node) nl.get(i), "./@type", nsContext);
      String format = XMLTools.getRequiredNodeAsString((Node) nl.get(i), "./Format", nsContext);
      Element tmp =
          (Element) XMLTools.getRequiredNode((Node) nl.get(i), "./OnlineResource", nsContext);
      OnlineResource olr = parseOnLineResource(tmp);
      metadataURL[i] = new MetadataURL(type, format, olr.getLinkage().getHref());
    }

    LOG.exiting();
    return metadataURL;
  }
  /**
   * Parse Legend URL
   *
   * @param node
   * @return LegendURL[]
   * @throws XMLParsingException
   */
  protected LegendURL[] parseLegendURL(Node node) throws XMLParsingException {
    LOG.entering();

    List nl = XMLTools.getNodes(node, "./LegendURL", nsContext);
    LegendURL[] lURL = new LegendURL[nl.size()];
    for (int i = 0; i < lURL.length; i++) {
      int width = XMLTools.getRequiredNodeAsInt((Node) nl.get(i), "./@width", nsContext);
      int height = XMLTools.getRequiredNodeAsInt((Node) nl.get(i), "./@height", nsContext);
      String format = XMLTools.getRequiredNodeAsString((Node) nl.get(i), "./Format", nsContext);
      Element tmp =
          (Element) XMLTools.getRequiredNode((Node) nl.get(i), "./OnlineResource", nsContext);
      OnlineResource olr = parseOnLineResource(tmp);
      lURL[i] = new LegendURL(width, height, format, olr.getLinkage().getHref());
    }

    LOG.exiting();
    return lURL;
  }