Jeremy Quinn wrote:
> >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?
Yes, I definately think we should go down this road.
> As I understand it we would need stuff like:
>
> WriteableXMLDBSourceImpl, WriteableFileSourceImpl etc.
>
> Or use/extend Vadim's XMLDBTransformer?
I'm afraid of having a bunch of different transformers that react on
different namespaces just because the storage location is different.
I think that a writable resource would make perfect sense.
> >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.
'welcome.
> 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.
Congratulations: you win the price of 'first man on cocoon-dev to crush
into the wall of meta-namespacing' :)
Really: this is a *very* big issue and it is somewhat similar to way
XSLT is capable of performing namespace virtualization in order to allow
stylesheets to work on stylesheets.
But this is a *very* complex thing and always smelled like FS to me.
I would personally filter out all the content of the 'xfwt' namespace
before saving and in case people has to write content that includes a
'turned-off' 'xfwt' content (say, an XML document that explains the
'xfwt' markup), that could be written in CDATA sections.
> Which is the right way to go do you think?
I would filter them out before saving and forget about it.
--
Stefano Mazzocchi One must still have chaos in oneself to be
able to give birth to a dancing star.
<[EMAIL PROTECTED]> Friedrich Nietzsche
--------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, email: [EMAIL PROTECTED]