cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dong Wenyu <wydon...@yahoo.com>
Subject XSL doesn't work under Cocoon 2 .0 + Tomcat 4.01 ??
Date Thu, 31 Jan 2002 16:21:57 GMT
 

I installed Tomcat 4.01 and Cocoon 2.0 sucessfully.
But I can't make XSL work correctly. Is there anything
wrong?

The simple 'CCC.xml' and its XSL file 'CCC.html.xsl'
are as follows:


<!-- ccc.xml -->
<?xml version="1.0"?>

<?xml-stylesheet href="XSL\ccc.html.xsl"
type="text/xsl"?>
<?cocoon-process type="xslt"?>

<MyNamespace:Book
xmlns:MyNamespace="http://localhost:9000/">
   <MyNamespace:Title>   Title line in XML.  
</MyNamespace:Title>
    <MyNamespace:PhraseOrWord>    AAAAAAAAAAA   
</MyNamespace:PhraseOrWord>
    <MyNamespace:PhraseOrWord>    BBBBBBBBBBB   
</MyNamespace:PhraseOrWord>
    <MyNamespace:PhraseOrWord>    CCCCCCCCCCC   
</MyNamespace:PhraseOrWord>
    <MyNamespace:PhraseOrWord>    DDDDDDDDDDD   
</MyNamespace:PhraseOrWord>
</MyNamespace:Book>



<!-- ccc.html.xsl -->
<?xml version="1.0"?>

<xsl:stylesheet
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
               
xmlns:MyNamespace="http://localhost:9000/"
                version="1.0"
>
<xsl:template match="MyNamespace:Book">
  <html>
    <head>
      <title>Title line in XSL</title>
    </head>
    <body>
      <xsl:apply-templates />
    </body>
  </html>
</xsl:template>
  
<xsl:template>
</xsl:template>

</xsl:stylesheet>


I copied CCC.xml to 
'E:\TOMCAT\webapps\ROOT\ccc.xml' 

and CCC.html.xsl to 
'E:\TOMCAT\webapps\ROOT\XSL\ccc.html.xsl' 

respectively. Then I treied 
'http://localhost:9000/ccc.xml'

Nothing is shown except 'Title line in XSL' in the
IE-window title bar. 


But executing the command line 
E:\Tomcat\webapps\ROOT>'java
org.apache.xalan.xslt.Process -IN ccc.xml -XSL
XSL/ccc.html.xsl -OUT ccc.html',

will result in a successful 
'E:\Tomcat\webapps\ROOT\ccc.html' as expected:

<html xmlns:MyNamespace="http://localhost:9000/">
<head>
  <META http-equiv="Content-Type" content="text/html;
charset=UTF-8">
  <title>Title line in XSL</title>
</head>
<body>
   Title line in XML.
    
    AAAAAAAAAAA
    
    BBBBBBBBBBB
    
    CCCCCCCCCCC
    
    DDDDDDDDDDD
</body>
</html>




It seems that Cocoon 2 + Tomcat 4.01 does not support
XSL, or something is wrong with configuration.

Any body help me?





Thank you inadvance.

Dong Wenyu
wydong86@yahoo.com


__________________________________________________
Do You Yahoo!?
Great stuff seeking new owners in Yahoo! Auctions! 
http://auctions.yahoo.com

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


Mime
View raw message