Hi,
I'm trying my way around SunShine and running into 2
problems:
1) I have an existing XML file with UTF-8 encoding. I
use InsertTransformer to add a new record. It does so
correctly, but changes the file encoding to ISO-8859-1
and replaces all non-English text with "С"s and
alike.
2) I have namespace declarations at the root elemet of
the file. After running it through the transformer,
the namespace declarations disappear.
Here is my sitemap:
<map:match pattern="admin/add-news">
<map:act type="set-character-encoding">
<map:parameter name="form-encoding" value="UTF-8"/>
</map:act>
<map:act type="sunShine-session"/>
<map:generate
src="resources/sunshine/admin/add-news-item.xml"/>
<map:transform type="sunShine"/>
<map:transform type="sunShineInsert"/>
<map:serialize type="xml"/>
</map:match>
And add-news-item.xml:
<?xml version="1.0" encoding="UTF-8"?>
<addnews
xmlns:sunshine="http://cocoon.apache.org/sunshine/1.0">
<sunshine:insert>
<sunshine:file>content/news.xml</sunshine:file>
<sunshine:path>/news</sunshine:path>
<sunshine:fragment>
<item id="test">
<title>Hello1</title>
</item>
</sunshine:fragment>
<sunshine:replace>item[@id='test']</sunshine:replace>
</sunshine:insert>
</addnews>
Any ideas on what I'm doing wrong?
Thanks,
-Alex
---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faq/index.html>
To unsubscribe, e-mail: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>