Xalan's behavior is correct -- Sablotron is non-conformant.  See the
following for more info:

   http://www.w3.org/TR/xslt#section-HTML-Output-Method

In particular:

   "The html output method should not output an element differently from
   the xml output method unless the expanded-name of the element has a null
   namespace URI; an element whose expanded-name has a non-null namespace
   URI should be output as XML. If the expanded-name of the element has a
   null namespace URI, but the local part of the expanded-name is not
   recognized as the name of an HTML element, the element should output in
   the same way as a non-empty, inline element such as span."

Thus, any element with a non-null namespace URI must be output as XML.

Dave



                                                                                       
                                                 
                      Aaron Donovan                                                    
                                                 
                      <aaronmdonovan@ear         To:      [EMAIL PROTECTED]     
                                                 
                      thlink.net>                cc:      (bcc: David N 
Bertoni/Cambridge/IBM)                                          
                                                 Subject: xhtml to html                
                                                 
                      07/29/2002 10:00                                                 
                                                 
                      AM                                                               
                                                 
                      Please respond to                                                
                                                 
                      xalan-dev                                                        
                                                 
                                                                                       
                                                 
                                                                                       
                                                 



We are in the process of transitioning to xml/xhtml, but due to some
browser and search software issues we are serving out only html not
xhtml.  Currently, we use apache/php with Sablottron to transform our
xhtml to html with the following transform.

<?xml verion="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform";>
<xsl:output method="html" indent="yes" encoding="ISO-8859-1" />
<xsl:template match="xhtml:html"
xmlns:xhtml="http://www.w3.org/1999/xhtml"; >
<xsl:copy-of select="."/>
</xsl:template>
</xsl:stylesheet>



It works fine.  I was looking to try cocoon for its caching, but the
transform in xalan results in xhtml.  The trailing /> are not changed to
 >.  I have noticed that if I remove the namespace from the html tag it
works, but I'm not sure why.  Any help would be appreciated.




Reply via email to