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

Re: The use of a variable in use-attribute-sets attrib

Subject: Re: The use of a variable in use-attribute-sets attribute
From: Dan Diebolt <dandiebolt@xxxxxxxxx>
Date: Mon, 14 May 2001 18:46:04 -0700 (PDT)
use attribute variable text xsl
>lack of understanding of what a QName is.

a QName is qualified name ie a simple name or a simple name 
preceded by a prefix. This excludes using a variable as the 
value of use-attribute-sets on xsl:element.

I made an attempt at your problem. Someone else can clarify how
to get the namespace "fo" on the output elements. There is discussion
in MK's book concerning what happens when the name attribute of
an xsl:element has a prefix - something to the effect that the
namespace must be 'in-scope'. I need clarification what this means
myself.

Regards,

Dan
------------
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="14May2001.xsl"?>

<root>
 <td class="classname1">classname1</td>
 <td class="classname2">classname2</td>
 <td class="classname3">classname3</td>
</root>

<?xml version="1.0"?>

<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
 <xsl:output indent="yes"/>
 <xsl:template match="root">
  <something>
   <xsl:apply-templates select="td"/>
  </something>
 </xsl:template>
 <xsl:template match="td">
  <xsl:element name="table-cell">
   <xsl:apply-templates select="@class"/>
   <xsl:element name="block">
    <xsl:copy-of select="text()"/>
   </xsl:element>
  </xsl:element>
 </xsl:template>
 <xsl:template match="@class">
  <xsl:choose>
   <xsl:when test=".='classname1'">
    <xsl:attribute name="font-size">12pt</xsl:attribute>
    <xsl:attribute name="font-weight">bold</xsl:attribute>
   </xsl:when>
   <xsl:when test=".='classname2'">
    <xsl:attribute name="font-size">14pt</xsl:attribute>
    <xsl:attribute name="font-weight">bold</xsl:attribute>
   </xsl:when>
   <xsl:when test=".='classname3'">
    <xsl:attribute name="font-size">16pt</xsl:attribute>
    <xsl:attribute name="font-weight">normal</xsl:attribute>
   </xsl:when>
  </xsl:choose>
 </xsl:template>  
</xsl:stylesheet>

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.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.