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: Why aren't rules matched with "*"?


Someone will correct me if I am wrong, but, you did not specify an axis,
therefore you are really saying child::*.  You are looking for all the
element nodes that are children of your current contect node. Is it possible
that relitive to your context node, these elemenets are not childern?
 Maybe try /descendant::*  which should get you all the elements that are
descentants to the root.


-----Original Message-----
From: owner-xsl-list@mulberrytech.com
[mailto:owner-xsl-list@mulberrytech.com]On Behalf Of Charles Cantrell
Sent: Monday, July 17, 2000 10:20 AM
To: XSL List (E-mail)
Subject: Why aren't rules matched with "*"?


I have the following rule in my xsl stylesheet.

<xsl:template match="Para">
  <p">
    <xsl:apply-templates
select="Menu|Table|WindowID|Illustration|Prompt|ErrMsg|text()"/>
  </p>
</xsl:template>

and it successfully matches and applies rules for each of the templates
specified in the "select" expression. For example, the following rule for
"Menu" is matched:

<xsl:template match="Menu">
  <xsl:if test="contains(.,'1,1,4,1')">
    THIS IS <i>REALLY</i> MENU 1,4,1,1
  </xsl:if>
  <strong style="font-family: arial; color:green"><xsl:value-of
select="text()"/></strong>
</xsl:template>

However, if I change the rule to:

<xsl:template match="Para">
  <p>
    <xsl:apply-templates select="*"/>
  </p>
</xsl:template>

then no templates are matched.

Why aren't the Menu, Table and so on rules matched, as well as others? I
thought that the "*" was a universal selector, and so should get everything.
What is it that I don't understand here. Thanks.


Charles Cantrell
Information Engineer
Ontario Systems Corporation
1150 West Kilgore Avenue
Muncie, IN 47305

(765) 751-7000



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


 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]