At 11:53 pm +0100 15/2/02, Stefano Mazzocchi wrote: >Jeremy Quinn wrote:
<snip/> >> 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. I think there could be a simple solution ..... At the moment, I cache StartPrefixMapping calls from the 'parent' document, so I can send them to the 'child' document when it starts up. I think this is my mistake .... Whatever generates the 'child' document (the part of the 'parent' document that gets written out) will issue the appropriate StartPrefixMapping calls for that Fragment, no? Therefore it is the responsibility of the generator (Stream, Request, XInclude, XSLT etc.) to output appropriate NameSpaces for the 'child', it is not the 'parent's responsibility. I had though that StartPrefixMapping calls are only made at the beginning of the Stream, when I set up a few log transformers in the sitemap, it became a bit clearer. Is this making sense to anyone? ;) regards Jeremy -- ___________________________________________________________________ Jeremy Quinn Karma Divers webSpace Design HyperMedia Research Centre <mailto:[EMAIL PROTECTED]> <http://www.media.demon.co.uk> <phone:+44.[0].20.7737.6831> <pager:[EMAIL PROTECTED]> --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, email: [EMAIL PROTECTED]