Example #1
0
 internal Footnote(FootnoteLink ParentLink, INode FootnoteNode)
 {
     thisFootnoteNode = FootnoteNode;
     this.Link        = ParentLink;
     this.Text        = thisFootnoteNode.FirstChild.Value;
     this.Culture     = null;
     foreach (IAttribute 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()));
     }
 }
Example #2
0
        internal FootnoteLocator(FootnoteLink ParentLink, INode LocNode)
        {
            thisLocNode = LocNode;
            this.Link   = ParentLink;
            foreach (IAttribute CurrentAttribute in LocNode.Attributes)
            {
                if (CurrentAttribute.LocalName.Equals("href") == true)
                {
                    string AttributeValue;

                    AttributeValue = CurrentAttribute.Value;
                    this.Href      = new HyperlinkReference(AttributeValue);
                }
                else if (CurrentAttribute.LocalName.Equals("label") == true)
                {
                    this.Label = CurrentAttribute.Value;
                }
            }
        }
Example #3
0
 internal FootnoteArc(FootnoteLink ParentLink, INode FootnoteArcNode) : base(FootnoteArcNode)
 {
     this.Link       = ParentLink;
     this.FromSource = FromSources.None;
 }