The XHTML Namespace, http://www.w3.org/1999/xhtml

http://www.

The XHTML namespace represents the XHTML component set, just like the ZUL namespace (http://www.zkoss.org/2005/zul) represents the ZUL component set. Thus, a XML element specified with the XHTML namespace simply denotes a component that shall be created based on the component definition from the XHTML component set. For example, the statement blow specifies a component that shall be created as an instance of the component definition called ul, and ul belongs to the XHTML component set:

<h:ul xmlns:h="http://www.w3.org/1999/xhtml">

In other words, ZK loader will search the XHTML component set for the component definition called ul , and then create an instance based on it.

The following is another yet more complete example.

<window title="mix HTML demo" xmlns:h="http://www.w3.org/1999/xhtml">
    <h:table border="1">    
        <h:tr id="row1">        
            <h:td>column 1</h:td>            
            <h:td>            
                <listbox id="list" mold="select">                
                    <listitem label="AA"/>                    
                    <listitem label="BB"/>                    
                </listbox>                
            </h:td>            
        </h:tr>        
    </h:table>    
    <button label="add" onClick="new org.zkoss.zhtml.Td().append(row1)"/>    
</window>

Unlike the html components, where HTML tags are stored in the content property, ZK loader creates one component for each of them. The advantage is that you can manipulate each individual HTML tag dynamically, as depicted in the above example (the add button). The disadvantage is that they take longer to process and more space to maintain.

Tip: Unlike the XHTML namespace, the Native namespace doesn't represent another component set. It is a reserved namespace to tell ZK Loader to send them directly to the client for better performance.