You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Matthew Smith <ms...@windebt.com> on 2000/10/20 20:39:20 UTC

stylesheet as a "manager"

	I want to set only one PI on the xml documents on my site.  I want that one
stylesheet to add some information to the document and then push it through
a logicsheet and stylesheet.  How can I accomplish this?
	I know I've read explanations before, but none of them seem to flesh out
the details I need for the PI adding.  Below is how I envision what I want,
but the code isn't working for me.

Thanks,
Matt

**************** style.xsl ******************************************
<?xml version="1.0"?>
<xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">

   <xsl:template match="page">
      <?cocoon-process type="xsp"?>
      <?xml-logicsheet href="logic.xsl"?>

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

      <page
         xmlns:mytags="http://mydomain.com/mytags">
         <page>
             <xsl:copy-of select="document('common.xml')" />
             <xsl:copy-of select="@*|node()|text()" />
         </page>
      </page>
   </xsl:template>

</xsl:stylesheet>

******************** content.xml **********************************
<?xml version="1.0"?>
<?cocoon-process type="xslt"?>
<?xml-stylesheet href="style/layout.xsl" type="text/xsl"?>

<page
   xmlns:mytags="http://mydomain.com/mytags">
   All the content with nodes and stuff here.
</page>