cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cparp...@t-online.de (Christian Parpart)
Subject XSL tags matching inside XSP Java functions
Date Fri, 12 Jan 2001 15:11:47 GMT
Hi,

my problem is, that I want to transform the xml document 
from different places in from its taglib. 

Example: The tag taglib:my-tag is matched by the its 
         applying template, this template calls a Java 
         function, wich does anything and then,
         XSLT should match now inside taglib:my-tag.

Is there anyway to give the java function the position
where XSLT have to match?

My test.xml document
[-------------------------------
....
  <document>
    <b>
      <taglib:my-tag>
        <c>
          Hello
        </c>
      </taglib:my-tag>
      ...
      <taglib:my-tag>
        <d>World!</d>
      </taglib:my-tag>
    </b>
  </document>
...
-------------------------------]

My test.xsl taglib
[-------------------------------
...
<xsl:template match="xsp:page">
  <xsp:page>
    <xsp:logic>
      void MyFunction(
      ) throws Exception {
        LetsDoAnything;
        <any-tag>
          <xsl:apply-templates/>
          <!-- HERE XSLT SHOULD PARSE, WHERE HE'S STOPPED -->
          <!-- in my case, it's in taglib:my-tag -->
        </any-tag>
      }
    </xsp:logic>

    <xsl:apply-templates select="@*"/>
    <xsl:apply-templates/>
  </xsp:page>
</xsl:template>

<xsl:template match="taglib:my-tag">
  <xsp:logic>
    MyFunction(
      <xsp:put-std-param/>,
      "Any Parameter"
    );
  </xsp:logic>
</xsl:template>
....
-------------------------------]

Regards,
Christian Parpart
SurakWare
cparpart@surakware.com
http://www.surakware.com

Mime
View raw message