|
Subject: RE: [xsl] xsk doubt [ ] vs ( ) From: Wendell Piez <wapiez@xxxxxxxxxxxxxxxx> Date: Thu, 25 Apr 2002 14:29:20 -0400 |
<node>
<not>
<mytag>
<mytext>I'm allowed to be here!</mytext>
<myothertext> but I'm here too!</myothertext>
</mytag>
</not>
</node><xsl:template match="node">
<xsl:value-of select="not"/>
<xsl:choose>
<xsl:when test="not[. = mytag/mytext]">
<xsl:text> I'm only where I'm supposed to be.</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:text> (I'm all over the place.)</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:template><xsl:template match="node"> <xsl:value-of select="boolean(recommended)"/> </xsl:template>
Perversely, Wendell
> i have a basic doubt regarding conditions.. > what is the difference between saying > <xsl:if test = "not[. = mytag/mytext]"> > > and saying > > <xsl:if test = "not(. = mytag/mytext)"> > > > when do we use the [ ] and when do we use ( )?? > regards
[] represents a filter or predicate that you apply to a node-set () represents the arguments to a function call
"not" is a function, not a node-set, so you need ().
====================================================================== Wendell Piez mailto:wapiez@xxxxxxxxxxxxxxxx Mulberry Technologies, Inc. http://www.mulberrytech.com 17 West Jefferson Street Direct Phone: 301/315-9635 Suite 207 Phone: 301/315-9631 Rockville, MD 20850 Fax: 301/315-8285 ---------------------------------------------------------------------- Mulberry Technologies: A Consultancy Specializing in SGML and XML ======================================================================
| Current Thread |
|---|
|
| <- Previous | Index | Next -> |
|---|---|---|
| RE: [xsl] xsk doubt [ ] vs ( ), Michael Kay | Thread | [xsl] doubt vs question (was Re: xs, Mike Brown |
| [xsl] a silly thought about populat, 林 子芯 | Date | RE: [xsl] a silly thought about pop, Bryan Rasmussen |
| Month |