Subject: Different attributes - same template From: "Vytautas Nuobara" <vytnuo@xxxxxxxxxxxxx> Date: Thu, 29 Jun 2000 16:02:53 +0100 |
I have following xml file containing frame sets, which are nested in other frame sets: <page> <title>Main</title> <frameset> <frame> <framename>menu</framename> <frameurl>/LoginMenu.html</frameurl> </frame> <frameset> <frame> <framename>header</framename> <frameurl>/1.html</frameurl> </frame> <frame> <framename>contents</framename> <frameurl>/2.xml</frameurl> </frame> </frameset> </frameset> </page> The problem is that when i'm displaying these frames i need to set different scrolling value ("no"/"auto") etc. To be more exact i want to get HTML code like this: <html> <head> <title>Main</title> </head> <frameset framespacing="0" border="false" frameborder="0" cols="160,*"> <frame name="menu" noresize src="/LoginMenu.html" scrolling="auto" marginheight="0" marginwidth="0"> <frameset rows="55,*,5%"> <frame name="header" noresize src="/1.html" scrolling="no" marginwidth="0" marginheight="0"> <frame name="contents" noresize src="/2.xml" scrolling="auto" marginwidth="20" marginheight="0"> </frameset> </frameset> </html> The question is: how can i apply the same template for these frames and add specific attribute values? I tried to write template which adds similar attribes, something like this: <xsl:template name="frame"> <xsl:attribute name="noresize">1</xsl:attribute> <xsl:attribute name="name"><xsl:value-of select="frameset/frame/framename"/></xsl:attribute> <xsl:attribute name="src"><xsl:value-of select="frameset/frame/frameurl"/></xsl:attribute> .... </xsl:template> but it seems to be the wrong way.... Can anybody give me the right one? Thanx in advance Vytautas Nuobara Programmer No Magic Inc. Address: P.O. box 2166, LT- 3000, Kaunas Phone: +370 7 351326, Fax: +370 7 350440 e-mail: vytnuo@xxxxxxxxxxxxx WWW: http://www.nomagic.com XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: Scripts with Saxon, Mike Brown | Thread | Re: Different attributes - same tem, Warren Hedley |
Scripts with Saxon, Hakan Pettersson | Date | Re: a new(?) grouping problem, Nikolai Grigoriev |
Month |