Hi Carsten,

I've tested both encoding and namespaces and they
worked fine.  Thanks very much for the quick fixes.

Now, a couple of problems:

1. The namespace declarations are generated at each
individual element rather than the root node.  Of
course it still works, but add to the file size and
makes it less readable.  I know I'm being picky, but
the size issue could become a factor for larger files.

2. This is a strange one.  I have a transformer which
I need to run on the files written by
SourceWritingTransformer, which needs to parse a date
element.  This was working fine with the old
SourceWritingTransformer (outside of the fact that I
had to manually stick in the namespaces), but for some
reason my "date" transformer is now choking on the
produced files.  My date formats are "yyyy-MM-dd" and
it appears that it only reads a part of the string,
e.g., 2001-11 and then choke.  What fixes it sometimes
is if I open the file in XMLSpy and pretty-print XML
text.

To be honest with you, I haven't really done any
proper testing to be able to isolate the problem, but
if you have any ideas, it would be greatly
appreciated.

Cheers,
-Alex

--- Alex Romayev <[EMAIL PROTECTED]> wrote:
> Hi Carsten,
> 
> Thanks for the quick fix, do you mean
> SourceWritingTransformer or InsertTransformer?
> 
> Cheers,
> -Alex
> 
> > -----Original Message-----> 
> > From: "Carsten Ziegeler" <[EMAIL PROTECTED]>
> > To: <[EMAIL PROTECTED]>
> > Subject: RE: SunShine-InsertTransformer: encoding
> > problem
> > Date: Fri, 11 Oct 2002 08:36:00 +0200
> > 
> > Hi Alex,
> > 
> > I just checked in a fix for the namespace problem
> -
> > now
> > it works for me - could you please check - if
> > everything
> > is working for you, too.
> > 
> > Thanks
> > Carsten
> > 
> > > -----Original Message-----
> > > From: Alex Romayev [mailto:[EMAIL PROTECTED]]
> > > Sent: Tuesday, October 08, 2002 1:12 PM
> > > To: [EMAIL PROTECTED]
> > > Subject: RE: SunShine-InsertTransformer:
> encoding
> > problem
> > > 
> > > 
> > > --- Carsten Ziegeler <[EMAIL PROTECTED]>
> wrote:
> > > > 
> > > > Alex Romayev wrote:
> > > > > > 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?
> > > > > 
> > > > It's not directly in the transformer. The
> > > > transformer uses
> > > > a component called ResourceConnector and this
> > does
> > > > the
> > > > saving. The connector uses
> > > >
> > >
> >
>
org.apache.cocoon.xml.XMLUtils.defaultSerializeToXMLFormat
> > > > to serialize the XML and there you will find
> > this
> > > > setting.
> > > > 
> > > > A rough time line for 2.1 is end of this year,
> I
> > > > guess
> > > > +/- 1 or 2 months...
> > > > 
> > > > > 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.
> > > > > 
> > > > Can you give a complete test case for this?
> > (Sitemap
> > > > snippet plus the two xml files) - If you can
> > provide
> > > > this I will try to find the bug as soon as I
> > have
> > > > time.
> > > > 
> > > > Carsten
> > > > 
> > > 
> > > Sure, here is the sitemap:
> > > 
> > > <map:match pattern="admin/add-news">
> > >   <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 I've attached the two files (slightly
> > simplified).
> > > 
> > > Cheers,
> > > -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]>
> > > > 
> > > 
> > > 
> > 
> 
> 
> 
> 
>
---------------------------------------------------------------------
> 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