Exemplo n.º 1
0
        DefinitionListing ParseDefinitionList()
        {
            DefinitionListing listing = new DefinitionListing();

            while (!_classifier.AtEnd)
            {
                // Read the term line:
                Line definitionLine = _classifier.PeekLine();

                if (definitionLine.Classification != LineClassification.DefinitionListTerm)
                {
                    Debug.Assert(listing.Items.Count != 0);

                    return listing;
                }

                DefinitionListItem listingItem = new DefinitionListItem(definitionLine.Text);

                _classifier.ReadLine();

                ParseDefinitionListingItemContents(listingItem);

                listing.Items.Add(listingItem);
            }

            return listing;
        }
Exemplo n.º 2
0
        void RenderDefinitionListing(DefinitionListing listing, XmlElement container)
        {
            XmlElement listingElement = container.OwnerDocument.CreateElement("definition-list");
            container.AppendChild(listingElement);

            foreach (DefinitionListItem item in listing.Items)
            {
                XmlElement listingItemElement = container.OwnerDocument.CreateElement("definition-list-item");
                listingElement.AppendChild(listingItemElement);

                listingItemElement.SetAttribute("term", item.Term);

                RenderBlockSequenceInto(item, listingItemElement);
            }
        }
Exemplo n.º 3
0
 public virtual void VisitDefinitionListing(DefinitionListing listing)
 {
 }