Subject: Re: Help with modes in XSL From: Miloslav Nic <nicmila@xxxxxxxx> Date: Tue, 14 Sep 1999 06:50:57 +0200 |
When I started with XSL, I came up with something like this: e.g. http://zvon.vscht.cz/ZvonHTML/Crossroads/XML/xml_en.html Brian Parkinson wrote: > > Hello: > > I have a problem, and have seen the thread on mode's, but I'd like to get a > nice clean (and comprehensible to me :-) solution to it. I am writing an XSL > file to convert to HTML, and I'd like to be able to output a set of HREF > links at the top of the file to a group of elements, and then process each > element one by one, transforming each one into some HTML representation and > for each one, to throw in a <A name="..."> tag so that the links at the top > of the file link down to each element. So, it seems that I want two > templates - one to output the top HREF links, and then another to process > each element. How should I do this? > > It seems like I want to do: > > <...> > <xsl:template match="/"> > <HTML><HEAD> > <META http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/> > </HEAD> > <BODY> > > <!-- here's where I want to output the HREF links --> > <xsl:apply-templates/> > > <!-- here's where I want to output the element info --> > <xsl:apply-templates/> > <xsl:> > <BODY> > <P/> > </HTML> > <...> > > I want to have two templates that match on the same element and have each > one called. From reading the docs, this looks like a use for 'mode' but I > don't quite grok what is going on, and I am sure that there is some swell > way to do this. > > Help is greatly appreciated. > > I'm a little new to all of this. > > Many thanks, > > parki... > > XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list -- *************************************************************** Dr. Miloslav Nic e-mail: nicmila@xxxxxxxx Department of Organic Chemistry TEL: +420 2 2435 5012 ICT Prague (VSCHT Praha) +420 2 2435 4118 FAX: +420 2 2435 4288 **************************************************************** XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Help with modes in XSL, Brian Parkinson | Thread | Merging two documents, Terris |
RE: Merging two documents, G. Ken Holman | Date | RE: Crazy idea, DPawson |
Month |