How to embed XUL in an XHTML document

I have an XHTML document and you want to embed XUL widgets in the document. What is the correct XML syntax for this?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>  
</head>
  <body>    
  insert XUL here
  </body>
</html>
+5
source share
1 answer

add xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"to tag <html>.

then use <xul:element>for example.<xul:vbox>

Edit

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" 
      xmlns:xul="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
      xml:lang="en" lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>  
</head>
  <body>    
    <xul:vbox>
    </xul:vbox>
  </body>
</html>

Also, I guess this is not such a simple case ... otherwise there would not be much point in wrapping the xul in html (although sometimes this happens sometimes)

Edit

Some additional points to consider when doing this:

( )

+10

All Articles