cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From <tcu...@dff.st>
Subject Re: xsp to xsl copy
Date Mon, 24 Jul 2000 12:10:25 GMT
> Sorry guys I thought I got it but I'm really confused now!
> I'm trying to go through this step by step and comment how
> I understood this. Please correct me when I'm wrong...

Hm... it works - somehow...
But I'm still confused ;-)
the error must be somewhere else

This is my XSP page:
 <xsl:template match="*|@*|text()">
   <xsl:copy-of select="."/>
 </xsl:template>

 <xsl:template match="page">
  <xsl:processing-instruction name="cocoon-process">...
  <xsl:processing-instruction name="cocoon-process">...
  <xsl:processing-instruction name="xml-...
  <xsp:page language="java" xmlns:xsp="...
   <page>
     <xsl:copy-of select="@*"/>
     <xsl:apply-templates/>
   </page>
  </xsp:page>
 </xsl:template>

 <xsl:template match="content">
   <xsl:apply-templates/>
 </xsl:template>

And my XML looks like this

<page>
  <navigation>
    ..
  </navigation>
  <content>
    <text>bla</text>
    <text>bla</text>
  </content>
</page>

The "navigation" node (and childs)
shows up perfectly but the "content"
node is just left out.
But "content" calls the same <apply-template>
as the "page" template!

And my XSL should show it by default:

<xsl:template match="*|/">
  <xsl:apply-templates/>
</xsl:template>
<xsl:template match="comment()|text()|@*">
  <xsl:value-of select="."/>
</xsl:template>
--
Torsten

Mime
View raw message