You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Dong Wenyu <wy...@yahoo.com> on 2002/01/31 17:21:57 UTC

XSL doesn't work under Cocoon 2 .0 + Tomcat 4.01 ??

 

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


Re: XSL doesn't work under Cocoon 2 .0 + Tomcat 4.01 ??

Posted by Carlos Araya <ca...@cvc.edu>.
On 01/31/02 8:21, "Dong Wenyu" <wy...@yahoo.com> wrote:

> 
> 
> 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"?>
Processing instructions that used to be ok with Cocoon 1.8.X are no longer
supported, you have to create a subsitemap for the XSL to work properly.


<big segment snipped />
> 
> 
> It seems that Cocoon 2 + Tomcat 4.01 does not support
> XSL, or something is wrong with configuration.
> 
> Any body help me?
> 
Look at the sitemap documentation, that'll help

Carlos

-- 
Carlos E. Araya
---+ WebCT Administrator/Trainer
 P | California Virtual Campus
 - | C/O De Anza College
 G | 21250 Stevens Creek Blvd
---+ Cupertino, CA 95014

email               carlos@cvc.edu
web                 http://www.cvc1.org/ (work)
                    http://www.silverwolf-net.net (personal)
phone               408 257 0420 (work)
PGP Fingerprint:    E629 5DFD 7EAE 4995 E9D7  3D2F 5A9F 0CE7 DFE7 1756

We cannot put off living until we are ready. The most salient
characteristic of life is its  coerciveness: it is always urgent,  'here and
now' without any possible postponement. Life is  fired at us point blank.
Jose Ortega Y Gasset



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