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: Conditional attributes based on presence of a child element


Hi Wolfgang,

Your input and stylesheet gives exactly what you want when I try with
Saxon 6.2 and MSXML3. Is there something about namespaces that you've
left out somewhere?

BTW, you could use:

   <xsl:attribute name="type">
      <xsl:choose>
         <xsl:when test="processdata">y</xsl:when>
         <xsl:otherwise>x</xsl:otherwise>
      </xsl:choose>
   </xsl:attribute>

instead, as you're always adding the attribute, just changing its
value.

Cheers,

Jeni

---
Jeni Tennison
http://www.jenitennison.com/



 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]