Hi everyone,
maybe anyone of you can help me out with this….

I’m working with Cocoon 2.1.2 and Tomcat 4.1.27 and I’m trying to use the
CInclude Transformer with the cocoon:/ protocol.

(Pipelines, XSLT Stylesheet and XML files are shown below)

 I’m starting with a request for the pipeline cIncludeTest, which works
fine. Thereby the pipeline  cInclude/*/*/*/*/* is called and 5 parameters get
passed which is working fine as well.
So I’m able to get the right file from the database (in this case eXist
0.9.2).
The 5 parameters also get passed to the following XSLT Stylesheet (which is
shown below too). 
After transforming the file from the database with the stylesheet
(useCInclude.xsl) the tempfile looks like the one I pasted below -->
tempCIncludeTest.xml
Actually now the CInclude Transformer should come to play an replace  the
cinclude tags in the temp file with the results from the getNameForAttribute
Pipeline.
But somehow I get the error “No pipeline matched request:
getNameForAttribute”..

(To me it seems as if the cocoon:/ protocol is not resolved at all….but I’m
not sure. If so – what else can I do to get it work this way?)

So, has anybody a clue, what is wrong with my usage of the CInclude
Transformer, the pipelines or anything else ?

Any hint is appreciated!
Greets,
Katharina


<map:pipeline internal-only="true">
        <map:match pattern="getNameForAttribute/**">
<map:generate
src="xmldb:exist://localhost:8080/exist/xmlrpc/db/#collection('plaene/{request-param:Path}')//nameObj"/>
        <map:serialize type="xml"/>
        </map:match>
</map:pipeline>

<map:pipeline>
        <map:match pattern="cIncludeTest">
                <map:aggregate element="testCInclude">
                                <map:part 
                                    
src="cocoon:/cInclude/PROJECT_9X7/MJ05/9x7_Basis/DesignA/aav1"/>
                </map:aggregate>
                <map:serialize type="xml"/>
        </map:match>
        
<map:match pattern="cInclude/*/*/*/*/*">
             <map:generate
src="xmldb:exist://localhost:8080/exist/xmlrpc/db/#collection('plaene/{1}/{2}/{3}/{4}/{5}')//cIncludeTest"/>
            <map:transform
src="resources/gesamtansicht_style/cIncludeTest/useCInclude.xsl">
                <map:parameter name="project" value="{1}"/>
                <map:parameter name="year" value="{2}"/>
                <map:parameter name="model" value="{3}"/>
                <map:parameter name="design" value="{4}"/>
                <map:parameter name="sheet" value="{5}"/>
        </map:transform>
        <map:transform type="cinclude"/>
        <map:serialize type="xml"/>
</map:match>
</map:pipeline>




useCInclude.xsl

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"; >

<xsl:param name="project"/>
<xsl:param name="year"/>
<xsl:param name="model"/>
<xsl:param name="design"/>
<xsl:param name="sheet"/>

<xsl:template match="cIncludeTest">
        <xsl:element name="root"><xsl:apply-templates/></xsl:element>
</xsl:template>

<xsl:template match="obj">
        <xsl:element name="attr"
xmlns:cinclude="http://apache.org/cocoon/include/1.0";>
                <xsl:attribute name="id"><xsl:value-of select="@id"/></xsl:attribute>
                <xsl:variable name="nameNo" select="@name"/>            
                <xsl:element name="cinclude:includexml">
                        <xsl:element name="cinclude:src">
                                cocoon:/getNameForAttribute?Path=
                                        <xsl:value-of select="$project"/>/
                                        <xsl:value-of select="$year"/>/
                                        <xsl:value-of select="$model"/>/
                                        <xsl:value-of select="$design"/>/
                                        <xsl:value-of select="$sheet"/>
                        </xsl:element>
                </xsl:element>
        </xsl:element>  
</xsl:template>

</xsl:stylesheet>



cIncludeTest.xml

<?xml version="1.0" encoding="UTF-8"?>
<cIncludeTest>
        <attrObj>
            <obj id="A$0" name="5" val="47" own="1 0" text="114"/>
            <obj id="A$1" name="41" val="13" own="1 0" text="150"/>
            <obj id="A$2" name="38" val="1" own="1 0" text="136"/>
            <obj id="A$3" name="40" val="35" own="1 0" text="125"/>
            <obj id="A$4" name="30" val="96" own="1 0" text="94"/>
        </attrObj>      
</cIncludeTest>



tempCIncludeTest.xml

  <?xml version="1.0" encoding="UTF-8" ?> 
<testCInclude>
<root xmlns:cinclude="http://apache.org/cocoon/include/1.0";>
<attr id="A$0">
<cinclude:includexml>
        <cinclude:src>
                    
cocoon:/getNameForAttribute?Path=PROJECT_9X7/MJ05/9x7_Basis/ DesignA/aav1
                </cinclude:src> 
</cinclude:includexml>
</attr>
<attr id="A$1">
<cinclude:includexml>
<cinclude:src>
cocoon:/getNameForAttribute?Path=PROJECT_9X7/MJ05/9x7_Basis/DesignA/aav1
</cinclude:src> 
</cinclude:includexml>
</attr>
<attr id="A$2">
<cinclude:includexml>
<cinclude:src>
cocoon:/getNameForAttribute?Path=PROJECT_9X7/MJ05/9x7_Basis/ DesignA/aav1
</cinclude:src> 
</cinclude:includexml>
</attr>
<attr id="A$3">
<cinclude:includexml>
<cinclude:src>
cocoon:/getNameForAttribute?Path=PROJECT_9X7/MJ05/9x7_Basis/DesignA/aav1
</cinclude:src>
</cinclude:includexml>
</attr>
<attr id="A$4">
<cinclude:includexml>
<cinclude:src>
cocoon:/getNameForAttribute?Path=PROJECT_9X7/MJ05/9x7_Basis/DesignA/aav1
</cinclude:src>
</cinclude:includexml>
</attr>
</root>
</testCInclude>

-- 
HAKUNA MATATA !!!

+++ GMX - die erste Adresse für Mail, Message, More +++
Bis 31.1.: TopMail + Digicam für nur 29 EUR http://www.gmx.net/topmail


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to