/// <summary> /// Parse the <see cref="XmlDocument"/> underlying this <see cref="Presentation"/> object, /// populating role and link information. /// </summary> /// <param name="numErrors">An output parameter. The number of errors encountered during /// the parse process.</param> protected override void ParseInternal(out int numErrors) { numErrors = 0; try { XmlNodeList locNodes = theDocument.SelectNodes(LOCATOR_KEY, theManager); if (locNodes == null || locNodes.Count == 0) { //Common.WriteError("XBRLParser.Error.LabelDoesNotContainLabels", errorList, schemaFilename); //++numErrors; return; } } catch { //No need to write the exception again, more than likely, the exception is already caught outside (missing label file) return; } XmlNodeList labelList = theDocument.SelectNodes(LABEL_LINK_KEY, theManager); labels = new Hashtable(); foreach (XmlNode node in labelList) { LabelLink ll = new LabelLink(errorList); ll.ParseLinks(node, theManager, out numErrors); if (ll.Labels != null) { foreach (LabelLocator lloc in ll.Labels.Values) { LabelLocator orig = labels[lloc.HRef] as LabelLocator; if (orig == null) { labels[lloc.HRef] = lloc; } else { orig.AddLabels(lloc, errorList); } } } } ParseRolesAndLanguages(ref numErrors); }
/// <summary> /// Parse the <see cref="XmlDocument"/> underlying this <see cref="Presentation"/> object, /// populating role and link information. /// </summary> /// <param name="numErrors">An output parameter. The number of errors encountered during /// the parse process.</param> protected override void ParseInternal(out int numErrors) { numErrors = 0; try { XmlNodeList locNodes = theDocument.SelectNodes(LOCATOR_KEY, theManager); if (locNodes == null || locNodes.Count == 0) { //Common.WriteError("XBRLParser.Error.LabelDoesNotContainLabels", errorList, schemaFilename); //++numErrors; return; } } catch { //No need to write the exception again, more than likely, the exception is already caught outside (missing label file) return; } XmlNodeList labelList = theDocument.SelectNodes( LABEL_LINK_KEY, theManager ); labels = new Hashtable(); foreach ( XmlNode node in labelList ) { LabelLink ll = new LabelLink(errorList); ll.ParseLinks(node, theManager, out numErrors); if (ll.Labels != null) { foreach (LabelLocator lloc in ll.Labels.Values) { LabelLocator orig = labels[lloc.HRef] as LabelLocator; if (orig == null) { labels[lloc.HRef] = lloc; } else { orig.AddLabels(lloc, errorList); } } } } ParseRolesAndLanguages(ref numErrors); }