Re: [xsl] The use of a variable in use-attribute-sets attribute

Subject: Re: [xsl] 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)
>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


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

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

<?xml version="1.0"?>

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

Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices

 XSL-List info and archive:

Current Thread