Hello,
 
we have the follogwing logicsheet where we dynamically create a tag with the content of the return value of a java method. The creation of the tag is working very well so that I did not included the Java-code in this example. The output in the browser is currently a file having a tag
 
<ownnamespace:toInsert>Content</ownnamespace:toInsert>
 
We thought that an <apply-templates/> would cause Cocoon to apply the template <ownnamespace:toInsert> being part of the logicsheet but it does not work for us. Is this not possible within a logicsheet to create dynamically tags because it was working during the later transformation process. If it is possible, please let us know what we have to change. If you need further information, please let us know so that we can provide them.
 
Thanks,
Torsten

<?xml version="1.0"?>
 
<xsl:stylesheet version="1.0"
                xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
                xmlns:xsp="http://apache.org/xsp"
                xmlns:ownnamespace="http://www.ownnamespace.org/xsl"
                xmlns:xinclude="http://www.w3.org/2001/XInclude"
                xmlns:util="http://apache.org/xsp/util/2.0"
                >
 

<xsl:template match="ownnamespace:header">
    <xsp:logic>
 
  <!-- some Java code -->
  </xsp:logic> 
 
  <xsl:apply-templates/>
</xsl:template>
 

<xsl:template match="ownnamespace:link">
        <ownnamespace:toInsert>
                <xsp:expr>getURI("<xsl:value-of select="@identifier"/>")</xsp:expr>
        </ownnamespace:toInsert>
        <xsl:apply-templates/>
</xsl:template>
 
       
<xsl:template match="ownnamespace:toInsert">
        <xsl:apply-templates select="document(.)" />
</xsl:template> 
 
<xsl:template match="@*|node()" priority="-1">
        <xsl:copy>
              <xsl:apply-templates select="@*|node()"/>
        </xsl:copy>
</xsl:template>
</xsl:stylesheet>
 
 
--------------
 
The xsp-page which is used to call the logicsheet looks as follows
 
<?xml version="1.0" encoding="ISO-8859-1"?>
 
<xsp:page
          language="java"
          xmlns:xsp="http://apache.org/xsp"
          xmlns:ownnamespace="http://www.ownnamespace.org/xsl"
        xmlns:util="http://www.apache.org/1999/XSP/Util"
        xmlns:xinclude="http://www.w3.org/2001/XInclude"
>
        <ownnamespace:header/>
 
  <page>
        <ownnamespace:link identifier="IDENTIFIER"/>         
  </page>
</xsp:page>

--

                        __  __
                       _ OO\| O__
                        O\__/O / O
           /////        O O\ /
           O O              |               
-----.oOOo------oOOo.---------------------------------
Torsten Reiners           Tel:++49-531-3913214
[EMAIL PROTECTED]        Fax:++49-531-3918144
http://server3.winforms.phil.tu-bs.de/~treiners

TU Braunschweig
Abteilung Allgemeine Betriebswirtschaftslehre,
 Wirtschaftsinformatik und Informationsmanagement
Abt-Jerusalem-Str.7
38106 Braunschweig, Germany

Other EMails:  [EMAIL PROTECTED]
                    [EMAIL PROTECTED]
------------------------------------------------------

Reply via email to