Esempio n. 1
0
 internal FootnoteArc(FootnoteLink ParentLink, XmlNode FootnoteArcNode)
 {
     thisFootnoteArcNode = FootnoteArcNode;
     this.Link = ParentLink;
     foreach (XmlAttribute CurrentAttribute in thisFootnoteArcNode.Attributes)
     {
         if(CurrentAttribute.LocalName.Equals("title") == true)
             this.Title = CurrentAttribute.Value;
         else if (CurrentAttribute.LocalName.Equals("from") == true)
             this.FromId = CurrentAttribute.Value;
         else if (CurrentAttribute.LocalName.Equals("to") == true)
             this.ToId = CurrentAttribute.Value;
     }
 }
Esempio n. 2
0
 internal Footnote(FootnoteLink ParentLink, XmlNode FootnoteNode)
 {
     thisFootnoteNode = FootnoteNode;
     this.Link = ParentLink;
     this.Text = thisFootnoteNode.FirstChild.Value;
     this.Culture = null;
     foreach (XmlAttribute CurrentAttribute in thisFootnoteNode.Attributes)
     {
         if (CurrentAttribute.LocalName.Equals("title") == true)
             this.Title = CurrentAttribute.Value;
         else if (CurrentAttribute.LocalName.Equals("label") == true)
             this.Label = CurrentAttribute.Value;
         else if (CurrentAttribute.LocalName.Equals("lang") == true)
             this.Culture = new CultureInfo(CurrentAttribute.Value);
     }
     if (this.Culture == null)
     {
         StringBuilder MessageBuilder = new StringBuilder();
         string StringFormat = AssemblyResources.GetName("NoLangForFootnote");
         MessageBuilder.AppendFormat(StringFormat, this.Label);
         this.Link.Fragment.AddValidationError(new FootnoteValidationError(this, MessageBuilder.ToString()));
     }
 }