--- Carsten Ziegeler <[EMAIL PROTECTED]> wrote:
> 
> 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.

I did a quick search for "ISO-8859-1" in source files
and nothing related to InsertTransformer came up.  Is
there a workaround you could suggest until 2.1 comes
out?  By the way, is there a rough timeline for this
release?

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

The namespaces in content/news.xml.  By the way, I've
raised this problem with SourceWriting transformer as
well and haven't seen it in the recent bug-list
e-mail.  I'm just thinking that if the two got merged,
the problem might still be there.

Similar question, would you suggest any workaround
before 2.1 release comes out?

Thanks for you help Carsten,
-Alex

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


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