xsl-list
[Top] [All Lists]

RE: [xsl] XSLT override an existing template

2006-11-17 11:26:18
I have done a working simple sample that i send ...So the problem is in the existing xsl to be extend ....that i cannot modify....


--------------imported.xsl----------------------------------------------------
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    version="1.0">
 <xsl:output method="xml" indent="yes"/>

 <xsl:template match="/">
 <xsl:apply-templates select="shirts/shirt" mode="a"/>
 </xsl:template>

 <xsl:template match="shirts/shirt" mode="a">
  <maglia>aaaaaa</maglia>
   </xsl:template>



<xsl:template match="shirts/shirt" mode="b">
  <maglia>bbbbbb</maglia>
   </xsl:template>


</xsl:stylesheet>

-----------------------------------------------import_ex.xsl---------------------------------------------------------
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
    version="1.0">
<xsl:import href="imported.xsl"/>
 <xsl:output method="xml" indent="yes"/>




 <xsl:template match="shirts/shirt" mode="a" >
 <xsl:copy-of select="."/>
 </xsl:template>

 <xsl:template name = "find_col">
 <xsl:param name="colore" />
 <shirt>
 <xsl:for-each select="$colore/color[(_at_)cid='c7']">

   <xsl:copy-of select="."/>


 </xsl:for-each>

</shirt>
   </xsl:template>




</xsl:stylesheet>
--------------------------------------------------file.xml--------------------------------------------------------------
<shirts>
 <shirt colorCode="c4"><a>oxford button-down</a></shirt>
 <shirt colorCode="c1">poly blend, straight collar</shirt>
 <shirt colorCode="c6">monogrammed, tab collar</shirt>
</shirts>
----------------------------------------------------------------------------------------------------------------------

From: "gi rob" <primocazzuto(_at_)hotmail(_dot_)com>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
Subject: RE: [xsl] XSLT override an existing template
Date: Fri, 17 Nov 2006 15:57:15 +0000

Do you have a working example? please
Thanx
Giancarlo
From: "Michael Kay" <mike(_at_)saxonica(_dot_)com>
Reply-To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
To: <xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com>
Subject: RE: [xsl] XSLT override an existing template
Date: Fri, 17 Nov 2006 15:43:43 -0000

Yes, it's possible. If it's not working, then you've got something wrong.

Michael Kay
http://www.saxonica.com/

> -----Original Message-----
> From: gi rob [mailto:primocazzuto(_at_)hotmail(_dot_)com]
> Sent: 17 November 2006 15:23
> To: xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
> Subject: [xsl] XSLT override an existing template
>
> Hi , i m new. I wanna know if is possible to override an
> existing template with the "mode"  attribute specified, via
> xsl:import. Because i have done a simple example working only
> without "mode".
> Thanx to all
> Giancarlo
>
> _________________________________________________________________
> Idee per i tuoi viaggi...
> http://search.live.com/results.aspx?q=viaggi&mkt=it-it&FORM=LV
SP&go.x=18&go.y=15
>
>
> --~------------------------------------------------------------------
> XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
> or e-mail: 
<mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
> --~--
>


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


_________________________________________________________________
Usa il tuo PC come un telefono per chiamare cellulari e telefoni fissi! http://imagine-msn.com/messenger/launch80/?locale=it-it&TAB=2


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


_________________________________________________________________
I campionati di calcio sono iniziati.Sei pronto alla sfida? http://www.msn.it/messengerleague/home/


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--