[XSL-LIST Mailing List Archive Home]
[By Thread]
[By Date]
[Recent Entries]
[Reply To This Message]
RE: XSLT override an existing template
Subject: RE: XSLT override an existing template
From: "gi rob" <primocazzuto@xxxxxxxxxxx>
Date: Fri, 17 Nov 2006 18:25:54 +0000
|
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[@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@xxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Subject: RE: 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@xxxxxxxxxxxx>
Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx>
Subject: RE: 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@xxxxxxxxxxx]
> Sent: 17 November 2006 15:23
> To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx
> Subject: 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
_________________________________________________________________
Usa il tuo PC come un telefono per chiamare cellulari e telefoni fissi!
http://imagine-msn.com/messenger/launch80/?locale=it-it&TAB=2
_________________________________________________________________
I campionati di calcio sono iniziati.Sei pronto alla sfida?
http://www.msn.it/messengerleague/home/
|
PURCHASE STYLUS STUDIO ONLINE TODAY!
Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!
Download The World's Best XML IDE!
Accelerate XML development with our award-winning XML IDE - Download a free trial today!
Subscribe in XML format
RSS 2.0 |
|
Atom 0.3 |
|
|