cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paul Nock" <pn...@medicineplanet.com>
Subject RE: XML to WML
Date Tue, 24 Jul 2001 21:25:52 GMT
This sounds like something weird that happens to me with the UP simulator...

Try exiting the UP simulator, starting it again and then accesing your page.

I've found that there's some peculiar behavior that something somewhere
'remembers' the user-agent of the most recent request from this IP address.
If you have IE and UP running at the same time, access page.xml with IE,
_then_ access page.xml with UP, you get HTML sent to the user-agent.

If you kill and restart UP after anytime you access page.xml from IE, then
it'll come up fine in UP.

Also, if you explicitly do a page.xml?user-Agent=UP in the request, I think
it'll work OK too.

Paul

-----Original Message-----
From: Seth Bunke [mailto:sbun9629@miller.cs.uwm.edu]
Sent: Tuesday, July 24, 2001 1:36 PM
To: cocoon-users@xml.apache.org
Subject: XML to WML


I am having problems with trying to generate content dymanically
for wml and html browsers in a manner similar to that which is
included in the cocoon/samples/wap directory for Cocoon 1.
I believe that my Apache/Tomcat/Cocoon (Windows 98) setup and
configuration is correct because I am able to access
cocoon/wap/example-portfolio.xml properly with both IE and
Phone.com's UP.Simulator - all of the questions/answers
on the mailing list concerning this issue suggest to people
that there is probably something wrong with their
setup/configuration. While I am able to access my xml
document properly with IE, the simulator presents a
"Content-type Error" statement to the screen. When examining
the DOS window for the simulator it states that:

Uncompiled data from HTTP is 2590 bytes.
...found Content-Type: text/html
Content-Type: text/html is not handled by UP.Simulator.
No translator for content-type: text/html

I believe that this is the crux of my problem. My xml file
(test.xml) is located at webapps/cocoon/test/test.xml. I have attempted
to move it to within the cocoon/samples directory (along with
its corresponding xsl files), but this has not solved the problem.
I have included the contents of my xml and xsl files below.
I do not know anyone that is working with Cocoon and consequently
do not have any resources for advice or help on this matter.
Any information that you can provide me on dealing with this
problem will be greatly appreciated.

Thank you,
Seth Bunke

===============================================================
<!-- test.xml -->
<?xml version="1.0"?>
<?xml-stylesheet href="html.xsl" type="text/xsl"?>
<?xml-stylesheet href="wml.xsl" type="text/xsl" media="wap"?>
<?cocoon-process type="xslt"?>

<document>
	<string1>This is the html page</string1>
	<string2>This is the wml page</string2>
</document>
===============================================================
<!-- html.xsl -->
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="document">
		<xsl:processing-instruction
name="cocoon-format">type="text/html"</xsl:processing-instruction>
		<html>
			<pre>This is just a test of the html written in
the xsl</pre>
			<xsl:value-of select="string1"/>
		</html>
	</xsl:template>
</xsl:stylesheet>
================================================================
<!-- wml.xsl -->
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
	<xsl:template match="document">
		<xsl:processing-instruction
name="cocoon-format">type="text/wml"</xsl:processing-instruction>
		<wml>
			<card id="index" title="test wml">
				<p align="center">
					<a href="#card1">Card1</a><br/>
					<a href="#card2">Card2</a><br/>
				</p>
			</card>
			<card id="card1" title="Card 1">
				<p>this is just the text of Card1</p>
				<do type="prev" label="Back">
					<prev/>
				</do>
			</card>
			<card id="card2" title="Card 2">
				<p>this is just the text of Card2</p>
				<do type="prev" label="Back">
					<prev/>
				</do>
			</card>
		</wml>
	</xsl:template>
</xsl:stylesheet>


---------------------------------------------------------------------
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>


---------------------------------------------------------------------
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