This is the mail archive of the xsl-list@mulberrytech.com mailing list .


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Rendering: filling tag attributes via XSLT



----- Original Message ----- 
From: Dmitry Kachaev <greenrain@mail.ru>

<a href='#<xsl:value-of select="@name"/>'>

> <a>
> <xsl:attribute>
> <xsl:value-of select="@name"/>
> </xsl:attribute>
> ...smth...
> </a>

Should be 

<a>
<xsl:attribute name="href">#<xsl:value-of select="@name"/></xsl:attribute>
... smth ...
</a>

I was always wondering why

<xsl:variable 
  name = qname 
  select = expression>
  <!-- Content: template -->
</xsl:variable> 

But

<xsl:attribute 
  name = { qname }
  namespace = { uri-reference }>
  <!-- Content: template -->
</xsl:attribute> 

I mean why not 

<xsl:attribute 
  name = { qname }
  select = expression
  namespace = { uri-reference }>
  <!-- Content: template -->
</xsl:attribute> 

So that

<a>
<xsl:attribute name="href" select="concat('#', @name)"/>
 ...smth...
</a>


Rgds.Paul.



 XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]