/// <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; XmlNodeList locNodes = theDocument.SelectNodes(LOCATOR_KEY, theManager); if (locNodes == null || locNodes.Count == 0) { Common.WriteWarning("XBRLParser.Error.ReferenceDoesNotContainReferences", errorList, schemaFilename); return; } XmlNodeList refs = theDocument.SelectNodes(REFERENCE_LINK_KEY, theManager); foreach (XmlNode node in refs) { ReferenceLink refLink = new ReferenceLink(errorList); refLink.ParseLinks(node, theManager, out numErrors); if (refLink.References != null && refLink.References.Count > 0) { if (references == null) { references = new Hashtable(); } foreach (ReferenceLocator rl in refLink.References.Values) { if (references.ContainsKey(rl.HRef)) { ReferenceLocator orig = references[rl.HRef] as ReferenceLocator; orig.Merge(rl); } else { references[rl.HRef] = rl; } } } } }
/// <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; XmlNodeList locNodes = theDocument.SelectNodes( LOCATOR_KEY, theManager ); if ( locNodes == null || locNodes.Count == 0 ) { Common.WriteWarning( "XBRLParser.Error.ReferenceDoesNotContainReferences", errorList, schemaFilename ); return; } XmlNodeList refs = theDocument.SelectNodes( REFERENCE_LINK_KEY, theManager ); foreach ( XmlNode node in refs ) { ReferenceLink refLink = new ReferenceLink(errorList); refLink.ParseLinks( node, theManager, out numErrors ); if (refLink.References != null && refLink.References.Count > 0) { if (references == null) { references = new Hashtable(); } foreach (ReferenceLocator rl in refLink.References.Values ) { if (references.ContainsKey(rl.HRef)) { ReferenceLocator orig = references[rl.HRef] as ReferenceLocator; orig.Merge(rl); } else { references[rl.HRef] = rl; } } } } }