main/Smdn.Fundamental.Xml.Xhtml-3.1.0
Created
March 11, 2024 15:12
-
-
Save smdn/93963f63599cbaeb805b11b4e60c7640 to your computer and use it in GitHub Desktop.
Smdn.Fundamental.Xml.Xhtml 3.1.0 Release Notes
- 2024-03-12 implement IAsyncDisposable
- 2024-03-11 update assembly version
- 2024-03-11 implement FlushAsync()
- 2024-03-11 implement XmlWriter's async operations
- 2024-03-11 bump Smdn.Fundamental.Xml.Linq up to 3.1.0
- 2024-03-10 enable nullable for PolyglotHtml5Writer
- 2023-12-19 fix warning IDE1006: Naming rule violation
- 2023-12-19 disable warning CS1591
- 2023-05-11 compliant IDE0030; empty the root namespace so that the namespace is determined only by the directory name
- 2023-05-10 validate the parameter is non-null before using it
- 2023-05-10 specify StringComparison for clarity
- 2023-01-22 update package reference for Smdn.Fundamental.Shim
- 2023-01-15 replace ProjectReference with ReferenceAssemblyVersion to ProjectOrPackageReference
- 2023-01-12 set ReferenceAssemblyVersion to the ProjectReferences
- 2023-01-12 use ReferencePackageVersion instead of VersionRange
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/doc/api-list/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml-net45.apilist.cs b/doc/api-list/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml-net45.apilist.cs | |
index fd232574..41cf38e9 100644 | |
--- a/doc/api-list/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml-net45.apilist.cs | |
+++ b/doc/api-list/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml-net45.apilist.cs | |
@@ -1,274 +1,298 @@ | |
-// Smdn.Fundamental.Xml.Xhtml.dll (Smdn.Fundamental.Xml.Xhtml-3.0.1) | |
+// Smdn.Fundamental.Xml.Xhtml.dll (Smdn.Fundamental.Xml.Xhtml-3.1.0) | |
// Name: Smdn.Fundamental.Xml.Xhtml | |
-// AssemblyVersion: 3.0.1.0 | |
-// InformationalVersion: 3.0.1+c848761b03aeddaf02bfeb277f3f5672e904cf60 | |
+// AssemblyVersion: 3.1.0.0 | |
+// InformationalVersion: 3.1.0+b5413ee3943c96bf97583eb7971556b337be4f02 | |
// TargetFramework: .NETFramework,Version=v4.5 | |
// Configuration: Release | |
// Referenced assemblies: | |
-// Smdn.Fundamental.Shim, Version=3.1.2.0, Culture=neutral | |
-// Smdn.Fundamental.Xml.Linq, Version=3.0.0.0, Culture=neutral | |
+// Smdn.Fundamental.Shim, Version=3.1.4.0, Culture=neutral | |
+// Smdn.Fundamental.Xml.Linq, Version=3.1.0.0, Culture=neutral | |
// System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | |
// System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | |
// System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 | |
// System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | |
// System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | |
// mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text; | |
+using System.Threading.Tasks; | |
using System.Xml; | |
using System.Xml.Linq; | |
using Smdn.Xml.Xhtml; | |
namespace Smdn.Xml.Linq.Xhtml { | |
public static class Extensions { | |
public static XElement GetElementById(this XContainer container, string id) {} | |
public static bool HasHtmlClass(this XElement element, IEnumerable<string> classList) {} | |
public static bool HasHtmlClass(this XElement element, string @class) {} | |
} | |
public static class XHtmlAttributeNames { | |
public static readonly XName AccessKey; // = "accesskey" | |
public static readonly XName Alt; // = "alt" | |
public static readonly XName Cite; // = "cite" | |
public static readonly XName Class; // = "class" | |
public static readonly XName ContentEditable; // = "contenteditable" | |
public static readonly XName Dir; // = "dir" | |
public static readonly XName Download; // = "download" | |
public static readonly XName Draggable; // = "draggable" | |
public static readonly XName Hidden; // = "hidden" | |
public static readonly XName Href; // = "href" | |
public static readonly XName HrefLang; // = "hreflang" | |
public static readonly XName Id; // = "id" | |
public static readonly XName Lang; // = "lang" | |
public static readonly XName Media; // = "media" | |
public static readonly XName Rel; // = "rel" | |
public static readonly XName SpellCheck; // = "spellcheck" | |
public static readonly XName Src; // = "src" | |
public static readonly XName Style; // = "style" | |
public static readonly XName TabIndex; // = "tabindex" | |
public static readonly XName Target; // = "target" | |
public static readonly XName Title; // = "title" | |
public static readonly XName Translate; // = "translate" | |
public static readonly XName Type; // = "type" | |
} | |
public class XHtmlClassAttribute : XAttribute { | |
public static string JoinClassList(IEnumerable<string> classList) {} | |
public XHtmlClassAttribute(IEnumerable<string> classList) {} | |
public XHtmlClassAttribute(params string[] classList) {} | |
public XHtmlClassAttribute(string @class) {} | |
} | |
public static class XHtmlElementNames { | |
public static readonly XName A; // = "{http://www.w3.org/1999/xhtml}a" | |
public static readonly XName Abbr; // = "{http://www.w3.org/1999/xhtml}abbr" | |
public static readonly XName Address; // = "{http://www.w3.org/1999/xhtml}address" | |
public static readonly XName Area; // = "{http://www.w3.org/1999/xhtml}area" | |
public static readonly XName Article; // = "{http://www.w3.org/1999/xhtml}article" | |
public static readonly XName Aside; // = "{http://www.w3.org/1999/xhtml}aside" | |
public static readonly XName Audio; // = "{http://www.w3.org/1999/xhtml}audio" | |
public static readonly XName B; // = "{http://www.w3.org/1999/xhtml}b" | |
public static readonly XName BR; // = "{http://www.w3.org/1999/xhtml}br" | |
public static readonly XName Base; // = "{http://www.w3.org/1999/xhtml}base" | |
public static readonly XName Blockquote; // = "{http://www.w3.org/1999/xhtml}blockquote" | |
public static readonly XName Body; // = "{http://www.w3.org/1999/xhtml}body" | |
public static readonly XName Button; // = "{http://www.w3.org/1999/xhtml}button" | |
public static readonly XName Canvas; // = "{http://www.w3.org/1999/xhtml}canvas" | |
public static readonly XName Caption; // = "{http://www.w3.org/1999/xhtml}caption" | |
public static readonly XName Cite; // = "{http://www.w3.org/1999/xhtml}cite" | |
public static readonly XName Code; // = "{http://www.w3.org/1999/xhtml}code" | |
public static readonly XName Col; // = "{http://www.w3.org/1999/xhtml}col" | |
public static readonly XName ColGroup; // = "{http://www.w3.org/1999/xhtml}colgroup" | |
public static readonly XName DBI; // = "{http://www.w3.org/1999/xhtml}dbi" | |
public static readonly XName DBO; // = "{http://www.w3.org/1999/xhtml}dbo" | |
public static readonly XName DD; // = "{http://www.w3.org/1999/xhtml}dd" | |
public static readonly XName DL; // = "{http://www.w3.org/1999/xhtml}dl" | |
public static readonly XName DT; // = "{http://www.w3.org/1999/xhtml}dt" | |
public static readonly XName Data; // = "{http://www.w3.org/1999/xhtml}data" | |
public static readonly XName DataList; // = "{http://www.w3.org/1999/xhtml}datalist" | |
public static readonly XName Del; // = "{http://www.w3.org/1999/xhtml}del" | |
public static readonly XName Details; // = "{http://www.w3.org/1999/xhtml}details" | |
public static readonly XName Dfn; // = "{http://www.w3.org/1999/xhtml}dfn" | |
public static readonly XName Dialog; // = "{http://www.w3.org/1999/xhtml}dialog" | |
public static readonly XName Div; // = "{http://www.w3.org/1999/xhtml}div" | |
public static readonly XName EM; // = "{http://www.w3.org/1999/xhtml}em" | |
public static readonly XName Embed; // = "{http://www.w3.org/1999/xhtml}embed" | |
public static readonly XName FieldSet; // = "{http://www.w3.org/1999/xhtml}fieldset" | |
public static readonly XName FigCaption; // = "{http://www.w3.org/1999/xhtml}figcaption" | |
public static readonly XName Figure; // = "{http://www.w3.org/1999/xhtml}figure" | |
public static readonly XName Footer; // = "{http://www.w3.org/1999/xhtml}footer" | |
public static readonly XName Form; // = "{http://www.w3.org/1999/xhtml}form" | |
public static readonly XName H1; // = "{http://www.w3.org/1999/xhtml}h1" | |
public static readonly XName H2; // = "{http://www.w3.org/1999/xhtml}h2" | |
public static readonly XName H3; // = "{http://www.w3.org/1999/xhtml}h3" | |
public static readonly XName H4; // = "{http://www.w3.org/1999/xhtml}h4" | |
public static readonly XName H5; // = "{http://www.w3.org/1999/xhtml}h5" | |
public static readonly XName H6; // = "{http://www.w3.org/1999/xhtml}h6" | |
public static readonly XName HR; // = "{http://www.w3.org/1999/xhtml}hr" | |
public static readonly XName Head; // = "{http://www.w3.org/1999/xhtml}head" | |
public static readonly XName Header; // = "{http://www.w3.org/1999/xhtml}header" | |
public static readonly XName Html; // = "{http://www.w3.org/1999/xhtml}html" | |
public static readonly XName I; // = "{http://www.w3.org/1999/xhtml}i" | |
public static readonly XName IFrame; // = "{http://www.w3.org/1999/xhtml}iframe" | |
public static readonly XName Img; // = "{http://www.w3.org/1999/xhtml}img" | |
public static readonly XName Input; // = "{http://www.w3.org/1999/xhtml}input" | |
public static readonly XName Ins; // = "{http://www.w3.org/1999/xhtml}ins" | |
public static readonly XName Kbd; // = "{http://www.w3.org/1999/xhtml}kbd" | |
public static readonly XName LI; // = "{http://www.w3.org/1999/xhtml}li" | |
public static readonly XName Label; // = "{http://www.w3.org/1999/xhtml}label" | |
public static readonly XName Legend; // = "{http://www.w3.org/1999/xhtml}legend" | |
public static readonly XName Link; // = "{http://www.w3.org/1999/xhtml}link" | |
public static readonly XName Main; // = "{http://www.w3.org/1999/xhtml}main" | |
public static readonly XName Map; // = "{http://www.w3.org/1999/xhtml}map" | |
public static readonly XName Mark; // = "{http://www.w3.org/1999/xhtml}mark" | |
public static readonly XName Math; // = "{http://www.w3.org/1998/Math/MathML}math" | |
public static readonly XName Meta; // = "{http://www.w3.org/1999/xhtml}meta" | |
public static readonly XName Meter; // = "{http://www.w3.org/1999/xhtml}meter" | |
public static readonly XName Nav; // = "{http://www.w3.org/1999/xhtml}nav" | |
public static readonly XName NoScript; // = "{http://www.w3.org/1999/xhtml}noscript" | |
public static readonly XName OL; // = "{http://www.w3.org/1999/xhtml}ol" | |
public static readonly XName Object; // = "{http://www.w3.org/1999/xhtml}object" | |
public static readonly XName OptGroup; // = "{http://www.w3.org/1999/xhtml}optgroup" | |
public static readonly XName Option; // = "{http://www.w3.org/1999/xhtml}option" | |
public static readonly XName Output; // = "{http://www.w3.org/1999/xhtml}output" | |
public static readonly XName P; // = "{http://www.w3.org/1999/xhtml}p" | |
public static readonly XName Param; // = "{http://www.w3.org/1999/xhtml}param" | |
public static readonly XName Picture; // = "{http://www.w3.org/1999/xhtml}picture" | |
public static readonly XName Pre; // = "{http://www.w3.org/1999/xhtml}pre" | |
public static readonly XName Progress; // = "{http://www.w3.org/1999/xhtml}progress" | |
public static readonly XName Q; // = "{http://www.w3.org/1999/xhtml}q" | |
public static readonly XName RB; // = "{http://www.w3.org/1999/xhtml}rb" | |
public static readonly XName RP; // = "{http://www.w3.org/1999/xhtml}rp" | |
public static readonly XName RT; // = "{http://www.w3.org/1999/xhtml}rt" | |
public static readonly XName RTC; // = "{http://www.w3.org/1999/xhtml}rtc" | |
public static readonly XName Ruby; // = "{http://www.w3.org/1999/xhtml}ruby" | |
public static readonly XName S; // = "{http://www.w3.org/1999/xhtml}s" | |
public static readonly XName SVG; // = "{http://www.w3.org/2000/svg}svg" | |
public static readonly XName Samp; // = "{http://www.w3.org/1999/xhtml}samp" | |
public static readonly XName Script; // = "{http://www.w3.org/1999/xhtml}script" | |
public static readonly XName Section; // = "{http://www.w3.org/1999/xhtml}section" | |
public static readonly XName Select; // = "{http://www.w3.org/1999/xhtml}select" | |
public static readonly XName Small; // = "{http://www.w3.org/1999/xhtml}small" | |
public static readonly XName Source; // = "{http://www.w3.org/1999/xhtml}source" | |
public static readonly XName Span; // = "{http://www.w3.org/1999/xhtml}span" | |
public static readonly XName Strong; // = "{http://www.w3.org/1999/xhtml}strong" | |
public static readonly XName Style; // = "{http://www.w3.org/1999/xhtml}style" | |
public static readonly XName Sub; // = "{http://www.w3.org/1999/xhtml}sub" | |
public static readonly XName Summary; // = "{http://www.w3.org/1999/xhtml}summary" | |
public static readonly XName Sup; // = "{http://www.w3.org/1999/xhtml}sup" | |
public static readonly XName TBody; // = "{http://www.w3.org/1999/xhtml}tbody" | |
public static readonly XName TD; // = "{http://www.w3.org/1999/xhtml}td" | |
public static readonly XName TFoot; // = "{http://www.w3.org/1999/xhtml}tfoot" | |
public static readonly XName TH; // = "{http://www.w3.org/1999/xhtml}th" | |
public static readonly XName THead; // = "{http://www.w3.org/1999/xhtml}thead" | |
public static readonly XName TR; // = "{http://www.w3.org/1999/xhtml}tr" | |
public static readonly XName Table; // = "{http://www.w3.org/1999/xhtml}table" | |
public static readonly XName Template; // = "{http://www.w3.org/1999/xhtml}template" | |
public static readonly XName TextArea; // = "{http://www.w3.org/1999/xhtml}textarea" | |
public static readonly XName Time; // = "{http://www.w3.org/1999/xhtml}time" | |
public static readonly XName Title; // = "{http://www.w3.org/1999/xhtml}title" | |
public static readonly XName Track; // = "{http://www.w3.org/1999/xhtml}track" | |
public static readonly XName U; // = "{http://www.w3.org/1999/xhtml}u" | |
public static readonly XName UL; // = "{http://www.w3.org/1999/xhtml}ul" | |
public static readonly XName Var; // = "{http://www.w3.org/1999/xhtml}var" | |
public static readonly XName Video; // = "{http://www.w3.org/1999/xhtml}video" | |
public static readonly XName WBR; // = "{http://www.w3.org/1999/xhtml}wbr" | |
} | |
public static class XHtmlNamespaces { | |
public static readonly XNamespace Html; // = "http://www.w3.org/1999/xhtml" | |
public static readonly XNamespace MathML; // = "http://www.w3.org/1998/Math/MathML" | |
public static readonly XNamespace Svg; // = "http://www.w3.org/2000/svg" | |
public static readonly XNamespace XLink; // = "http://www.w3.org/1999/xlink" | |
} | |
public class XHtmlStyleAttribute : XAttribute { | |
protected static string ToJoined(IEnumerable<KeyValuePair<string, string>> styles) {} | |
protected static string ToJoined(KeyValuePair<string, string> style) {} | |
public XHtmlStyleAttribute(IEnumerable<KeyValuePair<string, string>> styles) {} | |
public XHtmlStyleAttribute(IReadOnlyDictionary<string, string> styles) {} | |
public XHtmlStyleAttribute(KeyValuePair<string, string> style) {} | |
public XHtmlStyleAttribute(params KeyValuePair<string, string>[] styles) {} | |
} | |
} | |
namespace Smdn.Xml.Xhtml { | |
public static class HtmlConvert { | |
public static string DecodeNumericCharacterReference(string s) {} | |
public static string EscapeHtml(ReadOnlySpan<char> s) {} | |
public static string EscapeXhtml(ReadOnlySpan<char> s) {} | |
public static string UnescapeHtml(ReadOnlySpan<char> s) {} | |
public static string UnescapeXhtml(ReadOnlySpan<char> s) {} | |
} | |
public class PolyglotHtml5Writer : XmlWriter { | |
protected enum ExtendedWriteState : int { | |
AttributeEnd = 6, | |
AttributeStart = 4, | |
AttributeValue = 5, | |
Closed = 12, | |
DocumentEnd = 11, | |
DocumentStart = 1, | |
ElementClosed = 10, | |
ElementClosing = 9, | |
ElementContent = 8, | |
ElementOpened = 7, | |
ElementOpening = 3, | |
Prolog = 2, | |
Start = 0, | |
} | |
public PolyglotHtml5Writer(Stream output, XmlWriterSettings settings = null) {} | |
public PolyglotHtml5Writer(StringBuilder output, XmlWriterSettings settings = null) {} | |
public PolyglotHtml5Writer(TextWriter output, XmlWriterSettings settings = null) {} | |
public PolyglotHtml5Writer(string outputFileName, XmlWriterSettings settings = null) {} | |
protected virtual XmlWriter BaseWriter { get; } | |
protected PolyglotHtml5Writer.ExtendedWriteState ExtendedState { get; } | |
public override XmlWriterSettings Settings { get; } | |
public override WriteState WriteState { get; } | |
public override string XmlLang { get; } | |
public override XmlSpace XmlSpace { get; } | |
protected override void Dispose(bool disposing) {} | |
public override void Flush() {} | |
+ public override Task FlushAsync() {} | |
public override string LookupPrefix(string ns) {} | |
public override void WriteBase64(byte[] buffer, int index, int count) {} | |
+ public override async Task WriteBase64Async(byte[] buffer, int index, int count) {} | |
public override void WriteCData(string text) {} | |
+ public override async Task WriteCDataAsync(string text) {} | |
public override void WriteCharEntity(char ch) {} | |
+ public override async Task WriteCharEntityAsync(char ch) {} | |
public override void WriteChars(char[] buffer, int index, int count) {} | |
+ public override async Task WriteCharsAsync(char[] buffer, int index, int count) {} | |
public override void WriteComment(string text) {} | |
+ public override async Task WriteCommentAsync(string text) {} | |
public override void WriteDocType(string name, string pubid, string sysid, string subset) {} | |
+ public override async Task WriteDocTypeAsync(string name, string pubid, string sysid, string subset) {} | |
public override void WriteEndAttribute() {} | |
+ protected override Task WriteEndAttributeAsync() {} | |
public override void WriteEndDocument() {} | |
+ public override async Task WriteEndDocumentAsync() {} | |
public override void WriteEndElement() {} | |
+ public override async Task WriteEndElementAsync() {} | |
public override void WriteEntityRef(string name) {} | |
+ public override async Task WriteEntityRefAsync(string name) {} | |
public override void WriteFullEndElement() {} | |
+ public override async Task WriteFullEndElementAsync() {} | |
protected virtual void WriteIndent() {} | |
+ protected virtual Task WriteIndentAsync() {} | |
public override void WriteProcessingInstruction(string name, string text) {} | |
+ public override async Task WriteProcessingInstructionAsync(string name, string text) {} | |
public override void WriteRaw(char[] buffer, int index, int count) {} | |
public override void WriteRaw(string data) {} | |
+ public override async Task WriteRawAsync(char[] buffer, int index, int count) {} | |
+ public override async Task WriteRawAsync(string data) {} | |
public override void WriteStartAttribute(string prefix, string localName, string ns) {} | |
+ protected override Task WriteStartAttributeAsync(string prefix, string localName, string ns) {} | |
public override void WriteStartDocument() {} | |
public override void WriteStartDocument(bool standalone) {} | |
+ public override async Task WriteStartDocumentAsync() {} | |
+ public override async Task WriteStartDocumentAsync(bool standalone) {} | |
public override void WriteStartElement(string prefix, string localName, string ns) {} | |
+ public override async Task WriteStartElementAsync(string prefix, string localName, string ns) {} | |
public override void WriteString(string text) {} | |
+ public override async Task WriteStringAsync(string text) {} | |
public override void WriteSurrogateCharEntity(char lowChar, char highChar) {} | |
+ public override async Task WriteSurrogateCharEntityAsync(char lowChar, char highChar) {} | |
public override void WriteWhitespace(string ws) {} | |
+ public override async Task WriteWhitespaceAsync(string ws) {} | |
} | |
public static class W3CNamespaces { | |
public const string Html = "http://www.w3.org/1999/xhtml"; | |
public const string MathML = "http://www.w3.org/1998/Math/MathML"; | |
public const string Svg = "http://www.w3.org/2000/svg"; | |
public const string XLink = "http://www.w3.org/1999/xlink"; | |
public const string Xhtml = "http://www.w3.org/1999/xhtml"; | |
} | |
} | |
-// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.1.7.0. | |
-// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating) | |
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.4.0.0. | |
+// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.3.0.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating) | |
diff --git a/doc/api-list/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml-net6.0.apilist.cs b/doc/api-list/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml-net6.0.apilist.cs | |
index 273b4712..1c2ab388 100644 | |
--- a/doc/api-list/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml-net6.0.apilist.cs | |
+++ b/doc/api-list/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml-net6.0.apilist.cs | |
@@ -1,273 +1,297 @@ | |
-// Smdn.Fundamental.Xml.Xhtml.dll (Smdn.Fundamental.Xml.Xhtml-3.0.1) | |
+// Smdn.Fundamental.Xml.Xhtml.dll (Smdn.Fundamental.Xml.Xhtml-3.1.0) | |
// Name: Smdn.Fundamental.Xml.Xhtml | |
-// AssemblyVersion: 3.0.1.0 | |
-// InformationalVersion: 3.0.1+c848761b03aeddaf02bfeb277f3f5672e904cf60 | |
+// AssemblyVersion: 3.1.0.0 | |
+// InformationalVersion: 3.1.0+b5413ee3943c96bf97583eb7971556b337be4f02 | |
// TargetFramework: .NETCoreApp,Version=v6.0 | |
// Configuration: Release | |
// Referenced assemblies: | |
-// Smdn.Fundamental.Xml.Linq, Version=3.0.0.0, Culture=neutral | |
+// Smdn.Fundamental.Xml.Linq, Version=3.1.0.0, Culture=neutral | |
// System.Collections, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Linq, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Runtime, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Text.RegularExpressions, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Xml.ReaderWriter, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Xml.XDocument, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text; | |
+using System.Threading.Tasks; | |
using System.Xml; | |
using System.Xml.Linq; | |
using Smdn.Xml.Xhtml; | |
namespace Smdn.Xml.Linq.Xhtml { | |
public static class Extensions { | |
public static XElement GetElementById(this XContainer container, string id) {} | |
public static bool HasHtmlClass(this XElement element, IEnumerable<string> classList) {} | |
public static bool HasHtmlClass(this XElement element, string @class) {} | |
} | |
public static class XHtmlAttributeNames { | |
public static readonly XName AccessKey; // = "accesskey" | |
public static readonly XName Alt; // = "alt" | |
public static readonly XName Cite; // = "cite" | |
public static readonly XName Class; // = "class" | |
public static readonly XName ContentEditable; // = "contenteditable" | |
public static readonly XName Dir; // = "dir" | |
public static readonly XName Download; // = "download" | |
public static readonly XName Draggable; // = "draggable" | |
public static readonly XName Hidden; // = "hidden" | |
public static readonly XName Href; // = "href" | |
public static readonly XName HrefLang; // = "hreflang" | |
public static readonly XName Id; // = "id" | |
public static readonly XName Lang; // = "lang" | |
public static readonly XName Media; // = "media" | |
public static readonly XName Rel; // = "rel" | |
public static readonly XName SpellCheck; // = "spellcheck" | |
public static readonly XName Src; // = "src" | |
public static readonly XName Style; // = "style" | |
public static readonly XName TabIndex; // = "tabindex" | |
public static readonly XName Target; // = "target" | |
public static readonly XName Title; // = "title" | |
public static readonly XName Translate; // = "translate" | |
public static readonly XName Type; // = "type" | |
} | |
public class XHtmlClassAttribute : XAttribute { | |
public static string JoinClassList(IEnumerable<string> classList) {} | |
public XHtmlClassAttribute(IEnumerable<string> classList) {} | |
public XHtmlClassAttribute(params string[] classList) {} | |
public XHtmlClassAttribute(string @class) {} | |
} | |
public static class XHtmlElementNames { | |
public static readonly XName A; // = "{http://www.w3.org/1999/xhtml}a" | |
public static readonly XName Abbr; // = "{http://www.w3.org/1999/xhtml}abbr" | |
public static readonly XName Address; // = "{http://www.w3.org/1999/xhtml}address" | |
public static readonly XName Area; // = "{http://www.w3.org/1999/xhtml}area" | |
public static readonly XName Article; // = "{http://www.w3.org/1999/xhtml}article" | |
public static readonly XName Aside; // = "{http://www.w3.org/1999/xhtml}aside" | |
public static readonly XName Audio; // = "{http://www.w3.org/1999/xhtml}audio" | |
public static readonly XName B; // = "{http://www.w3.org/1999/xhtml}b" | |
public static readonly XName BR; // = "{http://www.w3.org/1999/xhtml}br" | |
public static readonly XName Base; // = "{http://www.w3.org/1999/xhtml}base" | |
public static readonly XName Blockquote; // = "{http://www.w3.org/1999/xhtml}blockquote" | |
public static readonly XName Body; // = "{http://www.w3.org/1999/xhtml}body" | |
public static readonly XName Button; // = "{http://www.w3.org/1999/xhtml}button" | |
public static readonly XName Canvas; // = "{http://www.w3.org/1999/xhtml}canvas" | |
public static readonly XName Caption; // = "{http://www.w3.org/1999/xhtml}caption" | |
public static readonly XName Cite; // = "{http://www.w3.org/1999/xhtml}cite" | |
public static readonly XName Code; // = "{http://www.w3.org/1999/xhtml}code" | |
public static readonly XName Col; // = "{http://www.w3.org/1999/xhtml}col" | |
public static readonly XName ColGroup; // = "{http://www.w3.org/1999/xhtml}colgroup" | |
public static readonly XName DBI; // = "{http://www.w3.org/1999/xhtml}dbi" | |
public static readonly XName DBO; // = "{http://www.w3.org/1999/xhtml}dbo" | |
public static readonly XName DD; // = "{http://www.w3.org/1999/xhtml}dd" | |
public static readonly XName DL; // = "{http://www.w3.org/1999/xhtml}dl" | |
public static readonly XName DT; // = "{http://www.w3.org/1999/xhtml}dt" | |
public static readonly XName Data; // = "{http://www.w3.org/1999/xhtml}data" | |
public static readonly XName DataList; // = "{http://www.w3.org/1999/xhtml}datalist" | |
public static readonly XName Del; // = "{http://www.w3.org/1999/xhtml}del" | |
public static readonly XName Details; // = "{http://www.w3.org/1999/xhtml}details" | |
public static readonly XName Dfn; // = "{http://www.w3.org/1999/xhtml}dfn" | |
public static readonly XName Dialog; // = "{http://www.w3.org/1999/xhtml}dialog" | |
public static readonly XName Div; // = "{http://www.w3.org/1999/xhtml}div" | |
public static readonly XName EM; // = "{http://www.w3.org/1999/xhtml}em" | |
public static readonly XName Embed; // = "{http://www.w3.org/1999/xhtml}embed" | |
public static readonly XName FieldSet; // = "{http://www.w3.org/1999/xhtml}fieldset" | |
public static readonly XName FigCaption; // = "{http://www.w3.org/1999/xhtml}figcaption" | |
public static readonly XName Figure; // = "{http://www.w3.org/1999/xhtml}figure" | |
public static readonly XName Footer; // = "{http://www.w3.org/1999/xhtml}footer" | |
public static readonly XName Form; // = "{http://www.w3.org/1999/xhtml}form" | |
public static readonly XName H1; // = "{http://www.w3.org/1999/xhtml}h1" | |
public static readonly XName H2; // = "{http://www.w3.org/1999/xhtml}h2" | |
public static readonly XName H3; // = "{http://www.w3.org/1999/xhtml}h3" | |
public static readonly XName H4; // = "{http://www.w3.org/1999/xhtml}h4" | |
public static readonly XName H5; // = "{http://www.w3.org/1999/xhtml}h5" | |
public static readonly XName H6; // = "{http://www.w3.org/1999/xhtml}h6" | |
public static readonly XName HR; // = "{http://www.w3.org/1999/xhtml}hr" | |
public static readonly XName Head; // = "{http://www.w3.org/1999/xhtml}head" | |
public static readonly XName Header; // = "{http://www.w3.org/1999/xhtml}header" | |
public static readonly XName Html; // = "{http://www.w3.org/1999/xhtml}html" | |
public static readonly XName I; // = "{http://www.w3.org/1999/xhtml}i" | |
public static readonly XName IFrame; // = "{http://www.w3.org/1999/xhtml}iframe" | |
public static readonly XName Img; // = "{http://www.w3.org/1999/xhtml}img" | |
public static readonly XName Input; // = "{http://www.w3.org/1999/xhtml}input" | |
public static readonly XName Ins; // = "{http://www.w3.org/1999/xhtml}ins" | |
public static readonly XName Kbd; // = "{http://www.w3.org/1999/xhtml}kbd" | |
public static readonly XName LI; // = "{http://www.w3.org/1999/xhtml}li" | |
public static readonly XName Label; // = "{http://www.w3.org/1999/xhtml}label" | |
public static readonly XName Legend; // = "{http://www.w3.org/1999/xhtml}legend" | |
public static readonly XName Link; // = "{http://www.w3.org/1999/xhtml}link" | |
public static readonly XName Main; // = "{http://www.w3.org/1999/xhtml}main" | |
public static readonly XName Map; // = "{http://www.w3.org/1999/xhtml}map" | |
public static readonly XName Mark; // = "{http://www.w3.org/1999/xhtml}mark" | |
public static readonly XName Math; // = "{http://www.w3.org/1998/Math/MathML}math" | |
public static readonly XName Meta; // = "{http://www.w3.org/1999/xhtml}meta" | |
public static readonly XName Meter; // = "{http://www.w3.org/1999/xhtml}meter" | |
public static readonly XName Nav; // = "{http://www.w3.org/1999/xhtml}nav" | |
public static readonly XName NoScript; // = "{http://www.w3.org/1999/xhtml}noscript" | |
public static readonly XName OL; // = "{http://www.w3.org/1999/xhtml}ol" | |
public static readonly XName Object; // = "{http://www.w3.org/1999/xhtml}object" | |
public static readonly XName OptGroup; // = "{http://www.w3.org/1999/xhtml}optgroup" | |
public static readonly XName Option; // = "{http://www.w3.org/1999/xhtml}option" | |
public static readonly XName Output; // = "{http://www.w3.org/1999/xhtml}output" | |
public static readonly XName P; // = "{http://www.w3.org/1999/xhtml}p" | |
public static readonly XName Param; // = "{http://www.w3.org/1999/xhtml}param" | |
public static readonly XName Picture; // = "{http://www.w3.org/1999/xhtml}picture" | |
public static readonly XName Pre; // = "{http://www.w3.org/1999/xhtml}pre" | |
public static readonly XName Progress; // = "{http://www.w3.org/1999/xhtml}progress" | |
public static readonly XName Q; // = "{http://www.w3.org/1999/xhtml}q" | |
public static readonly XName RB; // = "{http://www.w3.org/1999/xhtml}rb" | |
public static readonly XName RP; // = "{http://www.w3.org/1999/xhtml}rp" | |
public static readonly XName RT; // = "{http://www.w3.org/1999/xhtml}rt" | |
public static readonly XName RTC; // = "{http://www.w3.org/1999/xhtml}rtc" | |
public static readonly XName Ruby; // = "{http://www.w3.org/1999/xhtml}ruby" | |
public static readonly XName S; // = "{http://www.w3.org/1999/xhtml}s" | |
public static readonly XName SVG; // = "{http://www.w3.org/2000/svg}svg" | |
public static readonly XName Samp; // = "{http://www.w3.org/1999/xhtml}samp" | |
public static readonly XName Script; // = "{http://www.w3.org/1999/xhtml}script" | |
public static readonly XName Section; // = "{http://www.w3.org/1999/xhtml}section" | |
public static readonly XName Select; // = "{http://www.w3.org/1999/xhtml}select" | |
public static readonly XName Small; // = "{http://www.w3.org/1999/xhtml}small" | |
public static readonly XName Source; // = "{http://www.w3.org/1999/xhtml}source" | |
public static readonly XName Span; // = "{http://www.w3.org/1999/xhtml}span" | |
public static readonly XName Strong; // = "{http://www.w3.org/1999/xhtml}strong" | |
public static readonly XName Style; // = "{http://www.w3.org/1999/xhtml}style" | |
public static readonly XName Sub; // = "{http://www.w3.org/1999/xhtml}sub" | |
public static readonly XName Summary; // = "{http://www.w3.org/1999/xhtml}summary" | |
public static readonly XName Sup; // = "{http://www.w3.org/1999/xhtml}sup" | |
public static readonly XName TBody; // = "{http://www.w3.org/1999/xhtml}tbody" | |
public static readonly XName TD; // = "{http://www.w3.org/1999/xhtml}td" | |
public static readonly XName TFoot; // = "{http://www.w3.org/1999/xhtml}tfoot" | |
public static readonly XName TH; // = "{http://www.w3.org/1999/xhtml}th" | |
public static readonly XName THead; // = "{http://www.w3.org/1999/xhtml}thead" | |
public static readonly XName TR; // = "{http://www.w3.org/1999/xhtml}tr" | |
public static readonly XName Table; // = "{http://www.w3.org/1999/xhtml}table" | |
public static readonly XName Template; // = "{http://www.w3.org/1999/xhtml}template" | |
public static readonly XName TextArea; // = "{http://www.w3.org/1999/xhtml}textarea" | |
public static readonly XName Time; // = "{http://www.w3.org/1999/xhtml}time" | |
public static readonly XName Title; // = "{http://www.w3.org/1999/xhtml}title" | |
public static readonly XName Track; // = "{http://www.w3.org/1999/xhtml}track" | |
public static readonly XName U; // = "{http://www.w3.org/1999/xhtml}u" | |
public static readonly XName UL; // = "{http://www.w3.org/1999/xhtml}ul" | |
public static readonly XName Var; // = "{http://www.w3.org/1999/xhtml}var" | |
public static readonly XName Video; // = "{http://www.w3.org/1999/xhtml}video" | |
public static readonly XName WBR; // = "{http://www.w3.org/1999/xhtml}wbr" | |
} | |
public static class XHtmlNamespaces { | |
public static readonly XNamespace Html; // = "http://www.w3.org/1999/xhtml" | |
public static readonly XNamespace MathML; // = "http://www.w3.org/1998/Math/MathML" | |
public static readonly XNamespace Svg; // = "http://www.w3.org/2000/svg" | |
public static readonly XNamespace XLink; // = "http://www.w3.org/1999/xlink" | |
} | |
public class XHtmlStyleAttribute : XAttribute { | |
protected static string ToJoined(IEnumerable<KeyValuePair<string, string>> styles) {} | |
protected static string ToJoined(KeyValuePair<string, string> style) {} | |
public XHtmlStyleAttribute(IEnumerable<KeyValuePair<string, string>> styles) {} | |
public XHtmlStyleAttribute(IReadOnlyDictionary<string, string> styles) {} | |
public XHtmlStyleAttribute(KeyValuePair<string, string> style) {} | |
public XHtmlStyleAttribute(params KeyValuePair<string, string>[] styles) {} | |
} | |
} | |
namespace Smdn.Xml.Xhtml { | |
public static class HtmlConvert { | |
public static string DecodeNumericCharacterReference(string s) {} | |
public static string EscapeHtml(ReadOnlySpan<char> s) {} | |
public static string EscapeXhtml(ReadOnlySpan<char> s) {} | |
public static string UnescapeHtml(ReadOnlySpan<char> s) {} | |
public static string UnescapeXhtml(ReadOnlySpan<char> s) {} | |
} | |
public class PolyglotHtml5Writer : XmlWriter { | |
protected enum ExtendedWriteState : int { | |
AttributeEnd = 6, | |
AttributeStart = 4, | |
AttributeValue = 5, | |
Closed = 12, | |
DocumentEnd = 11, | |
DocumentStart = 1, | |
ElementClosed = 10, | |
ElementClosing = 9, | |
ElementContent = 8, | |
ElementOpened = 7, | |
ElementOpening = 3, | |
Prolog = 2, | |
Start = 0, | |
} | |
public PolyglotHtml5Writer(Stream output, XmlWriterSettings settings = null) {} | |
public PolyglotHtml5Writer(StringBuilder output, XmlWriterSettings settings = null) {} | |
public PolyglotHtml5Writer(TextWriter output, XmlWriterSettings settings = null) {} | |
public PolyglotHtml5Writer(string outputFileName, XmlWriterSettings settings = null) {} | |
protected virtual XmlWriter BaseWriter { get; } | |
protected PolyglotHtml5Writer.ExtendedWriteState ExtendedState { get; } | |
public override XmlWriterSettings Settings { get; } | |
public override WriteState WriteState { get; } | |
public override string XmlLang { get; } | |
public override XmlSpace XmlSpace { get; } | |
protected override void Dispose(bool disposing) {} | |
public override void Flush() {} | |
+ public override Task FlushAsync() {} | |
public override string LookupPrefix(string ns) {} | |
public override void WriteBase64(byte[] buffer, int index, int count) {} | |
+ public override async Task WriteBase64Async(byte[] buffer, int index, int count) {} | |
public override void WriteCData(string text) {} | |
+ public override async Task WriteCDataAsync(string text) {} | |
public override void WriteCharEntity(char ch) {} | |
+ public override async Task WriteCharEntityAsync(char ch) {} | |
public override void WriteChars(char[] buffer, int index, int count) {} | |
+ public override async Task WriteCharsAsync(char[] buffer, int index, int count) {} | |
public override void WriteComment(string text) {} | |
+ public override async Task WriteCommentAsync(string text) {} | |
public override void WriteDocType(string name, string pubid, string sysid, string subset) {} | |
+ public override async Task WriteDocTypeAsync(string name, string pubid, string sysid, string subset) {} | |
public override void WriteEndAttribute() {} | |
+ protected override Task WriteEndAttributeAsync() {} | |
public override void WriteEndDocument() {} | |
+ public override async Task WriteEndDocumentAsync() {} | |
public override void WriteEndElement() {} | |
+ public override async Task WriteEndElementAsync() {} | |
public override void WriteEntityRef(string name) {} | |
+ public override async Task WriteEntityRefAsync(string name) {} | |
public override void WriteFullEndElement() {} | |
+ public override async Task WriteFullEndElementAsync() {} | |
protected virtual void WriteIndent() {} | |
+ protected virtual Task WriteIndentAsync() {} | |
public override void WriteProcessingInstruction(string name, string text) {} | |
+ public override async Task WriteProcessingInstructionAsync(string name, string text) {} | |
public override void WriteRaw(char[] buffer, int index, int count) {} | |
public override void WriteRaw(string data) {} | |
+ public override async Task WriteRawAsync(char[] buffer, int index, int count) {} | |
+ public override async Task WriteRawAsync(string data) {} | |
public override void WriteStartAttribute(string prefix, string localName, string ns) {} | |
+ protected override Task WriteStartAttributeAsync(string prefix, string localName, string ns) {} | |
public override void WriteStartDocument() {} | |
public override void WriteStartDocument(bool standalone) {} | |
+ public override async Task WriteStartDocumentAsync() {} | |
+ public override async Task WriteStartDocumentAsync(bool standalone) {} | |
public override void WriteStartElement(string prefix, string localName, string ns) {} | |
+ public override async Task WriteStartElementAsync(string prefix, string localName, string ns) {} | |
public override void WriteString(string text) {} | |
+ public override async Task WriteStringAsync(string text) {} | |
public override void WriteSurrogateCharEntity(char lowChar, char highChar) {} | |
+ public override async Task WriteSurrogateCharEntityAsync(char lowChar, char highChar) {} | |
public override void WriteWhitespace(string ws) {} | |
+ public override async Task WriteWhitespaceAsync(string ws) {} | |
} | |
public static class W3CNamespaces { | |
public const string Html = "http://www.w3.org/1999/xhtml"; | |
public const string MathML = "http://www.w3.org/1998/Math/MathML"; | |
public const string Svg = "http://www.w3.org/2000/svg"; | |
public const string XLink = "http://www.w3.org/1999/xlink"; | |
public const string Xhtml = "http://www.w3.org/1999/xhtml"; | |
} | |
} | |
-// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.1.7.0. | |
-// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating) | |
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.4.0.0. | |
+// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.3.0.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating) | |
diff --git a/doc/api-list/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml-netstandard1.6.apilist.cs b/doc/api-list/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml-netstandard1.6.apilist.cs | |
index 4deeedc8..15aa5987 100644 | |
--- a/doc/api-list/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml-netstandard1.6.apilist.cs | |
+++ b/doc/api-list/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml-netstandard1.6.apilist.cs | |
@@ -1,279 +1,305 @@ | |
-// Smdn.Fundamental.Xml.Xhtml.dll (Smdn.Fundamental.Xml.Xhtml-3.0.1) | |
+// Smdn.Fundamental.Xml.Xhtml.dll (Smdn.Fundamental.Xml.Xhtml-3.1.0) | |
// Name: Smdn.Fundamental.Xml.Xhtml | |
-// AssemblyVersion: 3.0.1.0 | |
-// InformationalVersion: 3.0.1+c848761b03aeddaf02bfeb277f3f5672e904cf60 | |
+// AssemblyVersion: 3.1.0.0 | |
+// InformationalVersion: 3.1.0+b5413ee3943c96bf97583eb7971556b337be4f02 | |
// TargetFramework: .NETStandard,Version=v1.6 | |
// Configuration: Release | |
// Referenced assemblies: | |
-// Smdn.Fundamental.Shim, Version=3.1.2.0, Culture=neutral | |
-// Smdn.Fundamental.Xml.Linq, Version=3.0.0.0, Culture=neutral | |
+// Smdn.Fundamental.Shim, Version=3.1.4.0, Culture=neutral | |
+// Smdn.Fundamental.Xml.Linq, Version=3.1.0.0, Culture=neutral | |
// System.Collections, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
+// System.Diagnostics.Debug, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.IO, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.IO.FileSystem, Version=4.0.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Linq, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 | |
// System.Runtime, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Runtime.Extensions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Runtime.InteropServices, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Text.RegularExpressions, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
+// System.Threading.Tasks, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Xml.ReaderWriter, Version=4.1.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
// System.Xml.XDocument, Version=4.0.10.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text; | |
+using System.Threading.Tasks; | |
using System.Xml; | |
using System.Xml.Linq; | |
using Smdn.Xml.Xhtml; | |
namespace Smdn.Xml.Linq.Xhtml { | |
public static class Extensions { | |
public static XElement GetElementById(this XContainer container, string id) {} | |
public static bool HasHtmlClass(this XElement element, IEnumerable<string> classList) {} | |
public static bool HasHtmlClass(this XElement element, string @class) {} | |
} | |
public static class XHtmlAttributeNames { | |
public static readonly XName AccessKey; // = "accesskey" | |
public static readonly XName Alt; // = "alt" | |
public static readonly XName Cite; // = "cite" | |
public static readonly XName Class; // = "class" | |
public static readonly XName ContentEditable; // = "contenteditable" | |
public static readonly XName Dir; // = "dir" | |
public static readonly XName Download; // = "download" | |
public static readonly XName Draggable; // = "draggable" | |
public static readonly XName Hidden; // = "hidden" | |
public static readonly XName Href; // = "href" | |
public static readonly XName HrefLang; // = "hreflang" | |
public static readonly XName Id; // = "id" | |
public static readonly XName Lang; // = "lang" | |
public static readonly XName Media; // = "media" | |
public static readonly XName Rel; // = "rel" | |
public static readonly XName SpellCheck; // = "spellcheck" | |
public static readonly XName Src; // = "src" | |
public static readonly XName Style; // = "style" | |
public static readonly XName TabIndex; // = "tabindex" | |
public static readonly XName Target; // = "target" | |
public static readonly XName Title; // = "title" | |
public static readonly XName Translate; // = "translate" | |
public static readonly XName Type; // = "type" | |
} | |
public class XHtmlClassAttribute : XAttribute { | |
public static string JoinClassList(IEnumerable<string> classList) {} | |
public XHtmlClassAttribute(IEnumerable<string> classList) {} | |
public XHtmlClassAttribute(params string[] classList) {} | |
public XHtmlClassAttribute(string @class) {} | |
} | |
public static class XHtmlElementNames { | |
public static readonly XName A; // = "{http://www.w3.org/1999/xhtml}a" | |
public static readonly XName Abbr; // = "{http://www.w3.org/1999/xhtml}abbr" | |
public static readonly XName Address; // = "{http://www.w3.org/1999/xhtml}address" | |
public static readonly XName Area; // = "{http://www.w3.org/1999/xhtml}area" | |
public static readonly XName Article; // = "{http://www.w3.org/1999/xhtml}article" | |
public static readonly XName Aside; // = "{http://www.w3.org/1999/xhtml}aside" | |
public static readonly XName Audio; // = "{http://www.w3.org/1999/xhtml}audio" | |
public static readonly XName B; // = "{http://www.w3.org/1999/xhtml}b" | |
public static readonly XName BR; // = "{http://www.w3.org/1999/xhtml}br" | |
public static readonly XName Base; // = "{http://www.w3.org/1999/xhtml}base" | |
public static readonly XName Blockquote; // = "{http://www.w3.org/1999/xhtml}blockquote" | |
public static readonly XName Body; // = "{http://www.w3.org/1999/xhtml}body" | |
public static readonly XName Button; // = "{http://www.w3.org/1999/xhtml}button" | |
public static readonly XName Canvas; // = "{http://www.w3.org/1999/xhtml}canvas" | |
public static readonly XName Caption; // = "{http://www.w3.org/1999/xhtml}caption" | |
public static readonly XName Cite; // = "{http://www.w3.org/1999/xhtml}cite" | |
public static readonly XName Code; // = "{http://www.w3.org/1999/xhtml}code" | |
public static readonly XName Col; // = "{http://www.w3.org/1999/xhtml}col" | |
public static readonly XName ColGroup; // = "{http://www.w3.org/1999/xhtml}colgroup" | |
public static readonly XName DBI; // = "{http://www.w3.org/1999/xhtml}dbi" | |
public static readonly XName DBO; // = "{http://www.w3.org/1999/xhtml}dbo" | |
public static readonly XName DD; // = "{http://www.w3.org/1999/xhtml}dd" | |
public static readonly XName DL; // = "{http://www.w3.org/1999/xhtml}dl" | |
public static readonly XName DT; // = "{http://www.w3.org/1999/xhtml}dt" | |
public static readonly XName Data; // = "{http://www.w3.org/1999/xhtml}data" | |
public static readonly XName DataList; // = "{http://www.w3.org/1999/xhtml}datalist" | |
public static readonly XName Del; // = "{http://www.w3.org/1999/xhtml}del" | |
public static readonly XName Details; // = "{http://www.w3.org/1999/xhtml}details" | |
public static readonly XName Dfn; // = "{http://www.w3.org/1999/xhtml}dfn" | |
public static readonly XName Dialog; // = "{http://www.w3.org/1999/xhtml}dialog" | |
public static readonly XName Div; // = "{http://www.w3.org/1999/xhtml}div" | |
public static readonly XName EM; // = "{http://www.w3.org/1999/xhtml}em" | |
public static readonly XName Embed; // = "{http://www.w3.org/1999/xhtml}embed" | |
public static readonly XName FieldSet; // = "{http://www.w3.org/1999/xhtml}fieldset" | |
public static readonly XName FigCaption; // = "{http://www.w3.org/1999/xhtml}figcaption" | |
public static readonly XName Figure; // = "{http://www.w3.org/1999/xhtml}figure" | |
public static readonly XName Footer; // = "{http://www.w3.org/1999/xhtml}footer" | |
public static readonly XName Form; // = "{http://www.w3.org/1999/xhtml}form" | |
public static readonly XName H1; // = "{http://www.w3.org/1999/xhtml}h1" | |
public static readonly XName H2; // = "{http://www.w3.org/1999/xhtml}h2" | |
public static readonly XName H3; // = "{http://www.w3.org/1999/xhtml}h3" | |
public static readonly XName H4; // = "{http://www.w3.org/1999/xhtml}h4" | |
public static readonly XName H5; // = "{http://www.w3.org/1999/xhtml}h5" | |
public static readonly XName H6; // = "{http://www.w3.org/1999/xhtml}h6" | |
public static readonly XName HR; // = "{http://www.w3.org/1999/xhtml}hr" | |
public static readonly XName Head; // = "{http://www.w3.org/1999/xhtml}head" | |
public static readonly XName Header; // = "{http://www.w3.org/1999/xhtml}header" | |
public static readonly XName Html; // = "{http://www.w3.org/1999/xhtml}html" | |
public static readonly XName I; // = "{http://www.w3.org/1999/xhtml}i" | |
public static readonly XName IFrame; // = "{http://www.w3.org/1999/xhtml}iframe" | |
public static readonly XName Img; // = "{http://www.w3.org/1999/xhtml}img" | |
public static readonly XName Input; // = "{http://www.w3.org/1999/xhtml}input" | |
public static readonly XName Ins; // = "{http://www.w3.org/1999/xhtml}ins" | |
public static readonly XName Kbd; // = "{http://www.w3.org/1999/xhtml}kbd" | |
public static readonly XName LI; // = "{http://www.w3.org/1999/xhtml}li" | |
public static readonly XName Label; // = "{http://www.w3.org/1999/xhtml}label" | |
public static readonly XName Legend; // = "{http://www.w3.org/1999/xhtml}legend" | |
public static readonly XName Link; // = "{http://www.w3.org/1999/xhtml}link" | |
public static readonly XName Main; // = "{http://www.w3.org/1999/xhtml}main" | |
public static readonly XName Map; // = "{http://www.w3.org/1999/xhtml}map" | |
public static readonly XName Mark; // = "{http://www.w3.org/1999/xhtml}mark" | |
public static readonly XName Math; // = "{http://www.w3.org/1998/Math/MathML}math" | |
public static readonly XName Meta; // = "{http://www.w3.org/1999/xhtml}meta" | |
public static readonly XName Meter; // = "{http://www.w3.org/1999/xhtml}meter" | |
public static readonly XName Nav; // = "{http://www.w3.org/1999/xhtml}nav" | |
public static readonly XName NoScript; // = "{http://www.w3.org/1999/xhtml}noscript" | |
public static readonly XName OL; // = "{http://www.w3.org/1999/xhtml}ol" | |
public static readonly XName Object; // = "{http://www.w3.org/1999/xhtml}object" | |
public static readonly XName OptGroup; // = "{http://www.w3.org/1999/xhtml}optgroup" | |
public static readonly XName Option; // = "{http://www.w3.org/1999/xhtml}option" | |
public static readonly XName Output; // = "{http://www.w3.org/1999/xhtml}output" | |
public static readonly XName P; // = "{http://www.w3.org/1999/xhtml}p" | |
public static readonly XName Param; // = "{http://www.w3.org/1999/xhtml}param" | |
public static readonly XName Picture; // = "{http://www.w3.org/1999/xhtml}picture" | |
public static readonly XName Pre; // = "{http://www.w3.org/1999/xhtml}pre" | |
public static readonly XName Progress; // = "{http://www.w3.org/1999/xhtml}progress" | |
public static readonly XName Q; // = "{http://www.w3.org/1999/xhtml}q" | |
public static readonly XName RB; // = "{http://www.w3.org/1999/xhtml}rb" | |
public static readonly XName RP; // = "{http://www.w3.org/1999/xhtml}rp" | |
public static readonly XName RT; // = "{http://www.w3.org/1999/xhtml}rt" | |
public static readonly XName RTC; // = "{http://www.w3.org/1999/xhtml}rtc" | |
public static readonly XName Ruby; // = "{http://www.w3.org/1999/xhtml}ruby" | |
public static readonly XName S; // = "{http://www.w3.org/1999/xhtml}s" | |
public static readonly XName SVG; // = "{http://www.w3.org/2000/svg}svg" | |
public static readonly XName Samp; // = "{http://www.w3.org/1999/xhtml}samp" | |
public static readonly XName Script; // = "{http://www.w3.org/1999/xhtml}script" | |
public static readonly XName Section; // = "{http://www.w3.org/1999/xhtml}section" | |
public static readonly XName Select; // = "{http://www.w3.org/1999/xhtml}select" | |
public static readonly XName Small; // = "{http://www.w3.org/1999/xhtml}small" | |
public static readonly XName Source; // = "{http://www.w3.org/1999/xhtml}source" | |
public static readonly XName Span; // = "{http://www.w3.org/1999/xhtml}span" | |
public static readonly XName Strong; // = "{http://www.w3.org/1999/xhtml}strong" | |
public static readonly XName Style; // = "{http://www.w3.org/1999/xhtml}style" | |
public static readonly XName Sub; // = "{http://www.w3.org/1999/xhtml}sub" | |
public static readonly XName Summary; // = "{http://www.w3.org/1999/xhtml}summary" | |
public static readonly XName Sup; // = "{http://www.w3.org/1999/xhtml}sup" | |
public static readonly XName TBody; // = "{http://www.w3.org/1999/xhtml}tbody" | |
public static readonly XName TD; // = "{http://www.w3.org/1999/xhtml}td" | |
public static readonly XName TFoot; // = "{http://www.w3.org/1999/xhtml}tfoot" | |
public static readonly XName TH; // = "{http://www.w3.org/1999/xhtml}th" | |
public static readonly XName THead; // = "{http://www.w3.org/1999/xhtml}thead" | |
public static readonly XName TR; // = "{http://www.w3.org/1999/xhtml}tr" | |
public static readonly XName Table; // = "{http://www.w3.org/1999/xhtml}table" | |
public static readonly XName Template; // = "{http://www.w3.org/1999/xhtml}template" | |
public static readonly XName TextArea; // = "{http://www.w3.org/1999/xhtml}textarea" | |
public static readonly XName Time; // = "{http://www.w3.org/1999/xhtml}time" | |
public static readonly XName Title; // = "{http://www.w3.org/1999/xhtml}title" | |
public static readonly XName Track; // = "{http://www.w3.org/1999/xhtml}track" | |
public static readonly XName U; // = "{http://www.w3.org/1999/xhtml}u" | |
public static readonly XName UL; // = "{http://www.w3.org/1999/xhtml}ul" | |
public static readonly XName Var; // = "{http://www.w3.org/1999/xhtml}var" | |
public static readonly XName Video; // = "{http://www.w3.org/1999/xhtml}video" | |
public static readonly XName WBR; // = "{http://www.w3.org/1999/xhtml}wbr" | |
} | |
public static class XHtmlNamespaces { | |
public static readonly XNamespace Html; // = "http://www.w3.org/1999/xhtml" | |
public static readonly XNamespace MathML; // = "http://www.w3.org/1998/Math/MathML" | |
public static readonly XNamespace Svg; // = "http://www.w3.org/2000/svg" | |
public static readonly XNamespace XLink; // = "http://www.w3.org/1999/xlink" | |
} | |
public class XHtmlStyleAttribute : XAttribute { | |
protected static string ToJoined(IEnumerable<KeyValuePair<string, string>> styles) {} | |
protected static string ToJoined(KeyValuePair<string, string> style) {} | |
public XHtmlStyleAttribute(IEnumerable<KeyValuePair<string, string>> styles) {} | |
public XHtmlStyleAttribute(IReadOnlyDictionary<string, string> styles) {} | |
public XHtmlStyleAttribute(KeyValuePair<string, string> style) {} | |
public XHtmlStyleAttribute(params KeyValuePair<string, string>[] styles) {} | |
} | |
} | |
namespace Smdn.Xml.Xhtml { | |
public static class HtmlConvert { | |
public static string DecodeNumericCharacterReference(string s) {} | |
public static string EscapeHtml(ReadOnlySpan<char> s) {} | |
public static string EscapeXhtml(ReadOnlySpan<char> s) {} | |
public static string UnescapeHtml(ReadOnlySpan<char> s) {} | |
public static string UnescapeXhtml(ReadOnlySpan<char> s) {} | |
} | |
public class PolyglotHtml5Writer : XmlWriter { | |
protected enum ExtendedWriteState : int { | |
AttributeEnd = 6, | |
AttributeStart = 4, | |
AttributeValue = 5, | |
Closed = 12, | |
DocumentEnd = 11, | |
DocumentStart = 1, | |
ElementClosed = 10, | |
ElementClosing = 9, | |
ElementContent = 8, | |
ElementOpened = 7, | |
ElementOpening = 3, | |
Prolog = 2, | |
Start = 0, | |
} | |
public PolyglotHtml5Writer(Stream output, XmlWriterSettings settings = null) {} | |
public PolyglotHtml5Writer(StringBuilder output, XmlWriterSettings settings = null) {} | |
public PolyglotHtml5Writer(TextWriter output, XmlWriterSettings settings = null) {} | |
public PolyglotHtml5Writer(string outputFileName, XmlWriterSettings settings = null) {} | |
protected virtual XmlWriter BaseWriter { get; } | |
protected PolyglotHtml5Writer.ExtendedWriteState ExtendedState { get; } | |
public override XmlWriterSettings Settings { get; } | |
public override WriteState WriteState { get; } | |
public override string XmlLang { get; } | |
public override XmlSpace XmlSpace { get; } | |
protected override void Dispose(bool disposing) {} | |
public override void Flush() {} | |
+ public override Task FlushAsync() {} | |
public override string LookupPrefix(string ns) {} | |
public override void WriteBase64(byte[] buffer, int index, int count) {} | |
+ public override async Task WriteBase64Async(byte[] buffer, int index, int count) {} | |
public override void WriteCData(string text) {} | |
+ public override async Task WriteCDataAsync(string text) {} | |
public override void WriteCharEntity(char ch) {} | |
+ public override async Task WriteCharEntityAsync(char ch) {} | |
public override void WriteChars(char[] buffer, int index, int count) {} | |
+ public override async Task WriteCharsAsync(char[] buffer, int index, int count) {} | |
public override void WriteComment(string text) {} | |
+ public override async Task WriteCommentAsync(string text) {} | |
public override void WriteDocType(string name, string pubid, string sysid, string subset) {} | |
+ public override async Task WriteDocTypeAsync(string name, string pubid, string sysid, string subset) {} | |
public override void WriteEndAttribute() {} | |
+ protected override Task WriteEndAttributeAsync() {} | |
public override void WriteEndDocument() {} | |
+ public override async Task WriteEndDocumentAsync() {} | |
public override void WriteEndElement() {} | |
+ public override async Task WriteEndElementAsync() {} | |
public override void WriteEntityRef(string name) {} | |
+ public override async Task WriteEntityRefAsync(string name) {} | |
public override void WriteFullEndElement() {} | |
+ public override async Task WriteFullEndElementAsync() {} | |
protected virtual void WriteIndent() {} | |
+ protected virtual Task WriteIndentAsync() {} | |
public override void WriteProcessingInstruction(string name, string text) {} | |
+ public override async Task WriteProcessingInstructionAsync(string name, string text) {} | |
public override void WriteRaw(char[] buffer, int index, int count) {} | |
public override void WriteRaw(string data) {} | |
+ public override async Task WriteRawAsync(char[] buffer, int index, int count) {} | |
+ public override async Task WriteRawAsync(string data) {} | |
public override void WriteStartAttribute(string prefix, string localName, string ns) {} | |
+ protected override Task WriteStartAttributeAsync(string prefix, string localName, string ns) {} | |
public override void WriteStartDocument() {} | |
public override void WriteStartDocument(bool standalone) {} | |
+ public override async Task WriteStartDocumentAsync() {} | |
+ public override async Task WriteStartDocumentAsync(bool standalone) {} | |
public override void WriteStartElement(string prefix, string localName, string ns) {} | |
+ public override async Task WriteStartElementAsync(string prefix, string localName, string ns) {} | |
public override void WriteString(string text) {} | |
+ public override async Task WriteStringAsync(string text) {} | |
public override void WriteSurrogateCharEntity(char lowChar, char highChar) {} | |
+ public override async Task WriteSurrogateCharEntityAsync(char lowChar, char highChar) {} | |
public override void WriteWhitespace(string ws) {} | |
+ public override async Task WriteWhitespaceAsync(string ws) {} | |
} | |
public static class W3CNamespaces { | |
public const string Html = "http://www.w3.org/1999/xhtml"; | |
public const string MathML = "http://www.w3.org/1998/Math/MathML"; | |
public const string Svg = "http://www.w3.org/2000/svg"; | |
public const string XLink = "http://www.w3.org/1999/xlink"; | |
public const string Xhtml = "http://www.w3.org/1999/xhtml"; | |
} | |
} | |
-// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.1.7.0. | |
-// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating) | |
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.4.0.0. | |
+// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.3.0.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating) | |
diff --git a/doc/api-list/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml-netstandard2.0.apilist.cs b/doc/api-list/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml-netstandard2.0.apilist.cs | |
index 6ebd22b1..688cc820 100644 | |
--- a/doc/api-list/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml-netstandard2.0.apilist.cs | |
+++ b/doc/api-list/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml-netstandard2.0.apilist.cs | |
@@ -1,270 +1,301 @@ | |
-// Smdn.Fundamental.Xml.Xhtml.dll (Smdn.Fundamental.Xml.Xhtml-3.0.1) | |
+// Smdn.Fundamental.Xml.Xhtml.dll (Smdn.Fundamental.Xml.Xhtml-3.1.0) | |
// Name: Smdn.Fundamental.Xml.Xhtml | |
-// AssemblyVersion: 3.0.1.0 | |
-// InformationalVersion: 3.0.1+c848761b03aeddaf02bfeb277f3f5672e904cf60 | |
+// AssemblyVersion: 3.1.0.0 | |
+// InformationalVersion: 3.1.0+b5413ee3943c96bf97583eb7971556b337be4f02 | |
// TargetFramework: .NETStandard,Version=v2.0 | |
// Configuration: Release | |
// Referenced assemblies: | |
-// Smdn.Fundamental.Shim, Version=3.1.2.0, Culture=neutral | |
-// Smdn.Fundamental.Xml.Linq, Version=3.0.0.0, Culture=neutral | |
+// Microsoft.Bcl.AsyncInterfaces, Version=8.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 | |
+// Smdn.Fundamental.Shim, Version=3.1.4.0, Culture=neutral | |
+// Smdn.Fundamental.Xml.Linq, Version=3.1.0.0, Culture=neutral | |
// System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 | |
+// System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 | |
// netstandard, Version=2.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text; | |
+using System.Threading.Tasks; | |
using System.Xml; | |
using System.Xml.Linq; | |
using Smdn.Xml.Xhtml; | |
namespace Smdn.Xml.Linq.Xhtml { | |
public static class Extensions { | |
public static XElement GetElementById(this XContainer container, string id) {} | |
public static bool HasHtmlClass(this XElement element, IEnumerable<string> classList) {} | |
public static bool HasHtmlClass(this XElement element, string @class) {} | |
} | |
public static class XHtmlAttributeNames { | |
public static readonly XName AccessKey; // = "accesskey" | |
public static readonly XName Alt; // = "alt" | |
public static readonly XName Cite; // = "cite" | |
public static readonly XName Class; // = "class" | |
public static readonly XName ContentEditable; // = "contenteditable" | |
public static readonly XName Dir; // = "dir" | |
public static readonly XName Download; // = "download" | |
public static readonly XName Draggable; // = "draggable" | |
public static readonly XName Hidden; // = "hidden" | |
public static readonly XName Href; // = "href" | |
public static readonly XName HrefLang; // = "hreflang" | |
public static readonly XName Id; // = "id" | |
public static readonly XName Lang; // = "lang" | |
public static readonly XName Media; // = "media" | |
public static readonly XName Rel; // = "rel" | |
public static readonly XName SpellCheck; // = "spellcheck" | |
public static readonly XName Src; // = "src" | |
public static readonly XName Style; // = "style" | |
public static readonly XName TabIndex; // = "tabindex" | |
public static readonly XName Target; // = "target" | |
public static readonly XName Title; // = "title" | |
public static readonly XName Translate; // = "translate" | |
public static readonly XName Type; // = "type" | |
} | |
public class XHtmlClassAttribute : XAttribute { | |
public static string JoinClassList(IEnumerable<string> classList) {} | |
public XHtmlClassAttribute(IEnumerable<string> classList) {} | |
public XHtmlClassAttribute(params string[] classList) {} | |
public XHtmlClassAttribute(string @class) {} | |
} | |
public static class XHtmlElementNames { | |
public static readonly XName A; // = "{http://www.w3.org/1999/xhtml}a" | |
public static readonly XName Abbr; // = "{http://www.w3.org/1999/xhtml}abbr" | |
public static readonly XName Address; // = "{http://www.w3.org/1999/xhtml}address" | |
public static readonly XName Area; // = "{http://www.w3.org/1999/xhtml}area" | |
public static readonly XName Article; // = "{http://www.w3.org/1999/xhtml}article" | |
public static readonly XName Aside; // = "{http://www.w3.org/1999/xhtml}aside" | |
public static readonly XName Audio; // = "{http://www.w3.org/1999/xhtml}audio" | |
public static readonly XName B; // = "{http://www.w3.org/1999/xhtml}b" | |
public static readonly XName BR; // = "{http://www.w3.org/1999/xhtml}br" | |
public static readonly XName Base; // = "{http://www.w3.org/1999/xhtml}base" | |
public static readonly XName Blockquote; // = "{http://www.w3.org/1999/xhtml}blockquote" | |
public static readonly XName Body; // = "{http://www.w3.org/1999/xhtml}body" | |
public static readonly XName Button; // = "{http://www.w3.org/1999/xhtml}button" | |
public static readonly XName Canvas; // = "{http://www.w3.org/1999/xhtml}canvas" | |
public static readonly XName Caption; // = "{http://www.w3.org/1999/xhtml}caption" | |
public static readonly XName Cite; // = "{http://www.w3.org/1999/xhtml}cite" | |
public static readonly XName Code; // = "{http://www.w3.org/1999/xhtml}code" | |
public static readonly XName Col; // = "{http://www.w3.org/1999/xhtml}col" | |
public static readonly XName ColGroup; // = "{http://www.w3.org/1999/xhtml}colgroup" | |
public static readonly XName DBI; // = "{http://www.w3.org/1999/xhtml}dbi" | |
public static readonly XName DBO; // = "{http://www.w3.org/1999/xhtml}dbo" | |
public static readonly XName DD; // = "{http://www.w3.org/1999/xhtml}dd" | |
public static readonly XName DL; // = "{http://www.w3.org/1999/xhtml}dl" | |
public static readonly XName DT; // = "{http://www.w3.org/1999/xhtml}dt" | |
public static readonly XName Data; // = "{http://www.w3.org/1999/xhtml}data" | |
public static readonly XName DataList; // = "{http://www.w3.org/1999/xhtml}datalist" | |
public static readonly XName Del; // = "{http://www.w3.org/1999/xhtml}del" | |
public static readonly XName Details; // = "{http://www.w3.org/1999/xhtml}details" | |
public static readonly XName Dfn; // = "{http://www.w3.org/1999/xhtml}dfn" | |
public static readonly XName Dialog; // = "{http://www.w3.org/1999/xhtml}dialog" | |
public static readonly XName Div; // = "{http://www.w3.org/1999/xhtml}div" | |
public static readonly XName EM; // = "{http://www.w3.org/1999/xhtml}em" | |
public static readonly XName Embed; // = "{http://www.w3.org/1999/xhtml}embed" | |
public static readonly XName FieldSet; // = "{http://www.w3.org/1999/xhtml}fieldset" | |
public static readonly XName FigCaption; // = "{http://www.w3.org/1999/xhtml}figcaption" | |
public static readonly XName Figure; // = "{http://www.w3.org/1999/xhtml}figure" | |
public static readonly XName Footer; // = "{http://www.w3.org/1999/xhtml}footer" | |
public static readonly XName Form; // = "{http://www.w3.org/1999/xhtml}form" | |
public static readonly XName H1; // = "{http://www.w3.org/1999/xhtml}h1" | |
public static readonly XName H2; // = "{http://www.w3.org/1999/xhtml}h2" | |
public static readonly XName H3; // = "{http://www.w3.org/1999/xhtml}h3" | |
public static readonly XName H4; // = "{http://www.w3.org/1999/xhtml}h4" | |
public static readonly XName H5; // = "{http://www.w3.org/1999/xhtml}h5" | |
public static readonly XName H6; // = "{http://www.w3.org/1999/xhtml}h6" | |
public static readonly XName HR; // = "{http://www.w3.org/1999/xhtml}hr" | |
public static readonly XName Head; // = "{http://www.w3.org/1999/xhtml}head" | |
public static readonly XName Header; // = "{http://www.w3.org/1999/xhtml}header" | |
public static readonly XName Html; // = "{http://www.w3.org/1999/xhtml}html" | |
public static readonly XName I; // = "{http://www.w3.org/1999/xhtml}i" | |
public static readonly XName IFrame; // = "{http://www.w3.org/1999/xhtml}iframe" | |
public static readonly XName Img; // = "{http://www.w3.org/1999/xhtml}img" | |
public static readonly XName Input; // = "{http://www.w3.org/1999/xhtml}input" | |
public static readonly XName Ins; // = "{http://www.w3.org/1999/xhtml}ins" | |
public static readonly XName Kbd; // = "{http://www.w3.org/1999/xhtml}kbd" | |
public static readonly XName LI; // = "{http://www.w3.org/1999/xhtml}li" | |
public static readonly XName Label; // = "{http://www.w3.org/1999/xhtml}label" | |
public static readonly XName Legend; // = "{http://www.w3.org/1999/xhtml}legend" | |
public static readonly XName Link; // = "{http://www.w3.org/1999/xhtml}link" | |
public static readonly XName Main; // = "{http://www.w3.org/1999/xhtml}main" | |
public static readonly XName Map; // = "{http://www.w3.org/1999/xhtml}map" | |
public static readonly XName Mark; // = "{http://www.w3.org/1999/xhtml}mark" | |
public static readonly XName Math; // = "{http://www.w3.org/1998/Math/MathML}math" | |
public static readonly XName Meta; // = "{http://www.w3.org/1999/xhtml}meta" | |
public static readonly XName Meter; // = "{http://www.w3.org/1999/xhtml}meter" | |
public static readonly XName Nav; // = "{http://www.w3.org/1999/xhtml}nav" | |
public static readonly XName NoScript; // = "{http://www.w3.org/1999/xhtml}noscript" | |
public static readonly XName OL; // = "{http://www.w3.org/1999/xhtml}ol" | |
public static readonly XName Object; // = "{http://www.w3.org/1999/xhtml}object" | |
public static readonly XName OptGroup; // = "{http://www.w3.org/1999/xhtml}optgroup" | |
public static readonly XName Option; // = "{http://www.w3.org/1999/xhtml}option" | |
public static readonly XName Output; // = "{http://www.w3.org/1999/xhtml}output" | |
public static readonly XName P; // = "{http://www.w3.org/1999/xhtml}p" | |
public static readonly XName Param; // = "{http://www.w3.org/1999/xhtml}param" | |
public static readonly XName Picture; // = "{http://www.w3.org/1999/xhtml}picture" | |
public static readonly XName Pre; // = "{http://www.w3.org/1999/xhtml}pre" | |
public static readonly XName Progress; // = "{http://www.w3.org/1999/xhtml}progress" | |
public static readonly XName Q; // = "{http://www.w3.org/1999/xhtml}q" | |
public static readonly XName RB; // = "{http://www.w3.org/1999/xhtml}rb" | |
public static readonly XName RP; // = "{http://www.w3.org/1999/xhtml}rp" | |
public static readonly XName RT; // = "{http://www.w3.org/1999/xhtml}rt" | |
public static readonly XName RTC; // = "{http://www.w3.org/1999/xhtml}rtc" | |
public static readonly XName Ruby; // = "{http://www.w3.org/1999/xhtml}ruby" | |
public static readonly XName S; // = "{http://www.w3.org/1999/xhtml}s" | |
public static readonly XName SVG; // = "{http://www.w3.org/2000/svg}svg" | |
public static readonly XName Samp; // = "{http://www.w3.org/1999/xhtml}samp" | |
public static readonly XName Script; // = "{http://www.w3.org/1999/xhtml}script" | |
public static readonly XName Section; // = "{http://www.w3.org/1999/xhtml}section" | |
public static readonly XName Select; // = "{http://www.w3.org/1999/xhtml}select" | |
public static readonly XName Small; // = "{http://www.w3.org/1999/xhtml}small" | |
public static readonly XName Source; // = "{http://www.w3.org/1999/xhtml}source" | |
public static readonly XName Span; // = "{http://www.w3.org/1999/xhtml}span" | |
public static readonly XName Strong; // = "{http://www.w3.org/1999/xhtml}strong" | |
public static readonly XName Style; // = "{http://www.w3.org/1999/xhtml}style" | |
public static readonly XName Sub; // = "{http://www.w3.org/1999/xhtml}sub" | |
public static readonly XName Summary; // = "{http://www.w3.org/1999/xhtml}summary" | |
public static readonly XName Sup; // = "{http://www.w3.org/1999/xhtml}sup" | |
public static readonly XName TBody; // = "{http://www.w3.org/1999/xhtml}tbody" | |
public static readonly XName TD; // = "{http://www.w3.org/1999/xhtml}td" | |
public static readonly XName TFoot; // = "{http://www.w3.org/1999/xhtml}tfoot" | |
public static readonly XName TH; // = "{http://www.w3.org/1999/xhtml}th" | |
public static readonly XName THead; // = "{http://www.w3.org/1999/xhtml}thead" | |
public static readonly XName TR; // = "{http://www.w3.org/1999/xhtml}tr" | |
public static readonly XName Table; // = "{http://www.w3.org/1999/xhtml}table" | |
public static readonly XName Template; // = "{http://www.w3.org/1999/xhtml}template" | |
public static readonly XName TextArea; // = "{http://www.w3.org/1999/xhtml}textarea" | |
public static readonly XName Time; // = "{http://www.w3.org/1999/xhtml}time" | |
public static readonly XName Title; // = "{http://www.w3.org/1999/xhtml}title" | |
public static readonly XName Track; // = "{http://www.w3.org/1999/xhtml}track" | |
public static readonly XName U; // = "{http://www.w3.org/1999/xhtml}u" | |
public static readonly XName UL; // = "{http://www.w3.org/1999/xhtml}ul" | |
public static readonly XName Var; // = "{http://www.w3.org/1999/xhtml}var" | |
public static readonly XName Video; // = "{http://www.w3.org/1999/xhtml}video" | |
public static readonly XName WBR; // = "{http://www.w3.org/1999/xhtml}wbr" | |
} | |
public static class XHtmlNamespaces { | |
public static readonly XNamespace Html; // = "http://www.w3.org/1999/xhtml" | |
public static readonly XNamespace MathML; // = "http://www.w3.org/1998/Math/MathML" | |
public static readonly XNamespace Svg; // = "http://www.w3.org/2000/svg" | |
public static readonly XNamespace XLink; // = "http://www.w3.org/1999/xlink" | |
} | |
public class XHtmlStyleAttribute : XAttribute { | |
protected static string ToJoined(IEnumerable<KeyValuePair<string, string>> styles) {} | |
protected static string ToJoined(KeyValuePair<string, string> style) {} | |
public XHtmlStyleAttribute(IEnumerable<KeyValuePair<string, string>> styles) {} | |
public XHtmlStyleAttribute(IReadOnlyDictionary<string, string> styles) {} | |
public XHtmlStyleAttribute(KeyValuePair<string, string> style) {} | |
public XHtmlStyleAttribute(params KeyValuePair<string, string>[] styles) {} | |
} | |
} | |
namespace Smdn.Xml.Xhtml { | |
public static class HtmlConvert { | |
public static string DecodeNumericCharacterReference(string s) {} | |
public static string EscapeHtml(ReadOnlySpan<char> s) {} | |
public static string EscapeXhtml(ReadOnlySpan<char> s) {} | |
public static string UnescapeHtml(ReadOnlySpan<char> s) {} | |
public static string UnescapeXhtml(ReadOnlySpan<char> s) {} | |
} | |
- public class PolyglotHtml5Writer : XmlWriter { | |
+ public class PolyglotHtml5Writer : | |
+ XmlWriter, | |
+ IAsyncDisposable | |
+ { | |
protected enum ExtendedWriteState : int { | |
AttributeEnd = 6, | |
AttributeStart = 4, | |
AttributeValue = 5, | |
Closed = 12, | |
DocumentEnd = 11, | |
DocumentStart = 1, | |
ElementClosed = 10, | |
ElementClosing = 9, | |
ElementContent = 8, | |
ElementOpened = 7, | |
ElementOpening = 3, | |
Prolog = 2, | |
Start = 0, | |
} | |
public PolyglotHtml5Writer(Stream output, XmlWriterSettings settings = null) {} | |
public PolyglotHtml5Writer(StringBuilder output, XmlWriterSettings settings = null) {} | |
public PolyglotHtml5Writer(TextWriter output, XmlWriterSettings settings = null) {} | |
public PolyglotHtml5Writer(string outputFileName, XmlWriterSettings settings = null) {} | |
protected virtual XmlWriter BaseWriter { get; } | |
protected PolyglotHtml5Writer.ExtendedWriteState ExtendedState { get; } | |
public override XmlWriterSettings Settings { get; } | |
public override WriteState WriteState { get; } | |
public override string XmlLang { get; } | |
public override XmlSpace XmlSpace { get; } | |
protected override void Dispose(bool disposing) {} | |
+ public virtual async ValueTask DisposeAsync() {} | |
+ protected virtual ValueTask DisposeAsyncCore() {} | |
public override void Flush() {} | |
+ public override Task FlushAsync() {} | |
public override string LookupPrefix(string ns) {} | |
public override void WriteBase64(byte[] buffer, int index, int count) {} | |
+ public override async Task WriteBase64Async(byte[] buffer, int index, int count) {} | |
public override void WriteCData(string text) {} | |
+ public override async Task WriteCDataAsync(string text) {} | |
public override void WriteCharEntity(char ch) {} | |
+ public override async Task WriteCharEntityAsync(char ch) {} | |
public override void WriteChars(char[] buffer, int index, int count) {} | |
+ public override async Task WriteCharsAsync(char[] buffer, int index, int count) {} | |
public override void WriteComment(string text) {} | |
+ public override async Task WriteCommentAsync(string text) {} | |
public override void WriteDocType(string name, string pubid, string sysid, string subset) {} | |
+ public override async Task WriteDocTypeAsync(string name, string pubid, string sysid, string subset) {} | |
public override void WriteEndAttribute() {} | |
+ protected override Task WriteEndAttributeAsync() {} | |
public override void WriteEndDocument() {} | |
+ public override async Task WriteEndDocumentAsync() {} | |
public override void WriteEndElement() {} | |
+ public override async Task WriteEndElementAsync() {} | |
public override void WriteEntityRef(string name) {} | |
+ public override async Task WriteEntityRefAsync(string name) {} | |
public override void WriteFullEndElement() {} | |
+ public override async Task WriteFullEndElementAsync() {} | |
protected virtual void WriteIndent() {} | |
+ protected virtual Task WriteIndentAsync() {} | |
public override void WriteProcessingInstruction(string name, string text) {} | |
+ public override async Task WriteProcessingInstructionAsync(string name, string text) {} | |
public override void WriteRaw(char[] buffer, int index, int count) {} | |
public override void WriteRaw(string data) {} | |
+ public override async Task WriteRawAsync(char[] buffer, int index, int count) {} | |
+ public override async Task WriteRawAsync(string data) {} | |
public override void WriteStartAttribute(string prefix, string localName, string ns) {} | |
+ protected override Task WriteStartAttributeAsync(string prefix, string localName, string ns) {} | |
public override void WriteStartDocument() {} | |
public override void WriteStartDocument(bool standalone) {} | |
+ public override async Task WriteStartDocumentAsync() {} | |
+ public override async Task WriteStartDocumentAsync(bool standalone) {} | |
public override void WriteStartElement(string prefix, string localName, string ns) {} | |
+ public override async Task WriteStartElementAsync(string prefix, string localName, string ns) {} | |
public override void WriteString(string text) {} | |
+ public override async Task WriteStringAsync(string text) {} | |
public override void WriteSurrogateCharEntity(char lowChar, char highChar) {} | |
+ public override async Task WriteSurrogateCharEntityAsync(char lowChar, char highChar) {} | |
public override void WriteWhitespace(string ws) {} | |
+ public override async Task WriteWhitespaceAsync(string ws) {} | |
} | |
public static class W3CNamespaces { | |
public const string Html = "http://www.w3.org/1999/xhtml"; | |
public const string MathML = "http://www.w3.org/1998/Math/MathML"; | |
public const string Svg = "http://www.w3.org/2000/svg"; | |
public const string XLink = "http://www.w3.org/1999/xlink"; | |
public const string Xhtml = "http://www.w3.org/1999/xhtml"; | |
} | |
} | |
-// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.1.7.0. | |
-// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating) | |
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.4.0.0. | |
+// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.3.0.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating) | |
diff --git a/doc/api-list/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml-netstandard2.1.apilist.cs b/doc/api-list/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml-netstandard2.1.apilist.cs | |
index 5a7b6fd8..1f318436 100644 | |
--- a/doc/api-list/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml-netstandard2.1.apilist.cs | |
+++ b/doc/api-list/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml-netstandard2.1.apilist.cs | |
@@ -1,268 +1,294 @@ | |
-// Smdn.Fundamental.Xml.Xhtml.dll (Smdn.Fundamental.Xml.Xhtml-3.0.1) | |
+// Smdn.Fundamental.Xml.Xhtml.dll (Smdn.Fundamental.Xml.Xhtml-3.1.0) | |
// Name: Smdn.Fundamental.Xml.Xhtml | |
-// AssemblyVersion: 3.0.1.0 | |
-// InformationalVersion: 3.0.1+c848761b03aeddaf02bfeb277f3f5672e904cf60 | |
+// AssemblyVersion: 3.1.0.0 | |
+// InformationalVersion: 3.1.0+b5413ee3943c96bf97583eb7971556b337be4f02 | |
// TargetFramework: .NETStandard,Version=v2.1 | |
// Configuration: Release | |
// Referenced assemblies: | |
-// Smdn.Fundamental.Xml.Linq, Version=3.0.0.0, Culture=neutral | |
+// Smdn.Fundamental.Xml.Linq, Version=3.1.0.0, Culture=neutral | |
// netstandard, Version=2.1.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51 | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text; | |
+using System.Threading.Tasks; | |
using System.Xml; | |
using System.Xml.Linq; | |
using Smdn.Xml.Xhtml; | |
namespace Smdn.Xml.Linq.Xhtml { | |
public static class Extensions { | |
public static XElement GetElementById(this XContainer container, string id) {} | |
public static bool HasHtmlClass(this XElement element, IEnumerable<string> classList) {} | |
public static bool HasHtmlClass(this XElement element, string @class) {} | |
} | |
public static class XHtmlAttributeNames { | |
public static readonly XName AccessKey; // = "accesskey" | |
public static readonly XName Alt; // = "alt" | |
public static readonly XName Cite; // = "cite" | |
public static readonly XName Class; // = "class" | |
public static readonly XName ContentEditable; // = "contenteditable" | |
public static readonly XName Dir; // = "dir" | |
public static readonly XName Download; // = "download" | |
public static readonly XName Draggable; // = "draggable" | |
public static readonly XName Hidden; // = "hidden" | |
public static readonly XName Href; // = "href" | |
public static readonly XName HrefLang; // = "hreflang" | |
public static readonly XName Id; // = "id" | |
public static readonly XName Lang; // = "lang" | |
public static readonly XName Media; // = "media" | |
public static readonly XName Rel; // = "rel" | |
public static readonly XName SpellCheck; // = "spellcheck" | |
public static readonly XName Src; // = "src" | |
public static readonly XName Style; // = "style" | |
public static readonly XName TabIndex; // = "tabindex" | |
public static readonly XName Target; // = "target" | |
public static readonly XName Title; // = "title" | |
public static readonly XName Translate; // = "translate" | |
public static readonly XName Type; // = "type" | |
} | |
public class XHtmlClassAttribute : XAttribute { | |
public static string JoinClassList(IEnumerable<string> classList) {} | |
public XHtmlClassAttribute(IEnumerable<string> classList) {} | |
public XHtmlClassAttribute(params string[] classList) {} | |
public XHtmlClassAttribute(string @class) {} | |
} | |
public static class XHtmlElementNames { | |
public static readonly XName A; // = "{http://www.w3.org/1999/xhtml}a" | |
public static readonly XName Abbr; // = "{http://www.w3.org/1999/xhtml}abbr" | |
public static readonly XName Address; // = "{http://www.w3.org/1999/xhtml}address" | |
public static readonly XName Area; // = "{http://www.w3.org/1999/xhtml}area" | |
public static readonly XName Article; // = "{http://www.w3.org/1999/xhtml}article" | |
public static readonly XName Aside; // = "{http://www.w3.org/1999/xhtml}aside" | |
public static readonly XName Audio; // = "{http://www.w3.org/1999/xhtml}audio" | |
public static readonly XName B; // = "{http://www.w3.org/1999/xhtml}b" | |
public static readonly XName BR; // = "{http://www.w3.org/1999/xhtml}br" | |
public static readonly XName Base; // = "{http://www.w3.org/1999/xhtml}base" | |
public static readonly XName Blockquote; // = "{http://www.w3.org/1999/xhtml}blockquote" | |
public static readonly XName Body; // = "{http://www.w3.org/1999/xhtml}body" | |
public static readonly XName Button; // = "{http://www.w3.org/1999/xhtml}button" | |
public static readonly XName Canvas; // = "{http://www.w3.org/1999/xhtml}canvas" | |
public static readonly XName Caption; // = "{http://www.w3.org/1999/xhtml}caption" | |
public static readonly XName Cite; // = "{http://www.w3.org/1999/xhtml}cite" | |
public static readonly XName Code; // = "{http://www.w3.org/1999/xhtml}code" | |
public static readonly XName Col; // = "{http://www.w3.org/1999/xhtml}col" | |
public static readonly XName ColGroup; // = "{http://www.w3.org/1999/xhtml}colgroup" | |
public static readonly XName DBI; // = "{http://www.w3.org/1999/xhtml}dbi" | |
public static readonly XName DBO; // = "{http://www.w3.org/1999/xhtml}dbo" | |
public static readonly XName DD; // = "{http://www.w3.org/1999/xhtml}dd" | |
public static readonly XName DL; // = "{http://www.w3.org/1999/xhtml}dl" | |
public static readonly XName DT; // = "{http://www.w3.org/1999/xhtml}dt" | |
public static readonly XName Data; // = "{http://www.w3.org/1999/xhtml}data" | |
public static readonly XName DataList; // = "{http://www.w3.org/1999/xhtml}datalist" | |
public static readonly XName Del; // = "{http://www.w3.org/1999/xhtml}del" | |
public static readonly XName Details; // = "{http://www.w3.org/1999/xhtml}details" | |
public static readonly XName Dfn; // = "{http://www.w3.org/1999/xhtml}dfn" | |
public static readonly XName Dialog; // = "{http://www.w3.org/1999/xhtml}dialog" | |
public static readonly XName Div; // = "{http://www.w3.org/1999/xhtml}div" | |
public static readonly XName EM; // = "{http://www.w3.org/1999/xhtml}em" | |
public static readonly XName Embed; // = "{http://www.w3.org/1999/xhtml}embed" | |
public static readonly XName FieldSet; // = "{http://www.w3.org/1999/xhtml}fieldset" | |
public static readonly XName FigCaption; // = "{http://www.w3.org/1999/xhtml}figcaption" | |
public static readonly XName Figure; // = "{http://www.w3.org/1999/xhtml}figure" | |
public static readonly XName Footer; // = "{http://www.w3.org/1999/xhtml}footer" | |
public static readonly XName Form; // = "{http://www.w3.org/1999/xhtml}form" | |
public static readonly XName H1; // = "{http://www.w3.org/1999/xhtml}h1" | |
public static readonly XName H2; // = "{http://www.w3.org/1999/xhtml}h2" | |
public static readonly XName H3; // = "{http://www.w3.org/1999/xhtml}h3" | |
public static readonly XName H4; // = "{http://www.w3.org/1999/xhtml}h4" | |
public static readonly XName H5; // = "{http://www.w3.org/1999/xhtml}h5" | |
public static readonly XName H6; // = "{http://www.w3.org/1999/xhtml}h6" | |
public static readonly XName HR; // = "{http://www.w3.org/1999/xhtml}hr" | |
public static readonly XName Head; // = "{http://www.w3.org/1999/xhtml}head" | |
public static readonly XName Header; // = "{http://www.w3.org/1999/xhtml}header" | |
public static readonly XName Html; // = "{http://www.w3.org/1999/xhtml}html" | |
public static readonly XName I; // = "{http://www.w3.org/1999/xhtml}i" | |
public static readonly XName IFrame; // = "{http://www.w3.org/1999/xhtml}iframe" | |
public static readonly XName Img; // = "{http://www.w3.org/1999/xhtml}img" | |
public static readonly XName Input; // = "{http://www.w3.org/1999/xhtml}input" | |
public static readonly XName Ins; // = "{http://www.w3.org/1999/xhtml}ins" | |
public static readonly XName Kbd; // = "{http://www.w3.org/1999/xhtml}kbd" | |
public static readonly XName LI; // = "{http://www.w3.org/1999/xhtml}li" | |
public static readonly XName Label; // = "{http://www.w3.org/1999/xhtml}label" | |
public static readonly XName Legend; // = "{http://www.w3.org/1999/xhtml}legend" | |
public static readonly XName Link; // = "{http://www.w3.org/1999/xhtml}link" | |
public static readonly XName Main; // = "{http://www.w3.org/1999/xhtml}main" | |
public static readonly XName Map; // = "{http://www.w3.org/1999/xhtml}map" | |
public static readonly XName Mark; // = "{http://www.w3.org/1999/xhtml}mark" | |
public static readonly XName Math; // = "{http://www.w3.org/1998/Math/MathML}math" | |
public static readonly XName Meta; // = "{http://www.w3.org/1999/xhtml}meta" | |
public static readonly XName Meter; // = "{http://www.w3.org/1999/xhtml}meter" | |
public static readonly XName Nav; // = "{http://www.w3.org/1999/xhtml}nav" | |
public static readonly XName NoScript; // = "{http://www.w3.org/1999/xhtml}noscript" | |
public static readonly XName OL; // = "{http://www.w3.org/1999/xhtml}ol" | |
public static readonly XName Object; // = "{http://www.w3.org/1999/xhtml}object" | |
public static readonly XName OptGroup; // = "{http://www.w3.org/1999/xhtml}optgroup" | |
public static readonly XName Option; // = "{http://www.w3.org/1999/xhtml}option" | |
public static readonly XName Output; // = "{http://www.w3.org/1999/xhtml}output" | |
public static readonly XName P; // = "{http://www.w3.org/1999/xhtml}p" | |
public static readonly XName Param; // = "{http://www.w3.org/1999/xhtml}param" | |
public static readonly XName Picture; // = "{http://www.w3.org/1999/xhtml}picture" | |
public static readonly XName Pre; // = "{http://www.w3.org/1999/xhtml}pre" | |
public static readonly XName Progress; // = "{http://www.w3.org/1999/xhtml}progress" | |
public static readonly XName Q; // = "{http://www.w3.org/1999/xhtml}q" | |
public static readonly XName RB; // = "{http://www.w3.org/1999/xhtml}rb" | |
public static readonly XName RP; // = "{http://www.w3.org/1999/xhtml}rp" | |
public static readonly XName RT; // = "{http://www.w3.org/1999/xhtml}rt" | |
public static readonly XName RTC; // = "{http://www.w3.org/1999/xhtml}rtc" | |
public static readonly XName Ruby; // = "{http://www.w3.org/1999/xhtml}ruby" | |
public static readonly XName S; // = "{http://www.w3.org/1999/xhtml}s" | |
public static readonly XName SVG; // = "{http://www.w3.org/2000/svg}svg" | |
public static readonly XName Samp; // = "{http://www.w3.org/1999/xhtml}samp" | |
public static readonly XName Script; // = "{http://www.w3.org/1999/xhtml}script" | |
public static readonly XName Section; // = "{http://www.w3.org/1999/xhtml}section" | |
public static readonly XName Select; // = "{http://www.w3.org/1999/xhtml}select" | |
public static readonly XName Small; // = "{http://www.w3.org/1999/xhtml}small" | |
public static readonly XName Source; // = "{http://www.w3.org/1999/xhtml}source" | |
public static readonly XName Span; // = "{http://www.w3.org/1999/xhtml}span" | |
public static readonly XName Strong; // = "{http://www.w3.org/1999/xhtml}strong" | |
public static readonly XName Style; // = "{http://www.w3.org/1999/xhtml}style" | |
public static readonly XName Sub; // = "{http://www.w3.org/1999/xhtml}sub" | |
public static readonly XName Summary; // = "{http://www.w3.org/1999/xhtml}summary" | |
public static readonly XName Sup; // = "{http://www.w3.org/1999/xhtml}sup" | |
public static readonly XName TBody; // = "{http://www.w3.org/1999/xhtml}tbody" | |
public static readonly XName TD; // = "{http://www.w3.org/1999/xhtml}td" | |
public static readonly XName TFoot; // = "{http://www.w3.org/1999/xhtml}tfoot" | |
public static readonly XName TH; // = "{http://www.w3.org/1999/xhtml}th" | |
public static readonly XName THead; // = "{http://www.w3.org/1999/xhtml}thead" | |
public static readonly XName TR; // = "{http://www.w3.org/1999/xhtml}tr" | |
public static readonly XName Table; // = "{http://www.w3.org/1999/xhtml}table" | |
public static readonly XName Template; // = "{http://www.w3.org/1999/xhtml}template" | |
public static readonly XName TextArea; // = "{http://www.w3.org/1999/xhtml}textarea" | |
public static readonly XName Time; // = "{http://www.w3.org/1999/xhtml}time" | |
public static readonly XName Title; // = "{http://www.w3.org/1999/xhtml}title" | |
public static readonly XName Track; // = "{http://www.w3.org/1999/xhtml}track" | |
public static readonly XName U; // = "{http://www.w3.org/1999/xhtml}u" | |
public static readonly XName UL; // = "{http://www.w3.org/1999/xhtml}ul" | |
public static readonly XName Var; // = "{http://www.w3.org/1999/xhtml}var" | |
public static readonly XName Video; // = "{http://www.w3.org/1999/xhtml}video" | |
public static readonly XName WBR; // = "{http://www.w3.org/1999/xhtml}wbr" | |
} | |
public static class XHtmlNamespaces { | |
public static readonly XNamespace Html; // = "http://www.w3.org/1999/xhtml" | |
public static readonly XNamespace MathML; // = "http://www.w3.org/1998/Math/MathML" | |
public static readonly XNamespace Svg; // = "http://www.w3.org/2000/svg" | |
public static readonly XNamespace XLink; // = "http://www.w3.org/1999/xlink" | |
} | |
public class XHtmlStyleAttribute : XAttribute { | |
protected static string ToJoined(IEnumerable<KeyValuePair<string, string>> styles) {} | |
protected static string ToJoined(KeyValuePair<string, string> style) {} | |
public XHtmlStyleAttribute(IEnumerable<KeyValuePair<string, string>> styles) {} | |
public XHtmlStyleAttribute(IReadOnlyDictionary<string, string> styles) {} | |
public XHtmlStyleAttribute(KeyValuePair<string, string> style) {} | |
public XHtmlStyleAttribute(params KeyValuePair<string, string>[] styles) {} | |
} | |
} | |
namespace Smdn.Xml.Xhtml { | |
public static class HtmlConvert { | |
public static string DecodeNumericCharacterReference(string s) {} | |
public static string EscapeHtml(ReadOnlySpan<char> s) {} | |
public static string EscapeXhtml(ReadOnlySpan<char> s) {} | |
public static string UnescapeHtml(ReadOnlySpan<char> s) {} | |
public static string UnescapeXhtml(ReadOnlySpan<char> s) {} | |
} | |
public class PolyglotHtml5Writer : XmlWriter { | |
protected enum ExtendedWriteState : int { | |
AttributeEnd = 6, | |
AttributeStart = 4, | |
AttributeValue = 5, | |
Closed = 12, | |
DocumentEnd = 11, | |
DocumentStart = 1, | |
ElementClosed = 10, | |
ElementClosing = 9, | |
ElementContent = 8, | |
ElementOpened = 7, | |
ElementOpening = 3, | |
Prolog = 2, | |
Start = 0, | |
} | |
public PolyglotHtml5Writer(Stream output, XmlWriterSettings settings = null) {} | |
public PolyglotHtml5Writer(StringBuilder output, XmlWriterSettings settings = null) {} | |
public PolyglotHtml5Writer(TextWriter output, XmlWriterSettings settings = null) {} | |
public PolyglotHtml5Writer(string outputFileName, XmlWriterSettings settings = null) {} | |
protected virtual XmlWriter BaseWriter { get; } | |
protected PolyglotHtml5Writer.ExtendedWriteState ExtendedState { get; } | |
public override XmlWriterSettings Settings { get; } | |
public override WriteState WriteState { get; } | |
public override string XmlLang { get; } | |
public override XmlSpace XmlSpace { get; } | |
protected override void Dispose(bool disposing) {} | |
+ new public virtual async ValueTask DisposeAsync() {} | |
+ new protected virtual ValueTask DisposeAsyncCore() {} | |
public override void Flush() {} | |
+ public override Task FlushAsync() {} | |
public override string LookupPrefix(string ns) {} | |
public override void WriteBase64(byte[] buffer, int index, int count) {} | |
+ public override async Task WriteBase64Async(byte[] buffer, int index, int count) {} | |
public override void WriteCData(string text) {} | |
+ public override async Task WriteCDataAsync(string text) {} | |
public override void WriteCharEntity(char ch) {} | |
+ public override async Task WriteCharEntityAsync(char ch) {} | |
public override void WriteChars(char[] buffer, int index, int count) {} | |
+ public override async Task WriteCharsAsync(char[] buffer, int index, int count) {} | |
public override void WriteComment(string text) {} | |
+ public override async Task WriteCommentAsync(string text) {} | |
public override void WriteDocType(string name, string pubid, string sysid, string subset) {} | |
+ public override async Task WriteDocTypeAsync(string name, string pubid, string sysid, string subset) {} | |
public override void WriteEndAttribute() {} | |
+ protected override Task WriteEndAttributeAsync() {} | |
public override void WriteEndDocument() {} | |
+ public override async Task WriteEndDocumentAsync() {} | |
public override void WriteEndElement() {} | |
+ public override async Task WriteEndElementAsync() {} | |
public override void WriteEntityRef(string name) {} | |
+ public override async Task WriteEntityRefAsync(string name) {} | |
public override void WriteFullEndElement() {} | |
+ public override async Task WriteFullEndElementAsync() {} | |
protected virtual void WriteIndent() {} | |
+ protected virtual Task WriteIndentAsync() {} | |
public override void WriteProcessingInstruction(string name, string text) {} | |
+ public override async Task WriteProcessingInstructionAsync(string name, string text) {} | |
public override void WriteRaw(char[] buffer, int index, int count) {} | |
public override void WriteRaw(string data) {} | |
+ public override async Task WriteRawAsync(char[] buffer, int index, int count) {} | |
+ public override async Task WriteRawAsync(string data) {} | |
public override void WriteStartAttribute(string prefix, string localName, string ns) {} | |
+ protected override Task WriteStartAttributeAsync(string prefix, string localName, string ns) {} | |
public override void WriteStartDocument() {} | |
public override void WriteStartDocument(bool standalone) {} | |
+ public override async Task WriteStartDocumentAsync() {} | |
+ public override async Task WriteStartDocumentAsync(bool standalone) {} | |
public override void WriteStartElement(string prefix, string localName, string ns) {} | |
+ public override async Task WriteStartElementAsync(string prefix, string localName, string ns) {} | |
public override void WriteString(string text) {} | |
+ public override async Task WriteStringAsync(string text) {} | |
public override void WriteSurrogateCharEntity(char lowChar, char highChar) {} | |
+ public override async Task WriteSurrogateCharEntityAsync(char lowChar, char highChar) {} | |
public override void WriteWhitespace(string ws) {} | |
+ public override async Task WriteWhitespaceAsync(string ws) {} | |
} | |
public static class W3CNamespaces { | |
public const string Html = "http://www.w3.org/1999/xhtml"; | |
public const string MathML = "http://www.w3.org/1998/Math/MathML"; | |
public const string Svg = "http://www.w3.org/2000/svg"; | |
public const string XLink = "http://www.w3.org/1999/xlink"; | |
public const string Xhtml = "http://www.w3.org/1999/xhtml"; | |
} | |
} | |
-// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.1.7.0. | |
-// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.2.0.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating) | |
+// API list generated by Smdn.Reflection.ReverseGenerating.ListApi.MSBuild.Tasks v1.4.0.0. | |
+// Smdn.Reflection.ReverseGenerating.ListApi.Core v1.3.0.0 (https://github.com/smdn/Smdn.Reflection.ReverseGenerating) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- Smdn.Fundamental.Xml.Xhtml.latest.nuspec | |
+++ Smdn.Fundamental.Xml.Xhtml.3.1.0.nuspec | |
@@ -1,42 +1,44 @@ | |
<?xml version="1.0" encoding="utf-8"?> | |
-<package xmlns="http://schemas.microsoft.com/packaging/2013/05/nuspec.xsd"> | |
+<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd"> | |
<metadata> | |
<id>Smdn.Fundamental.Xml.Xhtml</id> | |
- <version>3.0.1</version> | |
+ <version>3.1.0</version> | |
<title>Smdn.Fundamental.Xml.Xhtml</title> | |
<authors>smdn</authors> | |
<license type="expression">MIT</license> | |
<licenseUrl>https://licenses.nuget.org/MIT</licenseUrl> | |
<icon>Smdn.Fundamental.Xml.Xhtml.png</icon> | |
<readme>README.md</readme> | |
<projectUrl>https://smdn.jp/works/libs/Smdn.Fundamentals/</projectUrl> | |
<description>(X)HTML utility and extension library</description> | |
- <copyright>Copyright � 2009 smdn</copyright> | |
+ <releaseNotes>https://github.com/smdn/Smdn.Fundamentals/releases/tag/releases%2FSmdn.Fundamental.Xml.Xhtml-3.1.0</releaseNotes> | |
+ <copyright>Copyright © 2009 smdn</copyright> | |
<tags>smdn.jp XHTML HTML XLinq polyglot-markup extensions</tags> | |
- <repository type="git" url="https://github.com/smdn/Smdn.Fundamentals" branch="main" commit="c848761b03aeddaf02bfeb277f3f5672e904cf60" /> | |
+ <repository type="git" url="https://github.com/smdn/Smdn.Fundamentals" commit="b5413ee3943c96bf97583eb7971556b337be4f02" /> | |
<dependencies> | |
<group targetFramework=".NETFramework4.5"> | |
- <dependency id="Smdn.Fundamental.Shim" version="3.1.3" exclude="Build,Analyzers" /> | |
- <dependency id="Smdn.Fundamental.Xml.Linq" version="[3.0.0, 4.0.0)" exclude="Build,Analyzers" /> | |
+ <dependency id="Smdn.Fundamental.Shim" version="[3.1.4, 4.0.0)" exclude="Build,Analyzers" /> | |
+ <dependency id="Smdn.Fundamental.Xml.Linq" version="[3.1.0, 4.0.0)" exclude="Build,Analyzers" /> | |
<dependency id="System.Memory" version="4.5.4" exclude="Build,Analyzers" /> | |
</group> | |
<group targetFramework=".NETStandard1.6"> | |
- <dependency id="Smdn.Fundamental.Shim" version="3.1.3" exclude="Build,Analyzers" /> | |
- <dependency id="Smdn.Fundamental.Xml.Linq" version="[3.0.0, 4.0.0)" exclude="Build,Analyzers" /> | |
<dependency id="NETStandard.Library" version="1.6.1" exclude="Build,Analyzers" /> | |
+ <dependency id="Smdn.Fundamental.Shim" version="[3.1.4, 4.0.0)" exclude="Build,Analyzers" /> | |
+ <dependency id="Smdn.Fundamental.Xml.Linq" version="[3.1.0, 4.0.0)" exclude="Build,Analyzers" /> | |
<dependency id="System.Memory" version="4.5.4" exclude="Build,Analyzers" /> | |
</group> | |
<group targetFramework="net6.0"> | |
- <dependency id="Smdn.Fundamental.Xml.Linq" version="[3.0.0, 4.0.0)" exclude="Build,Analyzers" /> | |
+ <dependency id="Smdn.Fundamental.Xml.Linq" version="[3.1.0, 4.0.0)" exclude="Build,Analyzers" /> | |
</group> | |
<group targetFramework=".NETStandard2.0"> | |
- <dependency id="Smdn.Fundamental.Shim" version="3.1.3" exclude="Build,Analyzers" /> | |
- <dependency id="Smdn.Fundamental.Xml.Linq" version="[3.0.0, 4.0.0)" exclude="Build,Analyzers" /> | |
+ <dependency id="Microsoft.Bcl.AsyncInterfaces" version="8.0.0" exclude="Build,Analyzers" /> | |
+ <dependency id="Smdn.Fundamental.Shim" version="[3.1.4, 4.0.0)" exclude="Build,Analyzers" /> | |
+ <dependency id="Smdn.Fundamental.Xml.Linq" version="[3.1.0, 4.0.0)" exclude="Build,Analyzers" /> | |
<dependency id="System.Memory" version="4.5.4" exclude="Build,Analyzers" /> | |
</group> | |
<group targetFramework=".NETStandard2.1"> | |
- <dependency id="Smdn.Fundamental.Xml.Linq" version="[3.0.0, 4.0.0)" exclude="Build,Analyzers" /> | |
+ <dependency id="Smdn.Fundamental.Xml.Linq" version="[3.1.0, 4.0.0)" exclude="Build,Analyzers" /> | |
</group> | |
</dependencies> | |
</metadata> | |
</package> | |
\ No newline at end of file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml.csproj b/src/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml.csproj | |
index cc850f85..e35df9f8 100644 | |
--- a/src/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml.csproj | |
+++ b/src/Smdn.Fundamental.Xml.Xhtml/Smdn.Fundamental.Xml.Xhtml.csproj | |
@@ -6,10 +6,12 @@ SPDX-License-Identifier: MIT | |
<PropertyGroup> | |
<TargetFrameworks>net6.0;net45;netstandard2.1;netstandard2.0;netstandard1.6</TargetFrameworks> | |
<RootNamespace>Smdn.Xml.Xhtml</RootNamespace> | |
- <VersionPrefix>3.0.1</VersionPrefix> | |
+ <VersionPrefix>3.1.0</VersionPrefix> | |
<VersionSuffix></VersionSuffix> | |
<PackageValidationBaselineVersion>3.0.0</PackageValidationBaselineVersion> | |
<AllowUnsafeBlocks Condition="$(TargetFramework.StartsWith('net4')) or $(TargetFramework.StartsWith('netstandard1')) or $(TargetFramework.StartsWith('netstandard2.0'))">true</AllowUnsafeBlocks> | |
+ <RootNamespace/> <!-- empty the root namespace so that the namespace is determined only by the directory name, for code style rule IDE0030 --> | |
+ <NoWarn>CS1591;$(NoWarn)</NoWarn> <!-- CS1591: Missing XML comment for publicly visible type or member 'Type_or_Member' --> | |
</PropertyGroup> | |
<PropertyGroup Label="assembly attributes"> | |
@@ -22,8 +24,9 @@ SPDX-License-Identifier: MIT | |
</PropertyGroup> | |
<ItemGroup> | |
- <ProjectReference VersionRange="[3.1.2,4.0.0)" Include="..\Smdn.Fundamental.Shim\Smdn.Fundamental.Shim.csproj" Condition="$(TargetFramework.StartsWith('net4')) or $(TargetFramework.StartsWith('netstandard1')) or $(TargetFramework.StartsWith('netstandard2.0'))" /> | |
- <ProjectReference VersionRange="[3.0.0,4.0.0)" Include="..\Smdn.Fundamental.Xml.Linq\Smdn.Fundamental.Xml.Linq.csproj" /> | |
+ <ProjectOrPackageReference ReferencePackageVersion="[3.1.4,4.0.0)" Include="..\Smdn.Fundamental.Shim\Smdn.Fundamental.Shim.csproj" Condition="$(TargetFramework.StartsWith('net4')) or $(TargetFramework.StartsWith('netstandard1')) or $(TargetFramework.StartsWith('netstandard2.0'))" /> | |
+ <ProjectOrPackageReference ReferencePackageVersion="[3.1.0,4.0.0)" Include="..\Smdn.Fundamental.Xml.Linq\Smdn.Fundamental.Xml.Linq.csproj" /> | |
<PackageReference Include="System.Memory" /> | |
+ <PackageReference Include="Microsoft.Bcl.AsyncInterfaces" /> | |
</ItemGroup> | |
</Project> | |
diff --git a/src/Smdn.Fundamental.Xml.Xhtml/Smdn.Xml.Linq.Xhtml/Extensions.cs b/src/Smdn.Fundamental.Xml.Xhtml/Smdn.Xml.Linq.Xhtml/Extensions.cs | |
index 12502fef..608ad371 100644 | |
--- a/src/Smdn.Fundamental.Xml.Xhtml/Smdn.Xml.Linq.Xhtml/Extensions.cs | |
+++ b/src/Smdn.Fundamental.Xml.Xhtml/Smdn.Xml.Linq.Xhtml/Extensions.cs | |
@@ -10,6 +10,9 @@ namespace Smdn.Xml.Linq.Xhtml; | |
public static class Extensions { | |
public static XElement GetElementById(this XContainer container, string id) | |
{ | |
+ if (container is null) | |
+ throw new ArgumentNullException(nameof(container)); | |
+ | |
return container.Descendants() | |
.Attributes(XHtmlAttributeNames.Id) | |
.FirstOrDefault(a => string.Equals(a.Value, id, StringComparison.Ordinal)) | |
@@ -18,12 +21,22 @@ public static class Extensions { | |
public static bool HasHtmlClass(this XElement element, string @class) | |
{ | |
+ if (element is null) | |
+ throw new ArgumentNullException(nameof(element)); | |
+ | |
var attr = element.Attribute(XHtmlAttributeNames.Class); | |
if (attr == null) | |
return false; | |
- return string.Concat(" ", attr.Value, " ").Contains(string.Concat(" ", @class, " ")); | |
+ var delimitedValue = string.Concat(" ", attr.Value, " "); | |
+ var delimitedClass = string.Concat(" ", @class, " "); | |
+ | |
+#if SYSTEM_STRING_CONTAINS_STRING_STRINGCOMPARISON | |
+ return delimitedValue.Contains(delimitedClass, StringComparison.Ordinal); | |
+#else | |
+ return delimitedValue.Contains(delimitedClass); | |
+#endif | |
} | |
public static bool HasHtmlClass(this XElement element, IEnumerable<string> classList) | |
diff --git a/src/Smdn.Fundamental.Xml.Xhtml/Smdn.Xml.Linq.Xhtml/XHtmlClassAttribute.cs b/src/Smdn.Fundamental.Xml.Xhtml/Smdn.Xml.Linq.Xhtml/XHtmlClassAttribute.cs | |
index 8232a063..9c765ce6 100644 | |
--- a/src/Smdn.Fundamental.Xml.Xhtml/Smdn.Xml.Linq.Xhtml/XHtmlClassAttribute.cs | |
+++ b/src/Smdn.Fundamental.Xml.Xhtml/Smdn.Xml.Linq.Xhtml/XHtmlClassAttribute.cs | |
@@ -9,10 +9,10 @@ namespace Smdn.Xml.Linq.Xhtml; | |
#pragma warning disable CA1711 | |
public class XHtmlClassAttribute : XAttribute { | |
#pragma warning restore CA1711 | |
- private static readonly char[] classListSeparator = { ' ' }; | |
+ private static readonly char[] ClassListSeparator = { ' ' }; | |
internal static string[] SplitClassList(string classList) | |
- => classList?.Split(classListSeparator, StringSplitOptions.RemoveEmptyEntries); | |
+ => classList?.Split(ClassListSeparator, StringSplitOptions.RemoveEmptyEntries); | |
public static string JoinClassList(IEnumerable<string> classList) | |
{ | |
diff --git a/src/Smdn.Fundamental.Xml.Xhtml/Smdn.Xml.Xhtml/HtmlConvert.cs b/src/Smdn.Fundamental.Xml.Xhtml/Smdn.Xml.Xhtml/HtmlConvert.cs | |
index 55a3c639..c4f69723 100644 | |
--- a/src/Smdn.Fundamental.Xml.Xhtml/Smdn.Xml.Xhtml/HtmlConvert.cs | |
+++ b/src/Smdn.Fundamental.Xml.Xhtml/Smdn.Xml.Xhtml/HtmlConvert.cs | |
@@ -75,14 +75,14 @@ public static class HtmlConvert { | |
return sb.ToString(); | |
} | |
- private static readonly Regex regexNumericReference = new(@"&#(?<hex>x?)(?<number>[0-9a-fA-F]{1,});", RegexOptions.Singleline | RegexOptions.CultureInvariant | RegexOptions.Compiled); | |
+ private static readonly Regex RegexNumericReference = new(@"&#(?<hex>x?)(?<number>[0-9a-fA-F]{1,});", RegexOptions.Singleline | RegexOptions.CultureInvariant | RegexOptions.Compiled); | |
public static string DecodeNumericCharacterReference(string s) | |
{ | |
if (s == null) | |
throw new ArgumentNullException(nameof(s)); | |
- return regexNumericReference.Replace( | |
+ return RegexNumericReference.Replace( | |
s, | |
m => ((char)Convert.ToUInt16(m.Groups["number"].Value, m.Groups["hex"].Length == 0 ? 10 : 16)).ToString() | |
); | |
diff --git a/src/Smdn.Fundamental.Xml.Xhtml/Smdn.Xml.Xhtml/PolyglotHtml5Writer.cs b/src/Smdn.Fundamental.Xml.Xhtml/Smdn.Xml.Xhtml/PolyglotHtml5Writer.cs | |
index 52fd7f65..22913cc5 100644 | |
--- a/src/Smdn.Fundamental.Xml.Xhtml/Smdn.Xml.Xhtml/PolyglotHtml5Writer.cs | |
+++ b/src/Smdn.Fundamental.Xml.Xhtml/Smdn.Xml.Xhtml/PolyglotHtml5Writer.cs | |
@@ -1,21 +1,34 @@ | |
// SPDX-FileCopyrightText: 2009 smdn <smdn@smdn.jp> | |
// SPDX-License-Identifier: MIT | |
+#nullable enable | |
+ | |
using System; | |
using System.Collections.Generic; | |
+#if NULL_STATE_STATIC_ANALYSIS_ATTRIBUTES | |
+using System.Diagnostics.CodeAnalysis; | |
+#endif | |
using System.IO; | |
using System.Text; | |
+using System.Threading.Tasks; | |
using System.Xml; | |
namespace Smdn.Xml.Xhtml; | |
-public class PolyglotHtml5Writer : XmlWriter { | |
- public override XmlWriterSettings Settings => settings; | |
- public override WriteState WriteState => baseWriter.WriteState; | |
- public override string XmlLang => baseWriter.XmlLang; | |
- public override XmlSpace XmlSpace => baseWriter.XmlSpace; | |
- protected virtual XmlWriter BaseWriter => baseWriter; | |
+#pragma warning disable SA1001 | |
+public class PolyglotHtml5Writer : | |
+ XmlWriter | |
+#if SYSTEM_IASYNCDISPOSABLE | |
+ , IAsyncDisposable | |
+#endif | |
+#pragma warning restore SA1001 | |
+{ | |
+ public override XmlWriterSettings? Settings => settings; | |
+ public override WriteState WriteState => baseWriter is null ? WriteState.Closed : baseWriter.WriteState; | |
+ public override string? XmlLang => BaseWriter.XmlLang; | |
+ public override XmlSpace XmlSpace => BaseWriter.XmlSpace; | |
+ protected virtual XmlWriter BaseWriter => baseWriter ?? throw new ObjectDisposedException(GetType().FullName); | |
- private readonly XmlWriter baseWriter; | |
+ private XmlWriter baseWriter; | |
private readonly XmlWriterSettings settings; | |
protected enum ExtendedWriteState { | |
@@ -36,11 +49,11 @@ public class PolyglotHtml5Writer : XmlWriter { | |
protected ExtendedWriteState ExtendedState { get; private set; } = ExtendedWriteState.Start; | |
- private ElementContext currentElementContext = null; | |
+ private ElementContext? currentElementContext = null; | |
private readonly Stack<ElementContext> elementContextStack = new(4 /*nest level*/); | |
private sealed class ElementContext { | |
- private static readonly HashSet<string> voidElements = new(StringComparer.OrdinalIgnoreCase) { | |
+ private static readonly HashSet<string> VoidElements = new(StringComparer.OrdinalIgnoreCase) { | |
"area", | |
"base", | |
"br", | |
@@ -59,15 +72,15 @@ public class PolyglotHtml5Writer : XmlWriter { | |
}; | |
public string LocalName { get; } | |
- public string Namespace { get; } | |
+ public string? Namespace { get; } | |
public bool IsMixedContent { get; private set; } | |
public bool IsEmpty { get; private set; } = true; | |
public bool IsClosed { get; private set; } = false; | |
- public bool IsNonVoidElement => !(voidElements.Contains(LocalName) && IsNamespaceXhtml); | |
+ public bool IsNonVoidElement => !(VoidElements.Contains(LocalName) && IsNamespaceXhtml); | |
private bool IsNamespaceXhtml => string.IsNullOrEmpty(Namespace) || string.Equals(Namespace, W3CNamespaces.Xhtml, StringComparison.Ordinal); | |
- public ElementContext(string localName, string ns, ElementContext parentElementContext) | |
+ public ElementContext(string localName, string? ns, ElementContext? parentElementContext) | |
{ | |
LocalName = localName; | |
Namespace = ns; | |
@@ -84,11 +97,11 @@ public class PolyglotHtml5Writer : XmlWriter { | |
public void MarkAsClosed() => IsClosed = true; | |
} | |
- private static readonly XmlWriterSettings defaultSettings = new(); | |
+ private static readonly XmlWriterSettings DefaultWriterSettings = new(); | |
- private static XmlWriterSettings ToNonIndentingSettings(XmlWriterSettings settings) | |
+ private static XmlWriterSettings ToNonIndentingSettings(XmlWriterSettings? settings) | |
{ | |
- settings ??= defaultSettings; | |
+ settings ??= DefaultWriterSettings; | |
var s = settings.Clone(); | |
@@ -107,30 +120,30 @@ public class PolyglotHtml5Writer : XmlWriter { | |
} | |
#endif | |
- public PolyglotHtml5Writer(string outputFileName, XmlWriterSettings settings = null) | |
+ public PolyglotHtml5Writer(string outputFileName, XmlWriterSettings? settings = null) | |
: this(Create(outputFileName, ToNonIndentingSettings(settings)), settings) | |
{ | |
} | |
- public PolyglotHtml5Writer(StringBuilder output, XmlWriterSettings settings = null) | |
+ public PolyglotHtml5Writer(StringBuilder output, XmlWriterSettings? settings = null) | |
: this(Create(output, ToNonIndentingSettings(settings)), settings) | |
{ | |
} | |
- public PolyglotHtml5Writer(Stream output, XmlWriterSettings settings = null) | |
+ public PolyglotHtml5Writer(Stream output, XmlWriterSettings? settings = null) | |
: this(Create(output, ToNonIndentingSettings(settings)), settings) | |
{ | |
} | |
- public PolyglotHtml5Writer(TextWriter output, XmlWriterSettings settings = null) | |
+ public PolyglotHtml5Writer(TextWriter output, XmlWriterSettings? settings = null) | |
: this(Create(output, ToNonIndentingSettings(settings)), settings) | |
{ | |
} | |
- private PolyglotHtml5Writer(XmlWriter baseWriter, XmlWriterSettings settings) | |
+ private PolyglotHtml5Writer(XmlWriter baseWriter, XmlWriterSettings? settings) | |
{ | |
this.baseWriter = baseWriter ?? throw new ArgumentNullException(nameof(baseWriter)); | |
- this.settings = settings ?? defaultSettings.Clone(); | |
+ this.settings = settings ?? DefaultWriterSettings.Clone(); | |
} | |
protected override void Dispose(bool disposing) | |
@@ -138,10 +151,12 @@ public class PolyglotHtml5Writer : XmlWriter { | |
try { | |
if (disposing) | |
#if SYSTEM_IO_STREAM_CLOSE | |
- baseWriter.Close(); | |
+ baseWriter?.Close(); | |
#else | |
- baseWriter.Dispose(); | |
+ baseWriter?.Dispose(); | |
#endif | |
+ | |
+ baseWriter = null!; | |
} | |
finally { | |
base.Dispose(disposing); | |
@@ -150,7 +165,39 @@ public class PolyglotHtml5Writer : XmlWriter { | |
} | |
} | |
- public override void WriteDocType(string name, string pubid, string sysid, string subset) | |
+#if SYSTEM_IASYNCDISPOSABLE && !SYSTEM_XML_XMLWRITER_DISPOSEASYNC | |
+ public virtual async ValueTask DisposeAsync() | |
+ { | |
+ await DisposeAsyncCore().ConfigureAwait(false); | |
+ | |
+ Dispose(false); | |
+ | |
+ GC.SuppressFinalize(this); | |
+ } | |
+ | |
+ protected virtual | |
+#if SYSTEM_XML_XMLWRITER_DISPOSEASYNC | |
+ async | |
+#endif | |
+ ValueTask DisposeAsyncCore() | |
+ { | |
+ if (baseWriter is not null) { | |
+#if SYSTEM_XML_XMLWRITER_DISPOSEASYNC | |
+ await baseWriter.DisposeAsync().ConfigureAwait(false); | |
+#else | |
+ baseWriter.Dispose(); | |
+#endif | |
+ } | |
+ | |
+ baseWriter = null!; | |
+ | |
+#if !SYSTEM_XML_XMLWRITER_DISPOSEASYNC | |
+ return default; | |
+#endif | |
+ } | |
+#endif | |
+ | |
+ public override void WriteDocType(string name, string? pubid, string? sysid, string? subset) | |
{ | |
if (string.IsNullOrEmpty(pubid) && string.IsNullOrEmpty(sysid) && string.IsNullOrEmpty(subset)) | |
baseWriter.WriteRaw("<!DOCTYPE " + name + ">"); | |
@@ -160,7 +207,17 @@ public class PolyglotHtml5Writer : XmlWriter { | |
ExtendedState = ExtendedWriteState.Prolog; | |
} | |
- public override void WriteStartElement(string prefix, string localName, string ns) | |
+ public override async Task WriteDocTypeAsync(string name, string? pubid, string? sysid, string? subset) | |
+ { | |
+ if (string.IsNullOrEmpty(pubid) && string.IsNullOrEmpty(sysid) && string.IsNullOrEmpty(subset)) | |
+ await baseWriter.WriteRawAsync("<!DOCTYPE " + name + ">").ConfigureAwait(false); | |
+ else | |
+ await baseWriter.WriteDocTypeAsync(name, pubid, sysid, subset).ConfigureAwait(false); | |
+ | |
+ ExtendedState = ExtendedWriteState.Prolog; | |
+ } | |
+ | |
+ private void PreWriteStartElement() | |
{ | |
switch (ExtendedState) { | |
case ExtendedWriteState.ElementOpening: | |
@@ -168,13 +225,12 @@ public class PolyglotHtml5Writer : XmlWriter { | |
ExtendedState = ExtendedWriteState.ElementContent; | |
break; | |
} | |
+ } | |
- WriteIndent(); | |
- | |
- baseWriter.WriteStartElement(prefix, localName, ns); | |
- | |
+ private void PostWriteStartElement(string localName, string? ns) | |
+ { | |
// is nested element start? | |
- if (currentElementContext != null && !currentElementContext.IsClosed) { | |
+ if (currentElementContext is not null && !currentElementContext.IsClosed) { | |
currentElementContext.MarkAsNonEmpty(); // has child elements | |
elementContextStack.Push(currentElementContext); | |
@@ -185,9 +241,31 @@ public class PolyglotHtml5Writer : XmlWriter { | |
ExtendedState = ExtendedWriteState.ElementOpening; | |
} | |
+ public override void WriteStartElement(string? prefix, string localName, string? ns) | |
+ { | |
+ PreWriteStartElement(); | |
+ | |
+ WriteIndent(); | |
+ | |
+ baseWriter.WriteStartElement(prefix, localName, ns); | |
+ | |
+ PostWriteStartElement(localName, ns); | |
+ } | |
+ | |
+ public override async Task WriteStartElementAsync(string? prefix, string localName, string? ns) | |
+ { | |
+ PreWriteStartElement(); | |
+ | |
+ await WriteIndentAsync().ConfigureAwait(false); | |
+ | |
+ await baseWriter.WriteStartElementAsync(prefix, localName, ns).ConfigureAwait(false); | |
+ | |
+ PostWriteStartElement(localName, ns); | |
+ } | |
+ | |
public override void WriteEndElement() | |
{ | |
- if (currentElementContext.IsNonVoidElement) | |
+ if (currentElementContext is not null && currentElementContext.IsNonVoidElement) | |
// prepend empty text node to avoid emitting self closing tags <.../> | |
baseWriter.WriteString(string.Empty); | |
@@ -195,7 +273,21 @@ public class PolyglotHtml5Writer : XmlWriter { | |
ExtendedState = ExtendedWriteState.ElementOpened; | |
- if (currentElementContext.IsEmpty) | |
+ if (currentElementContext is not null && currentElementContext.IsEmpty) | |
+ CloseCurrentElement(); | |
+ } | |
+ | |
+ public override async Task WriteEndElementAsync() | |
+ { | |
+ if (currentElementContext is not null && currentElementContext.IsNonVoidElement) | |
+ // prepend empty text node to avoid emitting self closing tags <.../> | |
+ await baseWriter.WriteStringAsync(string.Empty).ConfigureAwait(false); | |
+ | |
+ await baseWriter.WriteEndElementAsync().ConfigureAwait(false); | |
+ | |
+ ExtendedState = ExtendedWriteState.ElementOpened; | |
+ | |
+ if (currentElementContext is not null && currentElementContext.IsEmpty) | |
CloseCurrentElement(); | |
} | |
@@ -210,8 +302,20 @@ public class PolyglotHtml5Writer : XmlWriter { | |
CloseCurrentElement(); | |
} | |
+ public override async Task WriteFullEndElementAsync() | |
+ { | |
+ ExtendedState = ExtendedWriteState.ElementClosing; | |
+ | |
+ await WriteIndentAsync().ConfigureAwait(false); | |
+ | |
+ baseWriter.WriteFullEndElement(); | |
+ | |
+ CloseCurrentElement(); | |
+ } | |
+ | |
private void CloseCurrentElement() | |
{ | |
+ if (currentElementContext is not null) | |
currentElementContext.MarkAsClosed(); | |
ExtendedState = ExtendedWriteState.ElementClosed; | |
@@ -228,21 +332,30 @@ public class PolyglotHtml5Writer : XmlWriter { | |
private readonly List<string> indentStrings = new(4); | |
- protected virtual void WriteIndent() | |
+ private bool PreWriteIndent( | |
+#if NULL_STATE_STATIC_ANALYSIS_ATTRIBUTES | |
+ [NotNullWhen(true)] | |
+#endif | |
+ out string? indentString | |
+ ) | |
{ | |
+ indentString = default; | |
+ | |
if (!settings.Indent) | |
- return; | |
+ return false; | |
if (ExtendedState is ExtendedWriteState.Start or ExtendedWriteState.DocumentStart) | |
- return; | |
+ return false; | |
if (XmlSpace == XmlSpace.Preserve) | |
- return; | |
- if (currentElementContext != null) { | |
+ return false; | |
+ if (currentElementContext is not null) { | |
if (currentElementContext.IsMixedContent) | |
- return; | |
- if (ExtendedState == ExtendedWriteState.ElementClosing && | |
+ return false; | |
+ if ( | |
+ ExtendedState == ExtendedWriteState.ElementClosing && | |
currentElementContext.IsEmpty && | |
- currentElementContext.IsNonVoidElement) { | |
- return; | |
+ currentElementContext.IsNonVoidElement | |
+ ) { | |
+ return false; | |
} | |
} | |
@@ -254,24 +367,45 @@ public class PolyglotHtml5Writer : XmlWriter { | |
// create indent string (NewLineChars + IndentChars * IndentLevel) | |
if (indentStrings.Count <= indentLevel) { | |
for (var level = indentStrings.Count; level <= indentLevel; level++) { | |
- var indentString = settings.NewLineChars; | |
+ var nextIndentString = settings.NewLineChars; | |
for (var l = 0; l < level; l++) | |
- indentString += settings.IndentChars; | |
+ nextIndentString += settings.IndentChars; | |
+ | |
+ indentStrings.Add(nextIndentString); | |
+ } | |
+ } | |
+ | |
+ indentString = indentStrings[indentLevel]; | |
- indentStrings.Add(indentString); | |
+ return true; | |
} | |
+ | |
+ protected virtual void WriteIndent() | |
+ { | |
+ if (PreWriteIndent(out var indentString)) | |
+ baseWriter.WriteRaw(indentString); | |
} | |
- baseWriter.WriteRaw(indentStrings[indentLevel]); | |
+ protected virtual Task WriteIndentAsync() | |
+ { | |
+ if (PreWriteIndent(out var indentString)) | |
+ return baseWriter.WriteRawAsync(indentString); | |
+ else | |
+#if SYSTEM_THREADING_TASKS_TASK_COMPLETEDTASK | |
+ return Task.CompletedTask; | |
+#else | |
+ return Task.FromResult(0); | |
+#endif | |
} | |
/* | |
* call through to the base writer | |
*/ | |
public override void Flush() => baseWriter.Flush(); | |
+ public override Task FlushAsync() => baseWriter.FlushAsync(); | |
- public override string LookupPrefix(string ns) => baseWriter.LookupPrefix(ns); | |
+ public override string? LookupPrefix(string ns) => baseWriter.LookupPrefix(ns); | |
public override void WriteStartDocument() | |
{ | |
@@ -280,6 +414,13 @@ public class PolyglotHtml5Writer : XmlWriter { | |
ExtendedState = ExtendedWriteState.DocumentStart; | |
} | |
+ public override async Task WriteStartDocumentAsync() | |
+ { | |
+ await baseWriter.WriteStartDocumentAsync().ConfigureAwait(false); | |
+ | |
+ ExtendedState = ExtendedWriteState.DocumentStart; | |
+ } | |
+ | |
public override void WriteStartDocument(bool standalone) | |
{ | |
baseWriter.WriteStartDocument(standalone); | |
@@ -287,6 +428,13 @@ public class PolyglotHtml5Writer : XmlWriter { | |
ExtendedState = ExtendedWriteState.DocumentStart; | |
} | |
+ public override async Task WriteStartDocumentAsync(bool standalone) | |
+ { | |
+ await baseWriter.WriteStartDocumentAsync(standalone).ConfigureAwait(false); | |
+ | |
+ ExtendedState = ExtendedWriteState.DocumentStart; | |
+ } | |
+ | |
public override void WriteEndDocument() | |
{ | |
baseWriter.WriteEndDocument(); | |
@@ -294,7 +442,14 @@ public class PolyglotHtml5Writer : XmlWriter { | |
ExtendedState = ExtendedWriteState.DocumentEnd; | |
} | |
- public override void WriteStartAttribute(string prefix, string localName, string ns) | |
+ public override async Task WriteEndDocumentAsync() | |
+ { | |
+ await baseWriter.WriteEndDocumentAsync().ConfigureAwait(false); | |
+ | |
+ ExtendedState = ExtendedWriteState.DocumentEnd; | |
+ } | |
+ | |
+ public override void WriteStartAttribute(string? prefix, string localName, string? ns) | |
{ | |
if (settings.Indent && settings.NewLineOnAttributes) | |
throw new NotSupportedException("NewLineOnAttributes is not supported"); | |
@@ -305,6 +460,17 @@ public class PolyglotHtml5Writer : XmlWriter { | |
ExtendedState = ExtendedWriteState.AttributeStart; | |
} | |
+ protected override Task WriteStartAttributeAsync(string? prefix, string localName, string? ns) | |
+ { | |
+ WriteStartAttribute(prefix, localName, ns); // cannot call baseWriter.WriteStartAttributeAsync | |
+ | |
+#if SYSTEM_THREADING_TASKS_TASK_COMPLETEDTASK | |
+ return Task.CompletedTask; | |
+#else | |
+ return Task.FromResult(0); | |
+#endif | |
+ } | |
+ | |
public override void WriteEndAttribute() | |
{ | |
baseWriter.WriteEndAttribute(); | |
@@ -312,15 +478,32 @@ public class PolyglotHtml5Writer : XmlWriter { | |
ExtendedState = ExtendedWriteState.AttributeEnd; | |
} | |
- public override void WriteProcessingInstruction(string name, string text) | |
+ protected override Task WriteEndAttributeAsync() | |
+ { | |
+ WriteEndAttribute(); // cannot call baseWriter.WriteEndAttributeAsync | |
+ | |
+#if SYSTEM_THREADING_TASKS_TASK_COMPLETEDTASK | |
+ return Task.CompletedTask; | |
+#else | |
+ return Task.FromResult(0); | |
+#endif | |
+ } | |
+ | |
+ public override void WriteProcessingInstruction(string name, string? text) | |
{ | |
baseWriter.WriteProcessingInstruction(name, text); | |
- if (ExtendedState == ExtendedWriteState.ElementContent) | |
- currentElementContext.MarkAsNonEmpty(); | |
+ SetWrittenContentState(markAsMixedContent: false); | |
+ } | |
+ | |
+ public override async Task WriteProcessingInstructionAsync(string name, string? text) | |
+ { | |
+ await baseWriter.WriteProcessingInstructionAsync(name, text).ConfigureAwait(false); | |
+ | |
+ SetWrittenContentState(markAsMixedContent: false); | |
} | |
- public override void WriteComment(string text) | |
+ private void PreWriteComment() | |
{ | |
switch (ExtendedState) { | |
case ExtendedWriteState.ElementOpening: | |
@@ -329,15 +512,36 @@ public class PolyglotHtml5Writer : XmlWriter { | |
ExtendedState = ExtendedWriteState.ElementContent; | |
break; | |
} | |
+ } | |
+ | |
+ private void PostWriteComment() | |
+ { | |
+ if (ExtendedState == ExtendedWriteState.DocumentStart) | |
+ ExtendedState = ExtendedWriteState.Prolog; | |
+ else | |
+ SetWrittenContentState(markAsMixedContent: false); | |
+ } | |
+ | |
+ public override void WriteComment(string? text) | |
+ { | |
+ PreWriteComment(); | |
WriteIndent(); | |
baseWriter.WriteComment(text); | |
- if (ExtendedState == ExtendedWriteState.DocumentStart) | |
- ExtendedState = ExtendedWriteState.Prolog; | |
- else if (ExtendedState == ExtendedWriteState.ElementContent) | |
- currentElementContext.MarkAsNonEmpty(); | |
+ PostWriteComment(); | |
+ } | |
+ | |
+ public override async Task WriteCommentAsync(string? text) | |
+ { | |
+ PreWriteComment(); | |
+ | |
+ await WriteIndentAsync().ConfigureAwait(false); | |
+ | |
+ await baseWriter.WriteCommentAsync(text).ConfigureAwait(false); | |
+ | |
+ PostWriteComment(); | |
} | |
public override void WriteBase64(byte[] buffer, int index, int count) | |
@@ -346,22 +550,34 @@ public class PolyglotHtml5Writer : XmlWriter { | |
baseWriter.WriteBase64(buffer, index, count); | |
- if (ExtendedState == ExtendedWriteState.ElementContent) { | |
- currentElementContext.MarkAsMixedContent(); | |
- currentElementContext.MarkAsNonEmpty(); | |
+ SetWrittenContentState(); | |
} | |
+ | |
+ public override async Task WriteBase64Async(byte[] buffer, int index, int count) | |
+ { | |
+ SetWritingContentState(); | |
+ | |
+ await baseWriter.WriteBase64Async(buffer, index, count).ConfigureAwait(false); | |
+ | |
+ SetWrittenContentState(); | |
} | |
- public override void WriteCData(string text) | |
+ public override void WriteCData(string? text) | |
{ | |
SetWritingContentState(); | |
baseWriter.WriteCData(text); | |
- if (ExtendedState == ExtendedWriteState.ElementContent) { | |
- currentElementContext.MarkAsMixedContent(); | |
- currentElementContext.MarkAsNonEmpty(); | |
+ SetWrittenContentState(); | |
} | |
+ | |
+ public override async Task WriteCDataAsync(string? text) | |
+ { | |
+ SetWritingContentState(); | |
+ | |
+ await baseWriter.WriteCDataAsync(text).ConfigureAwait(false); | |
+ | |
+ SetWrittenContentState(); | |
} | |
public override void WriteCharEntity(char ch) | |
@@ -370,10 +586,16 @@ public class PolyglotHtml5Writer : XmlWriter { | |
baseWriter.WriteCharEntity(ch); | |
- if (ExtendedState == ExtendedWriteState.ElementContent) { | |
- currentElementContext.MarkAsMixedContent(); | |
- currentElementContext.MarkAsNonEmpty(); | |
+ SetWrittenContentState(); | |
} | |
+ | |
+ public override async Task WriteCharEntityAsync(char ch) | |
+ { | |
+ SetWritingContentState(); | |
+ | |
+ await baseWriter.WriteCharEntityAsync(ch).ConfigureAwait(false); | |
+ | |
+ SetWrittenContentState(); | |
} | |
public override void WriteChars(char[] buffer, int index, int count) | |
@@ -382,10 +604,16 @@ public class PolyglotHtml5Writer : XmlWriter { | |
baseWriter.WriteChars(buffer, index, count); | |
- if (ExtendedState == ExtendedWriteState.ElementContent) { | |
- currentElementContext.MarkAsMixedContent(); | |
- currentElementContext.MarkAsNonEmpty(); | |
+ SetWrittenContentState(); | |
} | |
+ | |
+ public override async Task WriteCharsAsync(char[] buffer, int index, int count) | |
+ { | |
+ SetWritingContentState(); | |
+ | |
+ await baseWriter.WriteCharsAsync(buffer, index, count).ConfigureAwait(false); | |
+ | |
+ SetWrittenContentState(); | |
} | |
public override void WriteEntityRef(string name) | |
@@ -394,10 +622,16 @@ public class PolyglotHtml5Writer : XmlWriter { | |
baseWriter.WriteEntityRef(name); | |
- if (ExtendedState == ExtendedWriteState.ElementContent) { | |
- currentElementContext.MarkAsMixedContent(); | |
- currentElementContext.MarkAsNonEmpty(); | |
+ SetWrittenContentState(); | |
} | |
+ | |
+ public override async Task WriteEntityRefAsync(string name) | |
+ { | |
+ SetWritingContentState(); | |
+ | |
+ await baseWriter.WriteEntityRefAsync(name).ConfigureAwait(false); | |
+ | |
+ SetWrittenContentState(); | |
} | |
public override void WriteRaw(char[] buffer, int index, int count) | |
@@ -406,10 +640,16 @@ public class PolyglotHtml5Writer : XmlWriter { | |
baseWriter.WriteRaw(buffer, index, count); | |
- if (ExtendedState == ExtendedWriteState.ElementContent) { | |
- currentElementContext.MarkAsMixedContent(); | |
- currentElementContext.MarkAsNonEmpty(); | |
+ SetWrittenContentState(); | |
} | |
+ | |
+ public override async Task WriteRawAsync(char[] buffer, int index, int count) | |
+ { | |
+ SetWritingContentState(); | |
+ | |
+ await baseWriter.WriteRawAsync(buffer, index, count).ConfigureAwait(false); | |
+ | |
+ SetWrittenContentState(); | |
} | |
public override void WriteRaw(string data) | |
@@ -418,22 +658,34 @@ public class PolyglotHtml5Writer : XmlWriter { | |
baseWriter.WriteRaw(data); | |
- if (ExtendedState == ExtendedWriteState.ElementContent) { | |
- currentElementContext.MarkAsMixedContent(); | |
- currentElementContext.MarkAsNonEmpty(); | |
+ SetWrittenContentState(); | |
} | |
+ | |
+ public override async Task WriteRawAsync(string data) | |
+ { | |
+ SetWritingContentState(); | |
+ | |
+ await baseWriter.WriteRawAsync(data).ConfigureAwait(false); | |
+ | |
+ SetWrittenContentState(); | |
} | |
- public override void WriteString(string text) | |
+ public override void WriteString(string? text) | |
{ | |
SetWritingContentState(); | |
baseWriter.WriteString(text); | |
- if (ExtendedState == ExtendedWriteState.ElementContent) { | |
- currentElementContext.MarkAsMixedContent(); | |
- currentElementContext.MarkAsNonEmpty(); | |
+ SetWrittenContentState(); | |
} | |
+ | |
+ public override async Task WriteStringAsync(string? text) | |
+ { | |
+ SetWritingContentState(); | |
+ | |
+ await baseWriter.WriteStringAsync(text).ConfigureAwait(false); | |
+ | |
+ SetWrittenContentState(); | |
} | |
public override void WriteSurrogateCharEntity(char lowChar, char highChar) | |
@@ -442,20 +694,34 @@ public class PolyglotHtml5Writer : XmlWriter { | |
baseWriter.WriteSurrogateCharEntity(lowChar, highChar); | |
- if (ExtendedState == ExtendedWriteState.ElementContent) { | |
- currentElementContext.MarkAsMixedContent(); | |
- currentElementContext.MarkAsNonEmpty(); | |
+ SetWrittenContentState(); | |
} | |
+ | |
+ public override async Task WriteSurrogateCharEntityAsync(char lowChar, char highChar) | |
+ { | |
+ SetWritingContentState(); | |
+ | |
+ await baseWriter.WriteSurrogateCharEntityAsync(lowChar, highChar).ConfigureAwait(false); | |
+ | |
+ SetWrittenContentState(); | |
} | |
- public override void WriteWhitespace(string ws) | |
+ public override void WriteWhitespace(string? ws) | |
{ | |
SetWritingContentState(); | |
baseWriter.WriteWhitespace(ws); | |
- if (ExtendedState == ExtendedWriteState.ElementContent) | |
- currentElementContext.MarkAsMixedContent(); | |
+ SetWrittenContentState(markAsNonEmpty: false); | |
+ } | |
+ | |
+ public override async Task WriteWhitespaceAsync(string? ws) | |
+ { | |
+ SetWritingContentState(); | |
+ | |
+ await baseWriter.WriteWhitespaceAsync(ws).ConfigureAwait(false); | |
+ | |
+ SetWrittenContentState(markAsNonEmpty: false); | |
} | |
private void SetWritingContentState() | |
@@ -472,4 +738,21 @@ public class PolyglotHtml5Writer : XmlWriter { | |
break; | |
} | |
} | |
+ | |
+ private void SetWrittenContentState(bool markAsMixedContent = true, bool markAsNonEmpty = true) | |
+ { | |
+ if (ExtendedState != ExtendedWriteState.ElementContent) | |
+ return; | |
+ | |
+#if DEBUG | |
+ if (currentElementContext is null) | |
+ throw new InvalidOperationException("invalid state"); | |
+#endif | |
+ | |
+ if (markAsMixedContent) | |
+ currentElementContext!.MarkAsMixedContent(); | |
+ | |
+ if (markAsNonEmpty) | |
+ currentElementContext!.MarkAsNonEmpty(); | |
+ } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment