Subject: Re: [xsl] question on filtering a one-to-many relationship From: Michael Kay <mike@xxxxxxxxxxxx> Date: Tue, 06 Mar 2012 09:47:48 +0000 |
Hi all,persons/person[some $n in children/child/name satisifies matches(upper-case($n), upper-case($searchString))]
Just to make my use case clear I quickly came up with a simple example showing my use case.
I need to write a function that enables me to return all<person>'s which have at least 1 child that MATCHES a specific search string.
persons/person[matches(upper-case(children/child/name), upper-case($searchString))]
Above expression does not work as the matches can only handle a single string as input and not a sequence of names. So I was wondering what would be an elegant way to solve this puzzler?
Michael Kay Saxonica
Kind regards, Robby Pelssers
<persons> <person> <name>Robby</name> <children> <child> <name>Lindsey</name> <child> <child> <name>Valerie<name> </child> </children> <person> <person> <name>Audrey</name> <children> <child> <name>Linn</name> <child> <child> <name>Tamara<name> </child> </children> </person> </persons>
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] question on filtering a one-t, Robby Pelssers | Thread | RE: [xsl] question on filtering a o, Robby Pelssers |
Re: [xsl] double spaces how do i ke, Michael Schäfer | Date | RE: [xsl] question on filtering a o, Robby Pelssers |
Month |