private static void WriteConstraintRow(this MamlWriter writer, Context context, ArtItem artItem, string constrainedType, XmlSchemaIdentityConstraint constraint) { writer.StartTableRow(); writer.StartTableRowEntry(); writer.WriteArtItemInline(artItem); writer.EndTableRowEntry(); writer.StartTableRowEntry(); writer.WriteString(constrainedType); writer.EndTableRowEntry(); writer.StartTableRowEntry(); writer.WriteSummaryForObject(context, constraint); writer.EndTableRowEntry(); writer.StartTableRowEntry(); writer.WriteString(constraint.Selector.XPath); writer.EndTableRowEntry(); writer.StartTableRowEntry(); writer.WriteConstraintFieldList(constraint.Fields); writer.EndTableRowEntry(); writer.EndTableRow(); }
private static void WriteJumpTableSection(this MamlWriter writer, ICollection <ListItem> listItems, string title, string address) { if (listItems.Count == 0) { return; } writer.StartSection(title, address); writer.StartTable(); writer.StartTableHeader(); writer.StartTableRow(); writer.StartTableRowEntry(); writer.EndTableRowEntry(); writer.StartTableRowEntry(); writer.WriteString("Element"); writer.EndTableRowEntry(); writer.StartTableRowEntry(); writer.WriteString("Description"); writer.EndTableRowEntry(); writer.EndTableRow(); writer.EndTableHeader(); foreach (var listItem in listItems) { writer.StartTableRow(); writer.StartTableRowEntry(); writer.WriteArtItemInline(listItem.ArtItem); writer.EndTableRowEntry(); writer.StartTableRowEntry(); writer.WriteTopicLink(listItem.Topic); writer.EndTableRowEntry(); writer.StartTableRowEntry(); writer.WriteRaw(listItem.SummaryMarkup); writer.EndTableRowEntry(); writer.EndTableRow(); } writer.EndTable(); writer.EndSection(); }
private static void WriteJumpTableSection(this MamlWriter writer, Context context, ICollection <ListItem> listItems, string title, string address) { if (listItems.Count == 0) { return; } writer.StartSection(title, address); writer.StartTable(); writer.StartTableHeader(); writer.StartTableRow(); //writer.WriteRowEntry(String.Empty); writer.StartTableRowEntry(); writer.StartParagraph(); writer.WriteToken("iconColumn"); writer.EndParagraph(); writer.EndTableRowEntry(); if (title.EndsWith("s", StringComparison.Ordinal)) { if (title.IndexOf(' ') < 0) // if it is a single word... { writer.WriteRowEntry(title.Remove(title.Length - 1)); } else { // Write non-breaking title text... writer.StartTableRowEntry(); writer.StartParagraph(); writer.WriteStartElement("notLocalizable"); //notLocalizable writer.WriteAttributeString("address", writer.GetNextNobrAddress()); writer.WriteString(title.Remove(title.Length - 1)); writer.WriteEndElement(); //notLocalizable writer.EndParagraph(); writer.EndTableRowEntry(); } } else { writer.WriteRowEntry("Element"); } writer.WriteRowEntry("Description"); writer.EndTableRow(); writer.EndTableHeader(); foreach (var listItem in listItems) { writer.StartTableRow(); writer.StartTableRowEntry(); writer.StartParagraph(); writer.WriteArtItemInline(listItem.ArtItem); writer.EndParagraph(); writer.EndTableRowEntry(); writer.StartTableRowEntry(); writer.StartParagraph(); writer.WriteTopicLink(listItem.Topic); writer.EndParagraph(); writer.EndTableRowEntry(); writer.StartTableRowEntry(); writer.StartParagraph(); writer.WriteRaw(listItem.SummaryMarkup); writer.EndParagraph(); writer.EndTableRowEntry(); writer.EndTableRow(); } writer.EndTable(); writer.StartParagraph(); if (context.MoveToTopLink) { // Create a link to the introduction, it is the top... writer.WriteLink("#introduction", "Top"); } writer.EndParagraph(); writer.EndSection(); }