You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lenya.apache.org by Michael Wechner <mi...@wyona.com> on 2004/09/30 09:22:43 UTC

serializer or XSLT problem within trunk

after updating the trunk I receive the following source code (on the 
welcome page)

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
<ns294:html xmlns:ns294="http://www.w3.org/1999/xhtml">
<ns295:head xmlns:ns295="http://www.w3.org/1999/xhtml">
<ns296:title xmlns:ns296="http://www.w3.org/1999/xhtml">Apache Lenya - Content Management System</ns296:title>
<ns297:link xmlns:ns297="http://www.w3.org/1999/xhtml" rel="stylesheet" type="text/css" href="/lenya/lenya/css/default.css" title="default css"/>
</ns295:head>
<ns298:body xmlns:ns298="http://www.w3.org/1999/xhtml">
<ns299:table xmlns:ns299="http://www.w3.org/1999/xhtml" width="100%" border="0" cellpadding="10" cellspacing="0">
<ns300:tr xmlns:ns300="http://www.w3.org/1999/xhtml">
<ns301:td xmlns:ns301="http://www.w3.org/1999/xhtml" class="lenya-header">
<ns302:h1 xmlns:ns302="http://www.w3.org/1999/xhtml">Apache Lenya - Content Management System</ns302:h1>
</ns301:td>
<ns303:td xmlns:ns303="http://www.w3.org/1999/xhtml" class="lenya-project-logo">
<ns304:img xmlns:ns304="http://www.w3.org/1999/xhtml" src="/lenya/lenya/images/project-logo-small.png" alt="Apache Lenya Project Logo"/>
</ns303:td>

Any idea what might be wrong?

Thanks

Michi




-- 
Michael Wechner
Wyona Inc.  -   Open Source Content Management   -   Apache Lenya
http://www.wyona.com              http://cocoon.apache.org/lenya/
michael.wechner@wyona.com                        michi@apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org


Re: serializer or XSLT problem within trunk

Posted by Andreas Hartmann <an...@apache.org>.
Andreas Hartmann wrote:

> 
> Further information:
> http://xml.apache.org/xalan-j/xsltc/xsltc_namespace.html

And even more:
http://www.dpawson.co.uk/xsl/sect2/N5536.html#d6286e2107

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org


Re: serializer or XSLT problem within trunk

Posted by Andreas Hartmann <an...@apache.org>.
Andreas Hartmann wrote:
> Michael Wechner wrote:
> 
>> after updating the trunk I receive the following source code (on the 
>> welcome page)
>>
>> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
>> Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
>> <ns294:html xmlns:ns294="http://www.w3.org/1999/xhtml">
> 
> 
> That's due to my changes to strip_namespaces.xsl.
> Works fine with Xalan, XSLTC screws it up.

Fixed. Solution:

- declared xmlns="http://www.w3.org/1999/xhtml" in the stylesheet

- replaced

   a) <xsl:element name="{local-name()}" namespace="{namespace-uri()}">
        <xsl:copy-of select="@*"/>
        <xsl:apply-templates/>
      </xsl:element>

   with

   b) <xsl:copy>
        <xsl:copy-of select="@*"/>
        <xsl:apply-templates/>
      </xsl:copy>


In case (a), XSLTC seems to add a namespace node to all generated
elements, which means each result tree element gets its own namespace
prefix.

So I tried to use <xsl:copy>, which should use the appropriate
namespace prefix mapping from the XSLT stylesheet, which is
("", http://www.w3.org/1999/xhtml) in our case. It seems to do the
trick.

Further information:
http://xml.apache.org/xalan-j/xsltc/xsltc_namespace.html

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org


Re: serializer or XSLT problem within trunk

Posted by Andreas Hartmann <an...@apache.org>.
Michael Wechner wrote:
> after updating the trunk I receive the following source code (on the 
> welcome page)
> 
> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 
> Transitional//EN""http://www.w3.org/TR/html4/loose.dtd">
> <ns294:html xmlns:ns294="http://www.w3.org/1999/xhtml">

That's due to my changes to strip_namespaces.xsl.
Works fine with Xalan, XSLTC screws it up.

Actually I think it's an XSLTC bug (it doesn't use the
prefix mapping defined in the stylesheet for result prefixes),
but of course that doesn't help us :/

I don't want to revert the changes to the strip_namespaces
stylesheet, so I'm working on a cleaner solution.

-- Andreas


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-dev-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-dev-help@cocoon.apache.org