internal override void UpdateResources(LocatorBase locator, string to) { TempLabelData tld = resources[to] as TempLabelData; ((LabelLocator)locator).AddLabel(tld.language, tld.role, tld.labelData); resources.Remove(to); }
public override bool LoadResource(XmlNode child) { string role = "http://www.xbrl.org/2003/role/label"; string label = string.Empty; string lang = string.Empty; if (!Common.GetAttribute(child, LABEL_TAG, ref label, errorList) || !Common.GetAttribute(child, Label.LANG_ATTR, ref lang, errorList)) { return(false); } Common.GetAttribute(child, Label.ROLE_ATTR, ref role, null); string labelRole = role.Substring(role.LastIndexOf('/') + 1); ArrayList lls = arcs[label] as ArrayList; if (lls != null) { foreach (LabelLocator ll in lls) { try { ll.AddLabel(lang, labelRole, child.InnerText); } catch (ArgumentException) { // label aready exists Common.WriteWarning("XBRLParser.Warning.LabelRoleAlreadyExists", errorList, ll.Label, labelRole, lang, child.InnerText); } } } else { // store it away TempLabelData tld = new TempLabelData(label, lang, labelRole, child.InnerText); resources[label] = tld; return(true); } return(true); }
public override bool LoadResource( XmlNode child ) { string role = "http://www.xbrl.org/2003/role/label"; string label = string.Empty; string lang = string.Empty; if ( !Common.GetAttribute( child, LABEL_TAG, ref label, errorList ) || !Common.GetAttribute( child, Label.LANG_ATTR, ref lang, errorList ) ) { return false; } Common.GetAttribute(child, Label.ROLE_ATTR, ref role, null); string labelRole = role.Substring(role.LastIndexOf('/') + 1); ArrayList lls = arcs[label] as ArrayList; if (lls != null) { foreach (LabelLocator ll in lls) { try { ll.AddLabel(lang, labelRole, child.InnerText); } catch (ArgumentException) { // label aready exists Common.WriteWarning("XBRLParser.Warning.LabelRoleAlreadyExists", errorList, ll.Label, labelRole, lang, child.InnerText); } } } else { // store it away TempLabelData tld = new TempLabelData( label, lang, labelRole, child.InnerText ); resources[label] = tld; return true; } return true; }