You find the betwixt transformer in the Cocoon scratchpad with a working example.
-- Reinhard
Cheers, I found it using cocoon 2.1.4 (but I could not find a direct link to the example).
So I tried http://wiki.cocoondev.org/Wiki.jsp?page=BetwixtTransformer.
Nice.
...but the resulting transformation is (if I use <map:serialize type="xml"/> instead of <map:serialize />):
<?xml version="1.0" encoding="ISO-8859-1" ?>
<page xmlns:xsp="http://apache.org/xsp" >
<example xmlns:betwixt="http://apache.org/cocoon/betwixt/1.0">
<?xml version="1.0" encoding="ISO-8859-1" ?>
<Hashtable>
<entry>
<key>entry2</key>
<value>22</value>
</entry>
<entry>
<key>entry1</key>
<value>String1</value>
</entry>
</Hashtable>
</example>
</page>
So the second <?xml version="1.0" encoding="ISO-8859-1" ?> produce in Mozilla Firefox (and Navigator) a parsing error. IE 6 seems not to care.
If I use <map:serialize /> Mozilla is working fine but IE produce a parsing error. The result of the serialize is:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<page xmlns:xsp="http://apache.org/xsp">
<example xmlns:betwixt="http://apache.org/cocoon/betwixt/1.0">
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<Hashtable>
<entry>
<key>entry2</key>
<value>22</value>
</entry>
<entry>
<key>entry1</key>
<value>String1</value>
</entry>
</Hashtable>
</example>
</page>
Again there are *TWO* <!DOCTYPE/> declarations. Is that a bug of the BetwixtTransformer.java and should I post a bug?
Like I stated before I used the wiki page as example. The output of the Betwixt transformation was described as:
<page>
<example>
<testB>
<entry><key>entry1</key><value>String1</value></entry>
<entry><key>entry2</key><value>22</value></entry>
</testB>
</example>
</page>
Why do I get <Hashtable><entry> instead of <testB><entry>? Should I update the wiki?
King regards
--
<thorsten>
<name>Thorsten Scherler</name>
<country>Spain</country>
<@mail> [EMAIL PROTECTED]</@mail>
<@cocoon-WIKI> http://wiki.cocoondev.org/Wiki.jsp?page=Scherler</@cocoon-WIKI>
<http>http://www.target-x.de</http>
</thorsten>
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
