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: variable match attribute


> <xsl:template match="$pattern">
> 	<!-- do something -->
> </xsl:template>
>
> I know, the match attribute is a pattern, where I can't use variables
> but how can I solve the problem:
> 'read element names from a document B and use them as template pattern
> in document a'

If the pattern is always a simple element name you can do

<xsl:template match="*">
  <xsl:choose>
    <xsl:when test="name()=$pattern">

etc.

Otherwise, it might be best to think in terms of generating the stylesheet
dynamically.

Mike Kay
Software AG


 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]