[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Different attributes - same template

Subject: Different attributes - same template
From: "Vytautas Nuobara" <vytnuo@xxxxxxxxxxxxx>
Date: Thu, 29 Jun 2000 16:02:53 +0100
different attributes
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

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.