2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								/*
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  Copyright  ( c )  2022 ,  Ali  Mohammad  Pur  < mpfard @ serenityos . org > 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 * 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 *  SPDX - License - Identifier :  BSD - 2 - Clause 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								 */ 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-10-30 00:07:13 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  <LibWeb/DOM/DocumentType.h> 
  
						 
					
						
							
								
									
										
										
										
											2022-08-28 13:42:07 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  <LibWeb/DOM/Event.h> 
  
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								# include  <LibWeb/HTML/HTMLTemplateElement.h> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  <LibWeb/HTML/Window.h> 
  
						 
					
						
							
								
									
										
										
										
											2022-10-04 21:30:29 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  <LibWeb/HighResolutionTime/TimeOrigin.h> 
  
						 
					
						
							
								
									
										
										
										
											2024-02-17 21:15:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								# include  <LibWeb/SVG/SVGScriptElement.h> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								# include  <LibWeb/SVG/TagNames.h> 
  
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								# include  <LibWeb/XML/XMLDocumentBuilder.h> 
  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								inline  namespace  {  
						 
					
						
							
								
									
										
										
										
											2025-05-13 07:06:33 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-10-12 23:13:24 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								extern  StringView  s_xhtml_unified_dtd ;  
						 
					
						
							
								
									
										
										
										
											2025-05-13 07:06:33 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								namespace  Web  {  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-10-12 23:13:24 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								ErrorOr < Variant < ByteString ,  Vector < XML : : MarkupDeclaration > > >  resolve_xml_resource ( XML : : SystemID  const & ,  Optional < XML : : PublicID >  const &  public_id )  
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2024-10-12 23:13:24 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    static  Optional < Vector < XML : : MarkupDeclaration > >  s_parsed_xhtml_unified_dtd ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    if  ( ! public_id . has_value ( ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  Error : : from_string_literal ( " Refusing to load disallowed external entity " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    auto  public_literal  =  public_id - > public_literal ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( ! public_literal . is_one_of ( 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " -//W3C//DTD XHTML 1.0 Transitional//EN " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " -//W3C//DTD XHTML 1.1//EN " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " -//W3C//DTD XHTML 1.0 Strict//EN " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " -//W3C//DTD XHTML 1.0 Frameset//EN " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " -//W3C//DTD XHTML Basic 1.0//EN " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " -//W3C//DTD XHTML 1.1 plus MathML 2.0//EN " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " -//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " -//W3C//DTD MathML 2.0//EN " , 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            " -//WAPFORUM//DTD XHTML Mobile 1.0//EN " ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  Error : : from_string_literal ( " Refusing to load disallowed external entity " ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-10-12 23:13:24 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( ! s_parsed_xhtml_unified_dtd . has_value ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        auto  parser  =  XML : : Parser ( s_xhtml_unified_dtd ,  XML : : Parser : : Options  { } ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        auto  result  =  parser . parse_external_subset ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( result . is_error ( ) )  // We can't really recover from this, so just return the source and let libxml handle it.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            return  ByteString  {  s_xhtml_unified_dtd  } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        s_parsed_xhtml_unified_dtd  =  result . release_value ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    return  s_parsed_xhtml_unified_dtd . value ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								XMLDocumentBuilder : : XMLDocumentBuilder ( DOM : : Document &  document ,  XMLScriptingSupport  scripting_support )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    :  m_document ( document ) 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-13 23:04:34 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    ,  m_template_node_stack ( document . realm ( ) . heap ( ) ) 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-26 16:09:02 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    ,  m_current_node ( m_document ) 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    ,  m_scripting_support ( scripting_support ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2025-02-25 11:56:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    m_namespace_stack . append ( {  { } ,  1  } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-12-16 17:49:34 +03:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  XMLDocumentBuilder : : set_source ( ByteString  source )  
						 
					
						
							
								
									
										
										
										
											2022-11-03 09:43:34 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2023-12-16 17:49:34 +03:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    m_document - > set_source ( MUST ( String : : from_byte_string ( source ) ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-11-03 09:43:34 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-11-20 18:35:29 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  XMLDocumentBuilder : : set_doctype ( XML : : Doctype  doctype )  
						 
					
						
							
								
									
										
										
										
											2024-10-30 00:07:13 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( m_document - > doctype ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    auto  document_type  =  DOM : : DocumentType : : create ( m_document ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    auto  name  =  MUST ( AK : : String : : from_byte_string ( doctype . type ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    document_type - > set_name ( name ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( doctype . external_id . has_value ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-20 18:35:29 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        auto  external_id  =  doctype . external_id . release_value ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-30 00:07:13 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        auto  system_id  =  MUST ( AK : : String : : from_byte_string ( external_id . system_id . system_literal ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        document_type - > set_system_id ( system_id ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( external_id . public_id . has_value ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-20 18:35:29 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            auto  public_id  =  MUST ( AK : : String : : from_byte_string ( external_id . public_id . release_value ( ) . public_literal ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-30 00:07:13 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            document_type - > set_public_id ( public_id ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    m_document - > insert_before ( document_type ,  m_document - > first_child ( ) ,  false ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-12-16 17:49:34 +03:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  XMLDocumentBuilder : : element_start ( const  XML : : Name &  name ,  HashMap < XML : : Name ,  ByteString >  const &  attributes )  
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( m_has_error ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-02-25 11:56:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    Vector < NamespaceAndPrefix ,  2 >  namespaces ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    for  ( auto  const &  [ name ,  value ]  :  attributes )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( name  = =  " xmlns " sv  | |  name . starts_with ( " xmlns: " sv ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            auto  parts  =  name . split_limit ( ' : ' ,  2 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            Optional < ByteString >  prefix ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            auto  namespace_  =  value ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if  ( parts . size ( )  = =  2 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                namespace_  =  value ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                prefix  =  parts [ 1 ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if  ( namespaces . find_if ( [ & ] ( auto  const &  namespace_and_prefix )  {  return  namespace_and_prefix . prefix  = =  prefix ;  } )  ! =  namespaces . end ( ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                continue ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-03-24 11:27:27 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            namespaces . append ( {  FlyString ( MUST ( String : : from_byte_string ( namespace_ ) ) ) ,  prefix  } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-02-25 11:56:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( ! namespaces . is_empty ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        m_namespace_stack . append ( {  move ( namespaces ) ,  1  } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-07 12:31:37 +03:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        m_namespace_stack . last ( ) . depth  + =  1 ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-04-11 15:36:53 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    auto  namespace_  =  namespace_for_name ( name ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-02-25 11:56:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-06-19 07:32:16 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    auto  qualified_name_or_error  =  DOM : : validate_and_extract ( m_document - > realm ( ) ,  namespace_ ,  FlyString ( MUST ( String : : from_byte_string ( name ) ) ) ,  DOM : : ValidationContext : : Element ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-12-06 02:04:02 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-12-07 17:27:29 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( qualified_name_or_error . is_error ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-12-06 02:04:02 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        m_has_error  =  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-12-07 17:27:29 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    auto  qualified_name  =  qualified_name_or_error . value ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-12-06 02:04:02 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-12-07 17:27:29 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    auto  node_or_error  =  DOM : : create_element ( m_document ,  qualified_name . local_name ( ) ,  qualified_name . namespace_ ( ) ,  qualified_name . prefix ( ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-12-06 02:04:02 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-12-07 17:27:29 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( node_or_error . is_error ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-12-06 02:04:02 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        m_has_error  =  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-12-07 17:27:29 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    auto  node  =  node_or_error . value ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-06-08 11:37:08 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    // When an XML parser with XML scripting support enabled creates a script element,
 
							 
						 
					
						
							
								
									
										
										
										
											2022-11-20 14:22:14 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    // it must have its parser document set and its "force async" flag must be unset.
 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    // FIXME: If the parser was created as part of the XML fragment parsing algorithm, then the element must be marked as "already started" also.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-18 00:14:27 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( m_scripting_support  = =  XMLScriptingSupport : : Enabled  & &  node - > is_html_script_element ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								        auto &  script_element  =  static_cast < HTML : : HTMLScriptElement & > ( * node ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        script_element . set_parser_document ( Badge < XMLDocumentBuilder >  { } ,  m_document ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-11-20 14:22:14 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        script_element . set_force_async ( Badge < XMLDocumentBuilder >  { } ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-18 00:14:27 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( m_current_node - > is_html_template_element ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								        // When an XML parser would append a node to a template element, it must instead append it to the template element's template contents (a DocumentFragment node).
 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-13 23:04:34 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        m_template_node_stack . append ( * m_current_node ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-30 17:50:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        MUST ( static_cast < HTML : : HTMLTemplateElement & > ( * m_current_node ) . content ( ) - > append_child ( node ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    }  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-10-30 17:50:04 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        MUST ( m_current_node - > append_child ( node ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-07-13 19:53:44 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    for  ( auto  const &  attribute  :  attributes )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( attribute . key  = =  " xmlns "  | |  attribute . key . starts_with ( " xmlns: " sv ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2025-04-11 15:37:52 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            // The prefix xmlns is used only to declare namespace bindings and is by definition bound to the namespace name http://www.w3.org/2000/xmlns/.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if  ( ! attribute . key . is_one_of ( " xmlns: " sv ,  " xmlns:xmlns " sv ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                if  ( ! node - > set_attribute_ns ( Namespace : : XMLNS ,  MUST ( String : : from_byte_string ( attribute . key ) ) ,  MUST ( String : : from_byte_string ( attribute . value ) ) ) . is_error ( ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    continue ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-10 19:46:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
									
										
										
										
											2025-04-11 15:37:52 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            m_has_error  =  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }  else  if  ( attribute . key . contains ( ' : ' ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if  ( auto  ns  =  namespace_for_name ( attribute . key ) ;  ns . has_value ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                if  ( ! node - > set_attribute_ns ( ns . value ( ) ,  MUST ( String : : from_byte_string ( attribute . key ) ) ,  MUST ( String : : from_byte_string ( attribute . value ) ) ) . is_error ( ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    continue ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            }  else  if  ( attribute . key . starts_with ( " xml: " sv ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                if  ( auto  maybe_error  =  node - > set_attribute_ns ( Namespace : : XML ,  MUST ( String : : from_byte_string ( attribute . key ) ) ,  MUST ( String : : from_byte_string ( attribute . value ) ) ) ;  ! maybe_error . is_error ( ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                    continue ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-10 19:46:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
									
										
										
										
											2025-04-11 15:37:52 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            m_has_error  =  true ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        }  else  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if  ( ! node - > set_attribute ( MUST ( String : : from_byte_string ( attribute . key ) ) ,  MUST ( String : : from_byte_string ( attribute . value ) ) ) . is_error ( ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                continue ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            m_has_error  =  true ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-13 19:53:44 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    m_current_node  =  node . ptr ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								void  XMLDocumentBuilder : : element_end ( const  XML : : Name &  name )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( m_has_error ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-07 12:31:37 +03:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( - - m_namespace_stack . last ( ) . depth  = =  0 )  { 
							 
						 
					
						
							
								
									
										
										
										
											2025-02-25 11:56:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        m_namespace_stack . take_last ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-07 12:31:37 +03:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-05-01 15:26:37 +03:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    VERIFY ( m_current_node - > node_name ( ) . equals_ignoring_ascii_case ( name ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    // When an XML parser with XML scripting support enabled creates a script element, [...]
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // When the element's end tag is subsequently parsed,
 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-18 00:14:27 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( m_scripting_support  = =  XMLScriptingSupport : : Enabled  & &  m_current_node - > is_html_script_element ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								        // the user agent must perform a microtask checkpoint,
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        HTML : : perform_a_microtask_checkpoint ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // and then prepare the script element.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        auto &  script_element  =  static_cast < HTML : : HTMLScriptElement & > ( * m_current_node ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        script_element . prepare_script ( Badge < XMLDocumentBuilder >  { } ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-25 14:08:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								        // If this causes there to be a pending parsing-blocking script, then the user agent must run the following steps:
 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-25 14:08:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        if  ( auto  pending_parsing_blocking_script  =  m_document - > pending_parsing_blocking_script ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            // 1. Block this instance of the XML parser, such that the event loop will not run tasks that invoke it.
 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								            // NOTE: Noop.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-07-25 14:08:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            // 2. Spin the event loop until the parser's Document has no style sheet that is blocking scripts and the pending parsing-blocking script's "ready to be parser-executed" flag is set.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if  ( m_document - > has_a_style_sheet_that_is_blocking_scripts ( )  | |  ! pending_parsing_blocking_script - > is_ready_to_be_parser_executed ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-15 04:01:23 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                HTML : : main_thread_event_loop ( ) . spin_until ( GC : : create_function ( script_element . heap ( ) ,  [ & ]  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-07-25 14:08:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                    return  ! m_document - > has_a_style_sheet_that_is_blocking_scripts ( )  & &  pending_parsing_blocking_script - > is_ready_to_be_parser_executed ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-31 05:23:43 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								                } ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-07-25 14:08:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            // 3. Unblock this instance of the XML parser, such that tasks that invoke it can again be run.
 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								            // NOTE: Noop.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-07-25 14:08:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            // 4. Execute the script element given by the pending parsing-blocking script.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            pending_parsing_blocking_script - > execute_script ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-07-25 14:08:45 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            // 5. Set the pending parsing-blocking script to null.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            m_document - > set_pending_parsing_blocking_script ( nullptr ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2024-02-17 21:15:58 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    }  else  if  ( m_scripting_support  = =  XMLScriptingSupport : : Enabled  & &  m_current_node - > is_svg_script_element ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // https://www.w3.org/TR/SVGMobile12/struct.html#ProgressiveRendering
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // When an end element event occurs for a 'script' element, that element is processed according to the
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // Script processing section of the Scripting chapter. Further parsing of the document will be blocked
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // until processing of the 'script' is complete.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        auto &  script_element  =  static_cast < SVG : : SVGScriptElement & > ( * m_current_node ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        script_element . process_the_script_element ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-07-13 23:04:34 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    auto *  parent  =  m_current_node - > parent_node ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( parent - > is_document_fragment ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        auto  template_parent_node  =  m_template_node_stack . take_last ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        parent  =  template_parent_node . ptr ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    m_current_node  =  parent ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-08 14:18:33 +03:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  XMLDocumentBuilder : : text ( StringView  data )  
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( m_has_error ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    auto  last  =  m_current_node - > last_child ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( last  & &  last - > is_text ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        auto &  text_node  =  static_cast < DOM : : Text & > ( * last ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        text_builder . append ( text_node . data ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        text_builder . append ( data ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-09-07 21:36:05 +12:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        text_node . set_data ( MUST ( text_builder . to_string ( ) ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								        text_builder . clear ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    }  else  { 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-05 09:26:03 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        if  ( ! data . is_empty ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            auto  node  =  m_document - > create_text_node ( MUST ( String : : from_utf8 ( data ) ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-10-07 14:45:28 +03:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            MUST ( m_current_node - > append_child ( node ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2023-01-08 14:18:33 +03:30 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								void  XMLDocumentBuilder : : comment ( StringView  data )  
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( m_has_error ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-05 09:26:03 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    MUST ( m_document - > append_child ( m_document - > create_comment ( MUST ( String : : from_utf8 ( data ) ) ) ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								void  XMLDocumentBuilder : : document_end ( )  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2024-10-31 05:23:43 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    auto &  heap  =  m_document - > heap ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    // When an XML parser reaches the end of its input, it must stop parsing.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // If the active speculative HTML parser is not null, then stop the speculative HTML parser and return.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // NOTE: Noop.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // Set the insertion point to undefined.
 
							 
						 
					
						
							
								
									
										
										
										
											2025-07-13 23:04:34 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    m_template_node_stack . clear ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    m_current_node  =  nullptr ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // Update the current document readiness to "interactive".
 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-26 16:09:02 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    m_document - > update_readiness ( HTML : : DocumentReadyState : : Interactive ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // Pop all the nodes off the stack of open elements.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // NOTE: Noop.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-06-04 09:44:03 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    if  ( ! m_document - > browsing_context ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // Parsed via DOMParser, no need to wait for load events.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        m_document - > update_readiness ( HTML : : DocumentReadyState : : Complete ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    // While the list of scripts that will execute when the document has finished parsing is not empty:
 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-26 16:09:02 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    while  ( ! m_document - > scripts_to_execute_when_parsing_has_finished ( ) . is_empty ( ) )  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								        // Spin the event loop until the first script in the list of scripts that will execute when the document has finished parsing has its "ready to be parser-executed" flag set
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // and the parser's Document has no style sheet that is blocking scripts.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-15 04:01:23 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        HTML : : main_thread_event_loop ( ) . spin_until ( GC : : create_function ( heap ,  [ & ]  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-26 16:09:02 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								            return  m_document - > scripts_to_execute_when_parsing_has_finished ( ) . first ( ) - > is_ready_to_be_parser_executed ( ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                & &  ! m_document - > has_a_style_sheet_that_is_blocking_scripts ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-31 05:23:43 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        } ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // Execute the first script in the list of scripts that will execute when the document has finished parsing.
 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-26 16:09:02 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        m_document - > scripts_to_execute_when_parsing_has_finished ( ) . first ( ) - > execute_script ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // Remove the first script element from the list of scripts that will execute when the document has finished parsing (i.e. shift out the first entry in the list).
 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-26 16:09:02 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        ( void ) m_document - > scripts_to_execute_when_parsing_has_finished ( ) . take_first ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // Queue a global task on the DOM manipulation task source given the Document's relevant global object to run the following substeps:
 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-15 04:01:23 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    queue_global_task ( HTML : : Task : : Source : : DOMManipulation ,  m_document ,  GC : : create_function ( m_document - > heap ( ) ,  [ document  =  m_document ]  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-09-21 00:43:38 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        // Set the Document's load timing info's DOM content loaded event start time to the current high resolution time given the Document's relevant global object.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-11 22:42:35 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        document - > load_timing_info ( ) . dom_content_loaded_event_start_time  =  HighResolutionTime : : current_high_resolution_time ( relevant_global_object ( * document ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // Fire an event named DOMContentLoaded at the Document object, with its bubbles attribute initialized to true.
 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-13 13:05:26 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        auto  content_loaded_event  =  DOM : : Event : : create ( document - > realm ( ) ,  HTML : : EventNames : : DOMContentLoaded ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								        content_loaded_event - > set_bubbles ( true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-14 22:43:17 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        document - > dispatch_event ( content_loaded_event ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-09-21 00:43:38 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        // Set the Document's load timing info's DOM content loaded event end time to the current high resolution time given the Document's relevant global object.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-11 22:42:35 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        document - > load_timing_info ( ) . dom_content_loaded_event_end_time  =  HighResolutionTime : : current_high_resolution_time ( relevant_global_object ( * document ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // FIXME: Enable the client message queue of the ServiceWorkerContainer object whose associated service worker client is the Document object's relevant settings object.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // FIXME: Invoke WebDriver BiDi DOM content loaded with the Document's browsing context, and a new WebDriver BiDi navigation status whose id is the Document object's navigation id, status is "pending", and url is the Document object's URL.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-16 22:04:01 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // Spin the event loop until the set of scripts that will execute as soon as possible and the list of scripts that will execute in order as soon as possible are empty.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-15 04:01:23 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    HTML : : main_thread_event_loop ( ) . spin_until ( GC : : create_function ( heap ,  [ & ]  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-26 16:09:02 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        return  m_document - > scripts_to_execute_as_soon_as_possible ( ) . is_empty ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-31 05:23:43 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // Spin the event loop until there is nothing that delays the load event in the Document.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-15 04:01:23 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    HTML : : main_thread_event_loop ( ) . spin_until ( GC : : create_function ( heap ,  [ & ]  { 
							 
						 
					
						
							
								
									
										
										
										
											2023-11-24 15:18:57 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        return  ! m_document - > anything_is_delaying_the_load_event ( ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2024-10-31 05:23:43 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // Queue a global task on the DOM manipulation task source given the Document's relevant global object to run the following steps:
 
							 
						 
					
						
							
								
									
										
										
										
											2024-11-15 04:01:23 +13:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    queue_global_task ( HTML : : Task : : Source : : DOMManipulation ,  m_document ,  GC : : create_function ( m_document - > heap ( ) ,  [ document  =  m_document ]  { 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								        // Update the current document readiness to "complete".
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        document - > update_readiness ( HTML : : DocumentReadyState : : Complete ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // If the Document object's browsing context is null, then abort these steps.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( ! document - > browsing_context ( ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            return ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // Let window be the Document's relevant global object.
 
							 
						 
					
						
							
								
									
										
										
										
											2025-01-21 09:12:05 -05:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        GC : : Ref < HTML : : Window >  window  =  as < HTML : : Window > ( relevant_global_object ( * document ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-09-21 00:43:38 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        // Set the Document's load timing info's load event start time to the current high resolution time given window.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-11 22:42:35 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        document - > load_timing_info ( ) . load_event_start_time  =  HighResolutionTime : : current_high_resolution_time ( window ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // Fire an event named load at window, with legacy target override flag set.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // FIXME: The legacy target override flag is currently set by a virtual override of dispatch_event()
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // We should reorganize this so that the flag appears explicitly here instead.
 
							 
						 
					
						
							
								
									
										
										
										
											2023-08-13 13:05:26 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        window - > dispatch_event ( DOM : : Event : : create ( document - > realm ( ) ,  HTML : : EventNames : : load ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // FIXME: Invoke WebDriver BiDi load complete with the Document's browsing context, and a new WebDriver BiDi navigation status whose id is the Document object's navigation id, status is "complete", and url is the Document object's URL.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // FIXME: Set the Document object's navigation id to null.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-09-21 00:43:38 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        // Set the Document's load timing info's load event end time to the current high resolution time given window.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-11 22:42:35 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        document - > load_timing_info ( ) . dom_content_loaded_event_end_time  =  HighResolutionTime : : current_high_resolution_time ( window ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // Assert: Document's page showing is false.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        VERIFY ( ! document - > page_showing ( ) ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // Set the Document's page showing flag to true.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        document - > set_page_showing ( true ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // Fire a page transition event named pageshow at window with false.
 
							 
						 
					
						
							
								
									
										
										
										
											2023-04-09 11:17:42 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        window - > fire_a_page_transition_event ( HTML : : EventNames : : pageshow ,  false ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // Completely finish loading the Document.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        document - > completely_finish_loading ( ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        // FIXME: Queue the navigation timing entry for the Document.
 
							 
						 
					
						
							
								
									
										
										
										
											2024-04-16 22:04:01 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    } ) ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // FIXME: If the Document's print when loaded flag is set, then run the printing steps.
 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    // The Document is now ready for post-load tasks.
 
							 
						 
					
						
							
								
									
										
										
										
											2023-02-26 16:09:02 -07:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    m_document - > set_ready_for_post_load_tasks ( true ) ; 
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
									
										
										
										
											2025-02-25 11:56:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2025-04-11 15:36:53 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								Optional < FlyString >  XMLDocumentBuilder : : namespace_for_name ( XML : : Name  const &  name )  
						 
					
						
							
								
									
										
										
										
											2025-02-25 11:56:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								{  
						 
					
						
							
								
									
										
										
										
											2025-04-11 15:36:53 +01:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								    Optional < StringView >  prefix ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    auto  parts  =  name . split_limit ( ' : ' ,  3 ) ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( parts . size ( )  >  2 ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        return  { } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    if  ( parts . size ( )  = =  2 )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        if  ( parts [ 0 ] . is_empty ( )  | |  parts [ 1 ] . is_empty ( ) ) 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            return  { } ; 
							 
						 
					
						
							
								
									
										
										
										
											2025-02-25 11:56:09 +00:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								        prefix  =  parts [ 0 ] ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    for  ( auto  const &  stack_entry  :  m_namespace_stack . in_reverse ( ) )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        for  ( auto  const &  namespace_and_prefix  :  stack_entry . namespaces )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            if  ( namespace_and_prefix . prefix  = =  prefix )  { 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								                return  namespace_and_prefix . ns ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								            } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								        } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    } 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								    return  { } ; 
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}  
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
							 
							
								
							 
							
								 
							
							
								inline  namespace  {  
						 
					
						
							
								
									
										
										
										
											2025-05-13 07:06:33 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2024-10-12 23:13:24 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								StringView  s_xhtml_unified_dtd  =  R " xmlxmlxml(  
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								< ! ENTITY  Tab  " 	 " > < ! ENTITY  NewLine  " 
 " > < ! ENTITY  excl  " ! " > < ! ENTITY  quot  " " " > < ! ENTITY  QUOT  " " " > < ! ENTITY  num  " # " > < ! ENTITY  dollar  " $ " > < ! ENTITY  percnt  " % " > < ! ENTITY  amp  " &#x26; " > < ! ENTITY  AMP  " &#x26; " > < ! ENTITY  apos  " ' " > < ! ENTITY  lpar  " ( " > < ! ENTITY  rpar  " ) " > < ! ENTITY  ast  " * " > < ! ENTITY  midast  " * " > < ! ENTITY  plus  " + " > < ! ENTITY  comma  " , " > < ! ENTITY  period  " . " > < ! ENTITY  sol  " / " > < ! ENTITY  colon  " : " > < ! ENTITY  semi  " ; " > < ! ENTITY  lt  " &#x3C; " > < ! ENTITY  LT  " &#x3C; " > < ! ENTITY  nvlt  " &#x3C;⃒ " > < ! ENTITY  equals  " = " > < ! ENTITY  bne  " =⃥ " > < ! ENTITY  gt  " > " > < ! ENTITY  GT  " > " > < ! ENTITY  nvgt  " >⃒ " > < ! ENTITY  quest  " ? " > < ! ENTITY  commat  " @ " > < ! ENTITY  lsqb  " [ " > < ! ENTITY  lbrack  " [ " > < ! ENTITY  bsol  " \ " > < ! ENTITY  rsqb  " ] " > < ! ENTITY  rbrack  " ] " > < ! ENTITY  Hat  " ^ " > < ! ENTITY  lowbar  " _ " > < ! ENTITY  UnderBar  " _ " > < ! ENTITY  grave  " ` " > < ! ENTITY  DiacriticalGrave  " ` " > < ! ENTITY  fjlig  " fj " > < ! ENTITY  lcub  " { " > < ! ENTITY  lbrace  " { " > < ! ENTITY  verbar  " | " > < ! ENTITY  vert  " | " > < ! ENTITY  VerticalLine  " | " > < ! ENTITY  rcub  " } " > < ! ENTITY  rbrace  " } " > < ! ENTITY  nbsp  "   " > < ! ENTITY  NonBreakingSpace  "   " > < ! ENTITY  iexcl  " ¡ " > < ! ENTITY  cent  " ¢ " > < ! ENTITY  pound  " £ " > < ! ENTITY  curren  " ¤ " > < ! ENTITY  yen  " ¥ " > < ! ENTITY  brvbar  " ¦ " > < ! ENTITY  sect  " § " > < ! ENTITY  Dot  " ¨ " > < ! ENTITY  die  " ¨ " > < ! ENTITY  DoubleDot  " ¨ " > < ! ENTITY  uml  " ¨ " > < ! ENTITY  copy  " © " > < ! ENTITY  COPY  " © " > < ! ENTITY  ordf  " ª " > < ! ENTITY  laquo  " « " > < ! ENTITY  not  " ¬ " > < ! ENTITY  shy  " ­ " > < ! ENTITY  reg  " ® " > < ! ENTITY  circledR  " ® " > < ! ENTITY  REG  " ® " > < ! ENTITY  macr  " ¯ " > < ! ENTITY  strns  " ¯ " > < ! ENTITY  deg  " ° " > < ! ENTITY  plusmn  " ± " > < ! ENTITY  pm  " ± " > < ! ENTITY  PlusMinus  " ± " > < ! ENTITY  sup2  " ² " > < ! ENTITY  sup3  " ³ " > < ! ENTITY  acute  " ´ " > < ! ENTITY  DiacriticalAcute  " ´ " > < ! ENTITY  micro  " µ " > < ! ENTITY  para  " ¶ " > < ! ENTITY  middot  " · " > < ! ENTITY  centerdot  " · " > < ! ENTITY  CenterDot  " · " > < ! ENTITY  cedil  " ¸ " > < ! ENTITY  Cedilla  " ¸ " > < ! ENTITY  sup1  " ¹ " > < ! ENTITY  ordm  " º " > < ! ENTITY  raquo  " » " > < ! ENTITY  frac14  " ¼ " > < ! ENTITY  frac12  " ½ " > < ! ENTITY  half  " ½ " > < ! ENTITY  frac34  " ¾ " > < ! ENTITY  iquest  " ¿ " > < ! ENTITY  Agrave  " À " > < ! ENTITY  Aacute  " Á " > < ! ENTITY  Acirc  " Â " > < ! ENTITY  Atilde  " Ã " > < ! ENTITY  Auml  " Ä " > < ! ENTITY  Aring  " Å " > < ! ENTITY  angst  " Å " > < ! ENTITY  AElig  " Æ " > < ! ENTITY  Ccedil  " Ç " > < ! ENTITY  Egrave  " È " > < ! ENTITY  Eacute  " É " > < ! ENTITY  Ecirc  " Ê " > < ! ENTITY  Euml  " Ë " > < ! ENTITY  Igrave  " Ì " > < ! ENTITY  Iacute  " Í " > < ! ENTITY  Icirc  " Î " > < ! ENTITY  Iuml  " Ï " > < ! ENTITY  ETH  " Ð " > < ! ENTITY  Ntilde  " Ñ " > < ! ENTITY  Ograve  " Ò " > < ! ENTITY  Oacute  " Ó " > < ! ENTITY  Ocirc  " Ô " > < ! ENTITY  Otilde  " Õ " > < ! ENTITY  Ouml  " Ö " > < ! ENTITY  times  " × " > < ! ENTITY  Oslash  " Ø " > < ! ENTITY  Ugrave  " Ù " > < ! ENTITY  Uacute  " Ú " > < ! ENTITY  Ucirc  " Û " > < ! ENTITY  Uuml  " Ü " > < ! ENTITY  Yacute  " Ý " > < ! ENTITY  THORN  " Þ " > < ! ENTITY  szlig  " ß " > < ! ENTITY  agrave  " à " > < ! ENTITY  aacute  " á " > < ! ENTITY  acirc  " â " > < ! ENTITY  atilde  " ã " > < ! ENTITY  auml  " ä " > < ! ENTITY  aring  " å " > < ! ENTITY  aelig  " æ " > < ! ENTITY  ccedil  " ç " > < ! ENTITY  egrave  " è " > < ! ENTITY  eacute  " é " > < ! ENTITY  ecirc  " ê " > < ! ENTITY  euml  " ë " > < ! ENTITY  igrave  " ì " > < ! ENTITY  iacute  " í " > < ! ENTITY  icirc  " î " > < ! ENTITY  iuml  " ï " > < ! ENTITY  eth  " ð " > < ! ENTITY  ntilde  " ñ " > < ! ENTITY  ograve  " ò " > < ! ENTITY  oacute  " ó " > < ! ENTITY  ocirc  " ô " > < ! ENTITY  otilde  " õ " > < ! ENTITY  ouml  " ö " > < ! ENTITY  divide  " ÷ " > < ! ENTITY  div  " ÷ " > < ! ENTITY  oslash  " ø " > < ! ENTITY  ugrave  " ù " > < ! ENTITY  uacute  " ú " > < ! ENTITY  ucirc  " û " > < ! ENTITY  uuml  " ü " > < ! ENTITY  yacute  " ý " > < ! ENTITY  thorn  " þ " > < ! ENTITY  yuml  " ÿ " > < ! ENTITY  Amacr  " Ā " > < ! ENTITY  amacr  " ā " > < ! ENTITY  Abreve  " Ă " > < ! ENTITY  abreve  " ă " > < ! ENTITY  Aogon  " Ą " > < ! E  
						 
					
						
							
								
									
										
										
										
											2024-10-12 23:13:24 +02:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								) xmlxmlxml " sv;  
						 
					
						
							
								
									
										
										
										
											2025-05-13 07:06:33 -04:00 
										
									 
								 
							 
							
								
									
										 
								
							 
							
								 
							
							
								
							 
						 
					
						
							
								
									
										
										
										
											2022-03-28 16:25:17 +04:30 
										
									 
								 
							 
							
								
							 
							
								 
							
							
								}