Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


Re: [xsl] Searching text within a node

From: "Lee" <lee@---------.--->
To: xsl-list@-----.------------.---
Date: 8/6/2009 9:46:00 PM
Shaaweet! Worked like a charm. Thank you.

I was close on my own with
<xsl:if test="'Smith'=Form/Names/LastName or 
test=not(Form/Names/LastName)">
which did not work.


On Thu, 06 Aug 2009 17:12:35 -0400
  Wendell Piez <wapiez@m...> wrote:
> Lee,
> 
> You can test whether a node set is empty by using the 
>not() operator, as in
> 
> test="not(Form/Names/LastName)"
> 
> which would be true if no LastName elements existed. You 
>could connect that with an 'or':
> 
> <xsl:if test="'Smith'=Form/Names/LastName or 
>not(Form/Names/LastName)">
> 
> This passes if 'Smith' is found as a value on a node in 
>the set (Form/Names/LastName), or if that set is empty 
>(no such nodes exist).
> 
> That may not be exactly what you want, however. You need 
>to specify exactly what you mean by the "non-existence of 
>the node <LastName>".
> 
> Cheers,
> Wendell
> 
> At 04:13 PM 8/6/2009, you wrote:
>>I have one more problem. I also need to test for the 
>>non-existence of the node <LastName> using an "or" on the 
>>"if" statement.
>>
>>So something like <xsl:if 
>>test="'Smith'=Form/Names/LastName or ">
>>
>>Thanks.
> 
> 
> 
> 
> 
> ======================================================================
> Wendell Piez 
>                           mailto:wapiez@m...
> 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
> ======================================================================
> 
> 
> --~------------------------------------------------------------------
> XSL-List info and archive: 
> http://www.mulberrytech.com/xsl/xsl-list
> To unsubscribe, go to: 
>http://lists.mulberrytech.com/xsl-list/
> or e-mail: 
><mailto:xsl-list-unsubscribe@l...>
> --~--
> 


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe@l...>
--~--



transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent