You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "Yap, Mow Ching (NOW)" <MY...@uk.now.com> on 2001/10/02 14:36:20 UTC

stripping whitespace [c2].

does anyone know the best way to strip whitespaces from xml generated by an
xsp document.

i use xml spy to write my xml documents. switching between grid view and
text view causes the elements in the doc to be neatly formatted, but
unfortunately adds whitespaces. so instead of:

<Title><xsp:expr>item.title</xsp:expr></Title>

i have:

<Title>
	<xsp:expr>item.title</xsp:expr>
</Title>

now, the only way i know how to strip these unwanted whitespaces is in the
xslt transform by using

normalize-space(Title)

which results in me having an xslt document full of normalize-space function
calls.

does anyone know a better way of resolving this. i read somewhere that an
accompanying schema would do the trick, but does c2 do runtime validation
against a schema, and do i really want that on request anyway.

tks.
mooch.



The information in this Internet E-mail is confidential and is intended
solely for the addressee. Access, copying or re-use of information in it by
anyone else is unauthorized. Any views or opinions presented are solely
those of the author and do not necessarily represent those of TWI, TWIi,
IMG, PCC, NOW or any of their affiliates. If you are not the intended
recipient please contact helpdesk@uk.now.com and delete this email
immediately.

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>


Re: stripping whitespace [c2].

Posted by Arno Illmann <ar...@gmx.de>.
Hi!

Could you give me an working example (with a XML and a XSL file) of your normalize-space(Title) code. I am working on the same problem (see thread "HTML Code Formatting / Meta Tags" a few before), but all tests did not come to an good end, I think about a solution with xsl.

In C1 you could configure the line length of the output too.

Thanks in advance, Arno

---------------------------------------------------------------------
Please check that your question has not already been answered in the
FAQ before posting. <http://xml.apache.org/cocoon/faqs.html>

To unsubscribe, e-mail: <co...@xml.apache.org>
For additional commands, e-mail: <co...@xml.apache.org>