You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by "bosspring ..." <bo...@hotmail.com> on 2003/05/31 21:23:10 UTC

I have a problem with transformer XInclude

I am a Spanish student that I am developping a Cocoon project.  (I'm sorry, 
but my English is very poor)

I have various XML files relationated and for this example I use 
artistas.xml (contains information of artists) and canciones.xml (contains 
information of songs). I want to select one artist of the file, and I use a 
XSL stylesheet for select this artist:

<xsl:param name="artist"/>

<xsl:template match="artistas">
    <xsl:if test="$artist">
          <xsl:apply-templates select="//artista [@idn = $artist]"/>
    </xsl:if>
</xsl:template>

<xsl:template match="artista">
   <!-- Here select the elements that I need for the presentation -->
</xsl:template>

In this moment I have the information, but something is relationed with 
canciones.xml wiht a XPointer:

<elmcancion>
    <ident xlink:href="canciones.xml#xpointer(//cancion[@canc='1']/@canc)"/>
    <titulo xlink:include 
href="canciones.xml#xpointer(//cancion[@canc='1']/titulo)"/>
</elmcancion>

Now, I want to use a transformer (Xinclude) for include the information.

Finally, I use other stylesheet XSL for present the information. The 
pipeline is:

<map:resource name="artCompCanc">
   <map:generate src="XML/artistas.xml"/>
   <map:transform src="XSL/artista/presentArtCompCanc1.xsl">
      <map:parameter name="use-request-parameters" value="true"/>
      <map:parameter name="use-browser-capabilities-db" value="true"/>
   <map:transform type="xinclude"/>
   <map:transform src="XSL/artista/presentArtCompCanc2.xsl"/>
   <map:serialize/>
</map:resource>


<map:match pattern="FartCompCanc">
   <map:call-resource="artCompCanc"/>
</map:match>


In conclusion: the first stylesheet does ok its function, but the Xinclude 
transformation no include the XPointer content, why???

Thank you for your atention: M.Angel

_________________________________________________________________
MSN Compras: Veinte tiendas personales abiertas todo el día.  
http://www.msn.es/compras/


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-users-unsubscribe@xml.apache.org
For additional commands, e-mail: cocoon-users-help@xml.apache.org