cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jeremy Aston" <jeremyas...@yahoo.co.uk>
Subject RE: Newbie XSP question - why dosn't this work?
Date Fri, 12 Oct 2001 09:05:51 GMT
Hi Soren,

Am I correct in assuming that the getContacts() call returns a stream of XML
and it is the "<" and ">" in that stream that is getting encoded?

I have not tried exactly what you are doing so I do not have experience of
the problem however you may get some joy if you sound the returned XML
stream with a CDATA<[[ ]]> construct.  Really I need to try it to determine
if I am talking complete codswallop.  If you have no joy then send me all
the files, including your java, and I will see what I can do.

Regards

Jeremy

-----Original Message-----
From: Søren Neigaard [mailto:neigaard@mobilethink.dk]
Sent: 12 October 2001 17:28
To: cocoon-users@xml.apache.org
Subject: Newbie XSP question - why dosn't this work?


I have a XSP, a XSL and a logicsheet. Everything works fine, but one thing.
My logicsheet returns XML, but it encodes the "<" and the ">". Why and what
can I do to prevent this?

Here is my logicsheet:

<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
	xmlns:xsp="http://apache.org/xsp"
	xmlns:pim="http://www.mobilethink.dk/pim"
>  <!-- namespace for det taglib som filen en beregnet for skrives
ovenfor-->

<xsl:output encoding="ISO-8859-1" indent="yes" method="xml"/>

<xsl:template match="xsp:page">
	<xsp:page>
		<xsl:apply-templates select="@*"/>

<!-- Her kommer alle include'erne -->

		<xsp:structure>
			<xsp:include>java.util.*</xsp:include>
			<xsp:include>dk.mobilethink.test.businessobjects.*</xsp:include>
		</xsp:structure>

		<xsl:apply-templates/>
	</xsp:page>
</xsl:template>

<!-- Her kommer templates til de enkelte tags -->

<xsl:template match="pim:kontaktpersoner">
	<xsp:logic>
		String msg = ContactBO.getContacts(
			"<xsl:value-of select="pim:nummer"/>" <!-- osv, hvis der er andre
parametre -->
		);
		System.out.println(msg);
	</xsp:logic>
	<xsp:expr>msg</xsp:expr>
</xsl:template>

<!-- Default match template, er altid den samme -->

<xsl:template match="@*|*|text()|processing-instruction()" priority="-1">
    	<xsl:copy>
      		<xsl:apply-templates select="@*|*|text()|processing-instruction()"/>
    	</xsl:copy>
</xsl:template>

</xsl:stylesheet>

Med venlig hilsen/Best regards
Søren Neigaard
-------------------------------
Mobilethink A/S
Arosgaarden
Åboulevarden 23, 5.sal
DK - 8000 Århus C
Telefon: +45 86207800
Direct: +45 86207810
Fax: +45 86207801


---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


---------------------------------------------------------------------
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: <cocoon-users-unsubscribe@xml.apache.org>
For additional commands, e-mail: <cocoon-users-help@xml.apache.org>


Mime
View raw message