[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Why aren't rules matched with "*"?

Subject: RE: Why aren't rules matched with "*"?
From: Charles Cantrell <chc@xxxxxxxxxxx>
Date: Mon, 17 Jul 2000 13:12:41 -0500
ontario systems bug
You are probably right about the //. However, what I am trying to match are
actually children of the "Para" element. In other words, Menu, Prompt, etc.
are elements inside of Para. So, I thought they should be matched by the
"*". 

Someone else suggested the exhibited behavior I am getting might be a bug in
MSXML3, which I am using. 


-----Original Message-----
From: Steve Hankin [mailto:steve.hankin@xxxxxxxx]
Sent: Monday, July 17, 2000 11:04 AM
To: xsl-list@xxxxxxxxxxxxxxxx
Subject: Re: Why aren't rules matched with "*"?


Apologies if I get this wrong since I am _v_ new to this, but perhaps you
need
this...

    <xsl:apply-templates select="//*"/>

...or even...

    <xsl:apply-templates select="//"/>

I think the * will give you everything on your current level, whereas the //
will travel down the path to pick everything up.

Regards,
Steve


Charles Cantrell wrote:

> 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


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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.