|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Help with modes in XSL
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
|
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
|

Cart








