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

Re: Wierd IE5B2

Subject: Re: Wierd IE5B2
From: Chris Maden <crism@xxxxxxxxxxx>
Date: Tue, 23 Feb 1999 11:07:18 -0500 (EST)
wierd massachusetts
[Wendy Cameron]
> Regard IE5B2
> 
> Well after many hours playing with Microsoft Examples I finally got
> <xsl:choose>
>    <xsl:when "test='something or other'">

YM <xsl:when test='something or other'>

And you need an end-tag for <xsl:when>.

>    </xsl:choose>

You could also use <xsl:if test="something else"> if you only wanted
to check one thing.

> And someone spoke of how match has less capabilites than select
> 
> Can someone please explain how each of the following works? (Or is
> meant to work)
> 
> match
> select
> test

test and select both take select patterns.  Select patterns have a
context, usually the node matched by the match pattern in the current
template:

<xsl:template match="foo">
  <xsl:if test="bar">
    <xsl:text>This is used if foo has a child called bar.</xsl:text>
  </xsl:if>
</xsl:template>

In this example, the context for <xsl:if>'s select pattern is the foo
element matched by the template's match pattern.  It would not be true
if there existed a bar anywhere; it has to be relative to the current
node.

Match patterns succeed if they can be true from any context.  Once
upon a time, there were restrictions on match patterns; they were a
subset of select patterns.  But in the current draft, that restriction
was removed:

   [2] MatchExpr ::= SelectExpr

The lack of restriction has apparently made implementation more
difficult, and I have a feeling it may come back in some form, but I
can't be sure.

-Chris
 not speaking in any way for the XSL WG or the W3C
-- 
<!NOTATION SGML.Geek PUBLIC "-//Anonymous//NOTATION SGML Geek//EN">
<!ENTITY crism PUBLIC "-//O'Reilly//NONSGML Christopher R. Maden//EN"
"<URL>http://www.oreilly.com/people/staff/crism/ <TEL>+1.617.499.7487
<USMAIL>90 Sherman Street, Cambridge, MA 02140 USA" NDATA SGML.Geek>


 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.