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: <[EMAIL PROTECTED]>
For additional commands, e-mail: <[EMAIL PROTECTED]>