You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Steven Maring <St...@trcinc.com> on 2000/04/06 21:18:59 UTC

whitespace problem in logicsheets

I want to be able to do this in a logicsheet:

<xsp:logic>
   URL authenticatorURL = new URL( "<xsl:value-of select="authenticator/url"
/>" );
   ...

but the generated code has the whitespace from the XML.

URL authenticatorURL = new URL( "
        http://localhost/modelSystem/servlet/AuthenticatorDataServlet
" );


which of coarse throws an exception about incomplete lines.

Is there any way to get rid of the whitespace without just doing so in the
XML?



XML looks like this:

<page>
	<authenticator>
		<url>
	
http://localhost/modelSystem/servlet/AuthenticatorDataServlet
		</url>
	</authenticator>
	...




-Steve Maring

Re: whitespace problem in logicsheets

Posted by Brett McLaughlin <br...@earthlink.net>.

Steven Maring wrote:
> 
> I want to be able to do this in a logicsheet:
> 
> <xsp:logic>
>    URL authenticatorURL = new URL( "<xsl:value-of select="authenticator/url"
> />" );
>    ...
> 
> but the generated code has the whitespace from the XML.
> 
> URL authenticatorURL = new URL( "
>         http://localhost/modelSystem/servlet/AuthenticatorDataServlet
> " );
> 
> which of coarse throws an exception about incomplete lines.
> 
> Is there any way to get rid of the whitespace without just doing so in the
> XML?

you can either:

(1) turn on validation in the XML processing, which removes whitespace
(2) deal with the DOM node directly, invoking normalize(), which takes
care of this problem.

> 
> XML looks like this:
> 
> <page>
>         <authenticator>
>                 <url>
> 
> http://localhost/modelSystem/servlet/AuthenticatorDataServlet
>                 </url>
>         </authenticator>
>         ...
> 
> -Steve Maring
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
> For additional commands, e-mail: cocoon-users-help@xml.apache.org