Return-Path: Delivered-To: apmail-xml-cocoon-users-archive@xml.apache.org Received: (qmail 51129 invoked by uid 500); 8 Nov 2002 21:58:23 -0000 Mailing-List: contact cocoon-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-users@xml.apache.org Delivered-To: mailing list cocoon-users@xml.apache.org Received: (qmail 51100 invoked from network); 8 Nov 2002 21:58:21 -0000 Message-ID: <20021108215828.83756.qmail@web40801.mail.yahoo.com> Date: Fri, 8 Nov 2002 13:58:28 -0800 (PST) From: Geoff Howard Subject: RE: Serializer for d-o-e? To: cocoon-users@xml.apache.org In-Reply-To: <2CB090FC30192549B04101547F33E93F0E3FF6CE@exegrnnts005.seattleu.edu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Evan, In the past, I have configured the xml serializer to output certain named elements as cdata - would that help your original situation? As I still don't totally get your situation, I'll explained where it helped me: I had user edited "real world" html coming out of a database that would definitely have been invalid xml. My first pipeline serialized that result to xml and specified those elements as CDATA sections (configuration param in sitemap). From then on, the bad html was unparsed down the pipeline, but was successfully output at the end by the html serializer "as is". If your aim was to actually clean up the output, could you use jTidy to clean up the results? Geoff --- "Lenz, Evan" wrote: > J.Pietschmann wrote: > > The answer is quite simple: you can't. D-o-e only > works if the > > XSLT processor serializes the result itself, > > Please re-read my message a little more carefully. > It's easy to dismiss it > as a top-10 XSLT FAQ, but it isn't. > > > the information > > which text nodes are supposed to be d-o-e'd on > output is not > > transported through the SAX pipelines Cocoon uses > for plumbing > > it's components. > > Actually it can be if I just pass that information > on as a special attribute > (or element or processing instruction). Note that > I'm not interested in > using xsl:disable-output-escaping. I already > understand that I can't and > that there are very good reasons why I can't. > > An example is in order. Here is what I would like to > do: > > > > > > > > Then I would like a custom serializer to simply > check every element (or > perhaps only certain elements) for the presence of > the attribute in my > namespace called my:disable-output-escaping. When > its value is yes, then > output the content of that element without escaping > markup characters. > > This is a general problem that comes up often enough > in the real world that > I thought someone might have already implemented > such a feature. I recall > that the Xalan serializer had some kind of PI-based > hack for attaining the > same. > > As it happens, I've already solved my problem at > hand by using the Google > Appliance's internal XSLT processor (which supports > xsl:disable-output-escaping) to generate custom > HTML, and then using the > HTMLGenerator to load the Google results into > Cocoon. Not exactly Web > services, but it's at least nice to isolate the hack > on the Google side. It > may break in rare cases, but at least my site will > still only be serving > well-formed XHTML :-) > > Evan > > > -----Original Message----- > > From: J.Pietschmann [mailto:j3322ptm@yahoo.de] > > Sent: Friday, November 08, 2002 10:58 AM > > To: cocoon-users@xml.apache.org > > Subject: Re: Serializer for d-o-e? > > > > Lenz, Evan wrote: > > > I understand why Cocoon disables the use of > disable-output-escaping in > > XSLT. > > > However, in my current project, which involves > parsing XML results from > > > Google containing escaped (and non-well-formed) > HTML, I need to find a > > way > > > to disable output escaping for certain sections > of text, perhaps based > > on > > > the presence of a special attribute or PI that I > can generate when > > > necessary. Does Cocoon provide a way of > parameterizing an existing > > > serializer to do this? Has anyone implemented > such a serializer? I would > > > think that such a customization of an existing > XML serializer should be > > > pretty simple, but the Cocoon serialization > framework is so abstract > > that > > > I'm having trouble finding the right code to > extend or modify. > > > > The answer is quite simple: you can't. D-o-e only > works if the > > XSLT processor serializes the result itself, the > information > > which text nodes are supposed to be d-o-e'd on > output is not > > transported through the SAX pipelines Cocoon uses > for plumbing > > it's components. > > One work around would be to do the opposite: > emulate serializing > > in XSLT and use a text serializer, with some magic > so that the > > client gets a content-type=text/html. > > > > J.Pietschmann > > > > > > > --------------------------------------------------------------------- > > Please check that your question has not already > been answered in the > > FAQ before posting. > > > > > To unsubscribe, e-mail: > > > For additional commands, e-mail: > > > --------------------------------------------------------------------- > Please check that your question has not already > been answered in the > FAQ before posting. > > > To unsubscribe, e-mail: > > For additional commands, e-mail: > > __________________________________________________ Do you Yahoo!? U2 on LAUNCH - Exclusive greatest hits videos http://launch.yahoo.com/u2 --------------------------------------------------------------------- Please check that your question has not already been answered in the FAQ before posting. To unsubscribe, e-mail: For additional commands, e-mail: