cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arnab.j...@tcs.com
Subject Applying stylesheet on part retrieved from hippo isn't working.
Date Tue, 14 Mar 2006 11:44:42 GMT

Hi all,


I am working on retrieval of content from hippo repository part through 
cocoon.I am able to retrieve data from hippo repository through cocoon.
i am aggregating all xml files retrieved from hippo and applying a master 
stylesheet which would organize the content and place them at certain 
positions.
But while applying the master stylesheet the data retrieved from the 
repositiory is not getting fetched by xsl i.e content  retrieved from 
hippo is not shown.I am sending the xml versions of both the stages.


XML STRUCTURE OF PART  NOT RETRIEVED FROM HIPPO REPOSITORY

  <?xml version="1.0" encoding="ISO-8859-1" ?> 
- <root>
- <rightmenu>
- <HTML xmlns:xlink="http://www.w3.org/1999/xlink">
- <BODY>
 <ACTUAL CONTENT>
  </table>
  </BODY>
  </HTML>
  </rightmenu>
- </root>

XML STRUCTURE OF PART  RETRIEVED FROM HIPPO REPOSITORY

<?xml version="1.0" encoding="ISO-8859-1" ?> 
- <root>
- <content>
- <HTML xmlns:xlink="http://www.w3.org/1999/xlink">
- <BODY>
- <root xmlns:i="http://apache.org/cocoon/include/1.0">
- <document>
 <ACTUAL CONTENT>
   </document>
  </root>
  </BODY>
  </HTML>
  </content>
  </root>

After applying the master stylesheet i need to fetch the content from 
hippo repository.I am providing codes of master stylesheet 
also.Highlighted portion shows the usage of both the contents retrieved 
where content is the part retrieved from hippo repository and rightmenu is 
the part not retrieved from hippo.


<?xml version="1.0"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
version='1.0'
                xmlns:xlink="http://www.w3.org/1999/xlink"
                xmlns:d="DAV:"
                xmlns:i="http://apache.org/cocoon/include/1.0"
                xmlns:h="http://hippo.nl/cms/1.0"
                xmlns:i18n="http://apache.org/cocoon/i18n/2.1"
                xmlns:dasl="http://cocoon.apache.org/webdav/dasl/1.0"
                exclude-result-prefixes="i18n h d dasl">


        <xsl:template match="@*|/|node()"/>
        <!-- Match The Root Node -->
        <xsl:template match="/">
                <HTML>
                <link rel="stylesheet" type="text/css" href="style.css"/>
                <link rel="stylesheet" type="text/css" 
href="homestyles.css"/>
                <link rel="stylesheet" type="text/css" 
href="menustyles.css"/>
                <BODY>
                <xsl:apply-templates select="*"></xsl:apply-templates>
                </BODY>
                </HTML>
        </xsl:template>
        <!-- Match Everything Else -->
        <xsl:template 
match="*|@*|text()|node()|comment()|processing-instruction()">
                <xsl:copy>
                        <xsl:apply-templates 
select="*|@*|text()|node()|comment()|processing-instruction()"></xsl:apply-templates>
                </xsl:copy>
        </xsl:template> 
<!-- Match The Root Node -->
        <xsl:template match="page">
        <html>
          <body>
          <table width="100%" cellspacing="2" cellpadding="2" border="0">
          <tr>
                <xsl:apply-templates select="header"/>
          </tr>
          <tr> 
                <xsl:apply-templates select="subheader"/>
           </tr>
           <tr>
           <xsl:apply-templates select="topmenu"/>
           </tr>
            <table width="100%" cellspacing="0" cellpadding="0" 
border="0"> 
           <tr>
                <td width="20%">
                  <xsl:apply-templates select="leftmenu"/>
                </td> 
                <td width="60%">
                        <xsl:apply-templates select="content"/>
                </td> 
                <td width="20%">
                        <xsl:apply-templates select="rightmenu"/>
                </td> 
           </tr>
           </table>
           <tr>
                <xsl:apply-templates select="footer"/>
           </tr>
          </table>
          </body>
        </html>
        </xsl:template>

</xsl:stylesheet>


Kindly let me know if any other documents needed to be posted. Any inputs 
on the issue  would be highly appreciated.



Regards,
Arnab Jena
Assistant Systems Engineer
Tata Consultancy Services Limited
Bangalore,Karnataka
India
Mailto: arnab.jena@tcs.com
Website: http://www.tcs.com
ForwardSourceID:NT00006036 

Notice: The information contained in this e-mail message and/or attachments to it may contain
confidential or privileged information.   If you are not the intended recipient, any dissemination,
use, review, distribution, printing or copying of the information contained in this e-mail
message and/or attachments to it are strictly prohibited.   If you have received this communication
in error, please notify us by reply e-mail or telephone and immediately and permanently delete
the message and any attachments.  Thank you
Mime
View raw message