cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Washeim <esa...@canuck.com>
Subject xsp -> xsl -> xinclude chain problem
Date Mon, 10 Jul 2000 22:35:30 GMT
Ok, once again, betraying either my ignorance or the need for C2 :) . . .

I'm trying to chain processing such that:
an xsp page is transformed by xsl to execute a further processing
transformation, namely xinclude . . .

I have an xsp produced page which might be abbreviated to:

<?xml version="1.0" encoding="ISO-8859-1"?>

<?cocoon-process type="xsp"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="page-xsp.xsl" type="text/xsl"?>

<xsp:page 
  language="java" create-session="true"
  xmlns:xsp="http://www.apache.org/1999/XSP/Core"
  xmlns:request="http://www.apache.org/1999/XSP/Request"
  xmlns:session="http://www.apache.org/1999/XSP/Session"
  xmlns:util="http://www.apache.org/1999/XSP/Util"
>

 <PAGE>
    <MENUS>
       <TOPBRAND/>
       <MENU name="One" toc="1"></MENU>
       <MENU name="Two" toc="2"></MENU>
    </MENUS>
    <MAIN> 
        <COLUMN name="left">
            <VERTICALMENU toc="3">
                <INNERMENU toc="4"></INNERMENU>
            </VERTICALMENU>
        </COLUMN>
        
        <COLUMN name="middle">
            <xsp:element name="xinclude:include">
                <xsp:attribute name="parse">xml</xsp:attribute>
                <xsp:attribute
name="href">path/file.xml#xpointer(//ARTICLE)</xsp:attribute>
            </xsp:element>
        </COLUMN>
    </MAIN>
 </PAGE>
</xsp:page>

where the xsl, page-xsp.xsl is abbreviated to :

<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
   xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
   xmlns:xsp="http://www.apache.org/1999/XSP/Core"
   xmlns:xinclude="http://www.w3.org/1999/XML/xinclude"
>

  <xsl:template match="xsp:page">

    <xsl:processing-instruction
name="cocoon-format">type="text/xml"</xsl:processing-instruction>
    
    <xsl:copy>
     <xsl:apply-templates select="PAGE"/>
    </xsl:copy>
   
  </xsl:template>

  <xsl:template match="PAGE">
    <xsl:processing-instruction
name="cocoon-process">type="xinclude"</xsl:processing-instruction>

    
   <PAGE xmlns:xinclude="http://www.w3.org/1999/XML/xinclude">
     <xsl:apply-templates select="*|@*|text()"/>
   </PAGE>
  </xsl:template>
  
    <xsl:template match="*|@*|text()">
   <xsl:copy>
    <xsl:apply-templates select="*|@*|text()"/>
   </xsl:copy>
  </xsl:template>
  
</xsl:stylesheet>


In this sequence, the xinclude is never executed and the xinclude tag is
simply passed through   . . .

any suggestions???

-- 
Mark (Poetaster) Washeim

'On the linen wrappings of certain mummified remains
found near the Etrurian coast are invaluable writings
that await translation.

Quem colorem habet sapientia?'

Evan S. Connell

 



Mime
View raw message