cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gérard VOORNEVELD <ger...@accxs.net>
Subject RE: String in <Xsp:logic>
Date Wed, 01 Nov 2000 08:19:30 GMT

Hi,

I think it's due to the <message> tag.
I've tried the following and it works.

but the output is : <message> Hello world </message> !!!

(**** indicates what have changes)

<?xml version="1.0"?>
<?xml-stylesheet href="tst1-xsp.xsl" type="text/xsl"?>
                       ************
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns:util="http://www.apache.org/1999/XSP/Util" >
 <xsp:structure>
	<xsp:include>java.lang.*</xsp:include>
 </xsp:structure>
 <page>
  <xsp:logic>
	String testing = "&lt;message&gt; Hello world &lt;/message&gt;";
                        ****       ****             ****        ****
  </xsp:logic>
  <xsp:content>
	<xsp:expr>testing</xsp:expr>
  </xsp:content>
 </page>
</xsp:page>

With following the xsp

<?xml version="1.0"?>
<!-- Written by Gerard VOORNEVELD gvoorneveld@accxs.net -->
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="page">
        <xsl:processing-instruction name="cocoon-format">
            type="text/html"
        </xsl:processing-instruction>

        <html>
	  <body bgcolor="#f0f0f0">
		<xsl:apply-templates/>
        </body>
        </html>
    </xsl:template>
    <xsl:template match="message">
		<br/>
		<i>
		<xsl:apply-templates/>
		</i>
    </xsl:template>
</xsl:stylesheet>

Bye

Gerard VOORNEVELD (gvoorneveld@accxs.net)

-----Message d'origine-----
De : Virdi,T.J. [mailto:TVIRDI@cerner.com]
Envoyé : mardi 31 octobre 2000 23:42
À : cocoon-users@xml.apache.org
Objet : String in <Xsp:logic>


Hello:
I have an XSP page that has a well formed string variable defined in
<xsp:logic> tag (Please see the code at the bottom). What am I doing wrong
since I get the following errors. If I put the string as "Hello World", it
works. Any comment is highly appreciated. Thanks,
TJ

java.lang.Exception: XSP Java Compiler:
Compilation failed for _getData.java 88:
String not terminated at end of line. String testing = " ^ 89: ';'
expected. xspParentNode = xspCurrentNode; ^ 103:
String not terminated at end of line. ";
^ 3 errors





<?xml version="1.0"?>
<?xml-stylesheet href="http://localhost/text.xsl" type="text/xsl"?>
<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>

<xsp:page language="java" xmlns:xsp="http://www.apache.org/1999/XSP/Core"
xmlns:util="http://www.apache.org/1999/XSP/Util" >
 <xsp:structure>
	<xsp:include>java.lang.*</xsp:include>
 </xsp:structure>

 <page>
  <xsp:logic>
	String testing = "<message>Hello world</message>";
  </xsp:logic>
  <xsp:content>
	<xsp:expr>testing</xsp:expr>
  </xsp:content>
 </page>
</xsp:page>

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org


Mime
View raw message