yes, this might make a nice little HOW-TO, although i'm a little suspicious that the behaviour may be dependent on xslt engine implementation. If someone does this up for the docs, it would be wise to check out the behaviour with saxon, and xsltc or some other engines.
Geoff > -----Original Message----- > From: Luca Morandini [mailto:[EMAIL PROTECTED]] > Sent: Friday, August 09, 2002 1:19 PM > To: [EMAIL PROTECTED] > Subject: RE: Keeping HTMLSerializer from altering markup? > > > Justin, > > could you please summarize your problem (and the solution > you've found) and post it to the mailing list with a > "[SUMMARY]" tag in > the subject line ? > > Best regards, > > --------------------------------------------- > Luca Morandini > GIS Consultant > [EMAIL PROTECTED] > http://utenti.tripod.it/lmorandini/index.html > --------------------------------------------- > > > > -----Original Message----- > > From: Justin Fagnani-Bell [mailto:[EMAIL PROTECTED]] > > Sent: Friday, August 09, 2002 6:59 PM > > To: [EMAIL PROTECTED] > > Subject: Re: Keeping HTMLSerializer from altering markup? > > > > > > Yes! finally. > > > > Here's what I did. I added a <cdata> tag around my > <textarea> tags in my > > stylesheet, then put <cdata-section- > > elements>cdata</cdata-section-elements> in my serializer > definition. Now > > even when the textarea has no text the tag doesn't get touched. The > > browser just ignores the made up cdata tag and everythings fine. > > > > I tried what you suggested, (adding <cdata-section- > > elements>textelement</cdata-section-elements>) but when the textarea > > contained just text (no markup) i'd get something like > this: [CDATA[some > > text]] in the text field. > > > > Thanks everyone. > > --Justin > > > > > > On Friday, August 9, 2002, at 07:57 AM, Geoff Howard wrote: > > > > >> method, but what is cdata-section-elements? Could it be > of use to me > > >> here? > > > > > > cdata-section-elements is a declaration in xsl:output > element of xsl > > > which > > > allows you to cause the contents of an element to be > surrounded by a > > > <![CDATA[ ]]> block, which causes the character data to > pass through > > > transformation untouched. I use this when serializing > page parts in XML > > > that contain html and need further processing later. > Whether it will do > > > what you want when used with HTMLSerializer I don't know, but it's > > > worth a > > > shot. Technically, the Serializer is only setting up the > output method > > > of > > > the xsl transformation engine (probably xalan, unless > you've configured > > > it > > > to use something else) and in XSL's view, > cdata-section-elements is > > > irrelevant to html output method. Having said that, it > will probably be > > > dependant on the implementation and might work. If you > modify your > > > serializer definition to the following: > > > > > > <map:serializer name="html" mime-type="text/html" > > > src="org.apache.cocoon.serialization.HTMLSerializer"> > > > <cdata-section-elements>textarea</cdata-section-elements> > > > </map:serializer> > > > > > > > --------------------------------------------------------------------- > > 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]>