cocoon-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carmona Perez, David" <DPerez...@fcc.es>
Subject RE: I have a problem with transformer XInclude
Date Mon, 02 Jun 2003 07:54:50 GMT
Take into account that 
    <ident xlink:href="canciones.xml#xpointer(//cancion[@canc='1']/@canc)"/>
looks for canciones.xml in the same folder where the *.xsl is placed.

By the way, I'm also from Spain  ;-)


--------
David

-----Mensaje original-----
De: bosspring ... [mailto:bosspring@hotmail.com]
Enviado el: sábado, 31 de mayo de 2003 21:23
Para: cocoon-users@xml.apache.org
Asunto: 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

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


Mime
View raw message