Ejemplo n.º 1
0
    /// <summary>
    /// 根据 DTD 声明设置相应的 HTML 规范
    /// </summary>
    /// <param name="doctype">DTD 声明</param>
    /// <returns>所适用的 HTML 规范</returns>
    protected virtual void SetHtmlSpecification( HtmlDoctypeDeclaration doctype )
    {
      if ( HtmlSpecification == null )
      {
        var declaration = doctype.IfNull( null, d => d.Declaration );

        SetHtmlSpecification( DomProvider.SetHtmlSpecification( Document, declaration ) );

      }
    }
Ejemplo n.º 2
0
    /// <summary>
    /// 处理文档类型声明
    /// </summary>
    /// <param name="doctype">文档类型声明</param>
    /// <returns></returns>
    protected virtual IHtmlSpecial ProcessDoctypeDeclaration( HtmlDoctypeDeclaration doctype )
    {

      SetHtmlSpecification( doctype );
      return CreateSpecial( doctype.Html );

    }