cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jeremy Quinn <jer...@media.demon.co.uk>
Subject Re: FileWritingTransformer
Date Fri, 15 Feb 2002 18:44:04 GMT
At 6:24 pm +0100 15/2/02, Stefano Mazzocchi wrote:
>Jeremy Quinn wrote:
>>
>> Dear All,
>>
>> I reckon I have the FileWritingTransformer and some samples ready for
>> others to test.
>>
>> Would anyone have any objection to me adding them to the scratchpad?
>
>Absolutely not! I would use it instanstly!

Good! Thanks ;)
It is all working and ready to commit .... however, I am rusty .....
I am currently stuck trying to work out how to add to cvs :<

If you are desperate, I can email it to you off-list.

>Question 1#: how hard would it be do to
>
> <xfwt:write src="xmldb://localhost/result.xml">
>  <page>
>   ...
>  </page>
> </xfwt>

Currently there is a load of code in FileWritingTransformer that is File
specific, I check for a 'file:' prefix on resolved sources.


I think we would want Sylvain's WriteableSource would'nt we?

As I understand it we would need stuff like:

	WriteableXMLDBSourceImpl, WriteableFileSourceImpl etc.

Or use/extend Vadim's XMLDBTransformer?

>Question #2: do you check if the <xfwt:write> element includes *one* and
>only *one* nested element? If not, we could end up with problems later
>on.

No I don't, I'll add that to my list, thanks.

Two other issues ....

I need to make sure the Transformer does not emit more than one 'copy' of
each namespace prefix, currently multiple sources (FileGenerator &
XInclude) with multiple copies of the same namespace, cause multiple
identical xmlns attributes in the Serialized file, causing subsequent
Parser errors when it is read.

A namespace declaration for xfwt is always output to the files it writes to.
It was already in the Document that the file is generated from so it
happens automatically.

I am trying to decide if this is a good thing or not.

In one way it is quite cute ;) a kind of signature, but in another sense it
is pollution, if there are no xfwt tags in the file, why the hell should it
declare that namespace?

If I filter it out however, then no-one can edit files containing that
namespace anymore.

Which is the right way to go do you think?



Thanks

regards Jeremy

-- 
   ___________________________________________________________________

   Jeremy Quinn                                           Karma Divers
                                                       webSpace Design
                                            HyperMedia Research Centre

   <mailto:sharkbait@mac.com>     		 <http://www.media.demon.co.uk>
   <phone:+44.[0].20.7737.6831>             <pager:jermq@vizzavi.net>

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Mime
View raw message