Alex Romayev wrote:
> 
> > > 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 "Q"s
> > > and
> > > alike.
> > > 
This is currently hard coded into the transformer(!) which
means you can't do anything against it...
The InsertTransformer has been merged with the SourceWritingTransformer
in 2.1-dev - the SourceWritingTransformer can be configured
to what encoding should be used.

> > > 2) I have namespace declarations at the root
> > elemet
> > > of
> > > the file.  After running it through the
> > transformer,
> > > the namespace declarations disappear.
> > > 
> > > ...
> > > 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?
> > > 
Which namespace information do you mean? The sunshine namespace
in your add-news-item.xml or a namespace contained in your
content/news.xml?

Carsten

---------------------------------------------------------------------
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]>

Reply via email to