Subject: RE: [xsl] XSLT override an existing template From: "Michael Kay" <mike@xxxxxxxxxxxx> Date: Sat, 18 Nov 2006 00:27:20 -0000 |
You've supplied some code here, and some XML, presumably the input document (though it doesn't quite match: child element color versus attribute @colorCode). And you imply that the code doesn't do what you want it to do. So what exactly is your problem? I can't work out from this code what your program was intended to do, so I can't tell you why it doesn't do it. Michael Kay http://www.saxonica.com/ > -----Original Message----- > From: gi rob [mailto:primocazzuto@xxxxxxxxxxx] > Sent: 17 November 2006 18:26 > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > Subject: RE: [xsl] XSLT override an existing template > > 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: [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@xxxxxxxxxxxx> > >>Reply-To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > >>To: <xsl-list@xxxxxxxxxxxxxxxxxxxxxx> > >>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@xxxxxxxxxxx] > >> > Sent: 17 November 2006 15:23 > >> > To: xsl-list@xxxxxxxxxxxxxxxxxxxxxx > >> > 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 > >> > > > >_________________________________________________________________ > >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/
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
RE: [xsl] XSLT override an existing, gi rob | Thread | RE: [xsl] How can I select only uni, Robert Eaton |
RE: [xsl] Creating List with xsl:fu, Michael Kay | Date | RE: [xsl] Creating List with xsl:fu, Philip Vallone |
Month |