Ureader.com  
Microsoft software help and Community
   home   |   control panel login   |   archive   |  
 
XML
data.xmlanalysis
mappoint.webservice
msf
msxml-webrelease
netmyservices.sdk
passport.sdk
soap
soapsdk
uddi.general
uddi.programming
uddi.specification
xml
xmlsqlwebrelease
xsl
  
 
date: Mon, 14 Apr 2008 10:52:20 -0700 (PDT),    group: microsoft.public.xsl        back       


conditional matching   
1) I need to match an element A provided it is one of the first three
children of element Z. Alternatively, I could just match A and then
conditionally process it within the template rule.

2) I need to match element B provided all its preceding siblings are
any or all of elements W, X, or Y. Again, I could use xsl:if
statements to apply the conditional logic.

I can't seem to wrap my head around how to do these things. It should
be so obvious and yet.... Can anybody help? TIA....
date: Mon, 14 Apr 2008 10:52:20 -0700 (PDT)   author:   unknown

Re: conditional matching   
* larrysulky@gmail.com wrote in microsoft.public.xsl:
>1) I need to match an element A provided it is one of the first three
>children of element Z. Alternatively, I could just match A and then
>conditionally process it within the template rule.

That's A[parent::Z and count(preceding-sibling::*) <= 3].

>2) I need to match element B provided all its preceding siblings are
>any or all of elements W, X, or Y. Again, I could use xsl:if
>statements to apply the conditional logic.

B[not(preceding-sibling::*[ ... check names here ... ])].
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/
date: Mon, 14 Apr 2008 20:08:30 +0200   author:   Bjoern Hoehrmann

Re: conditional matching   
Thank you, Björn!
date: Thu, 17 Apr 2008 11:56:56 -0700 (PDT)   author:   Larry

Google
 
Web ureader.com


    COPYRIGHT 2007, YARDI TECHNOLOGY LIMITED, ALL RIGHT RESERVE  |   contact us