You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Steve Krulewitz <sh...@mm.st> on 2004/03/04 23:23:50 UTC
[cforms] Woody template transformer eating namespaced element tags?
Hey folks --
I just upgraded my web application from 2.1.3 to 2.1.4 and I am now
seeing some strange behavior from the woody template transformer. It
seems that elements in the xhtml namespace come out the other side of
the woody template transformer without their names! To reproduce this,
edit this sample file:
src/blocks/woody/samples/forms/registration_template.xml
And add the default namespace xmlns="http://www.w3.org/1999/xhtml" to
the document. When you run the sample, the returned page source looks like:
< xmlns="http://www.w3.org/1999/xhtml">
<>Registration</>
<>
<form ...>
... all normal in here ...
</form>
</>
</>
Notice that all the elements from the template file no longer have
names. Removing the woody template transformer from the pipeline causes
the names to reappear.
Anyone have a quick patch for this? It is a real show stopper for me
since I need some of the woody functionality from 2.1.4.
cheers,
-steve
Re: [cforms] Woody template transformer eating namespaced element
tags?
Posted by Steve Krulewitz <sh...@mm.st>.
> wild guess: perhaps
> http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24793 ?
No it doesn't look like it. This bug is about missing namespaces and
attributes, not element names. Also, my problem seems to be caused by
the woody template transformer -- if I remove it, everything works fine.
cheers,
-steve
Re: [cforms] Woody template transformer eating namespaced element
tags?
Posted by Jan Uyttenhove <ja...@xume.com>.
wild guess: perhaps
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24793 ?
roy huang wrote:
> I got the same problem even in 2.1.5-dev
>
> Roy Huang
> ----- Original Message -----
> From: "Steve Krulewitz" <sh...@mm.st>
> To: <de...@cocoon.apache.org>
> Sent: Friday, March 05, 2004 7:14 AM
> Subject: Re: [cforms] Woody template transformer eating namespaced element tags?
>
>
>
>>I did a little more poking around, and it turns out that even though the
>>woody template transformer mangles the xml document, the problem does
>>not appear unless you run the document through the identity xslt transform.
>>
>>Simple example:
>>
>>test.xml
>>~~~~~~~~
>><html xmlns="http://www.w3.org/1999/xhtml">
>><body>
>>Hello World
>></body>
>></html>
>>
>>test.xsl
>>~~~~~~~~
>><?xml version="1.0"?>
>><xsl:stylesheet version="1.0"
>>xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>> >
>><xsl:template match="@*|node()" priority="-1">
>><xsl:copy>
>><xsl:apply-templates select="@*|node()"/>
>></xsl:copy>
>></xsl:template>
>></xsl:stylesheet>
>>
>>pipeline
>>~~~~~~~~
>><map:match pattern="test">
>> <map:generate src="test.xml"/>
>> <map:transform type="woody"/>
>> <map:transform src="test.xsl"/>
>> <map:serialize/>
>></map:match>
>>
>>Will produce
>>~~~~~~~~~~~~
>>< xmlns="http://www.w3.org/1999/xhtml">
>><>
>>Hello World
>></>
>></>
>>
>>But if you remove the woody transform or the xslt, you get
>>~~~~~~~~~~~~~~
>><html xmlns="http://www.w3.org/1999/xhtml">
>><body>
>>Hello World
>></body>
>></html>
>>
--
Jan Uyttenhove jan.uyttenhove@xume.com
> Xume < - http://www.xume.com
Re: [cforms] Woody template transformer eating namespaced element tags?
Posted by roy huang <li...@hotmail.com>.
I got the same problem even in 2.1.5-dev
Roy Huang
----- Original Message -----
From: "Steve Krulewitz" <sh...@mm.st>
To: <de...@cocoon.apache.org>
Sent: Friday, March 05, 2004 7:14 AM
Subject: Re: [cforms] Woody template transformer eating namespaced element tags?
> I did a little more poking around, and it turns out that even though the
> woody template transformer mangles the xml document, the problem does
> not appear unless you run the document through the identity xslt transform.
>
> Simple example:
>
> test.xml
> ~~~~~~~~
> <html xmlns="http://www.w3.org/1999/xhtml">
> <body>
> Hello World
> </body>
> </html>
>
> test.xsl
> ~~~~~~~~
> <?xml version="1.0"?>
> <xsl:stylesheet version="1.0"
> xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
> >
> <xsl:template match="@*|node()" priority="-1">
> <xsl:copy>
> <xsl:apply-templates select="@*|node()"/>
> </xsl:copy>
> </xsl:template>
> </xsl:stylesheet>
>
> pipeline
> ~~~~~~~~
> <map:match pattern="test">
> <map:generate src="test.xml"/>
> <map:transform type="woody"/>
> <map:transform src="test.xsl"/>
> <map:serialize/>
> </map:match>
>
> Will produce
> ~~~~~~~~~~~~
> < xmlns="http://www.w3.org/1999/xhtml">
> <>
> Hello World
> </>
> </>
>
> But if you remove the woody transform or the xslt, you get
> ~~~~~~~~~~~~~~
> <html xmlns="http://www.w3.org/1999/xhtml">
> <body>
> Hello World
> </body>
> </html>
>
>
Re: [cforms] Woody template transformer eating namespaced element
tags?
Posted by Steve Krulewitz <sh...@mm.st>.
I did a little more poking around, and it turns out that even though the
woody template transformer mangles the xml document, the problem does
not appear unless you run the document through the identity xslt transform.
Simple example:
test.xml
~~~~~~~~
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
Hello World
</body>
</html>
test.xsl
~~~~~~~~
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
>
<xsl:template match="@*|node()" priority="-1">
<xsl:copy>
<xsl:apply-templates select="@*|node()"/>
</xsl:copy>
</xsl:template>
</xsl:stylesheet>
pipeline
~~~~~~~~
<map:match pattern="test">
<map:generate src="test.xml"/>
<map:transform type="woody"/>
<map:transform src="test.xsl"/>
<map:serialize/>
</map:match>
Will produce
~~~~~~~~~~~~
< xmlns="http://www.w3.org/1999/xhtml">
<>
Hello World
</>
</>
But if you remove the woody transform or the xslt, you get
~~~~~~~~~~~~~~
<html xmlns="http://www.w3.org/1999/xhtml">
<body>
Hello World
</body>
</html>