xsl-list
[Top] [All Lists]

[xsl] xml to xhtml namespace problem

2011-01-11 04:36:15
Hi, 

I'm using Saxon 9 EE and xslt 2.0
I want to convert xml to xhtml.
Since we already had stylsheet that convert xml to html I just editet
the stylesheets a little bit.

The problem is I can't give the html-tag the xhtml namespace. 

I have a template that creates the basic structure which looks like
this:

<xsl:template match="/*">
                <html xmlns="http://www.w3.org/1999/xhtml";>
                        <head>
                                <title>
                                        <xsl:value-of select="$path"/>
                                        <xsl:text> </xsl:text>
                                        <xsl:value-of select="$file"/>
                                </title>
                                
                                <style type="text/css">
                                        <![CDATA[
                                                
                                                @charset "utf-8";
                                                @namespace
url("http://www.w3.org/1999/xhtml";);
                                                
                                                /*
********************************************* */
                                                /* General Formatting
Rules    */
                                                /*
********************************************* */
                                                
                                                body {
                                                        width: 730px;
                                                        margin-left:
20px;
                                                }
                                                
                                                ....
                                                
                                                ]]></style>
                        </head>
                        <body>
                                <!--
===================================================================
-->
                                <!--  Document Text
-->
                                <!--
===================================================================
-->                             
                                <div id="ID">
                                        <xsl:apply-templates
select="*[local-name()!='bibliographie']"/>
                                </div>                          
                        </body>
                </html>
</xsl:template>

In the output document a lot of elements look like this:

<h1 xmlns="">...</h1>

How can I get rid of that empty namespace ?!

regards

. . . . . . . . . . . . . . . . . . . . . . . . . .
Patrick Szabo
 XSLT-Entwickler 
LexisNexis
Marxergasse 25, 1030 Wien

mailto:patrick(_dot_)szabo(_at_)lexisnexis(_dot_)at
Tel.: +43 (1) 534 52 - 1573 
Fax: +43 (1) 534 52 - 146 






--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>