Subject: Re: [xsl] Find First Descendants That Match Predicate? From: "Wendell Piez wapiez@xxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> Date: Fri, 28 Dec 2018 20:00:30 -0000 |
Peter, in Eliot's example yes, but in the case as stated (arbitrary wrappers), no. (I think we need *[title]//*[title] which is after all a superset of *[title]/*[title]. It's the same as David's solution, refactored based on A[X but not Y] being the same as A[X] but not A[Y]. But once we have done that, it also simplifies, since in XPath, looking down twice is easier than looking down and then up again. I don't think it's backwards as long as we keep in mind how "the first only" means "all, except those that are not first". Best wishes and Happy 2019! Wendell On Thu, Dec 27, 2018 at 12:17 PM Peter Flynn peter@xxxxxxxxxxx <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > On 27/12/2018 15:15, Eliot Kimber ekimber@xxxxxxxxxxxx wrote: > > That seems too easy ( > [...] > > o;?On 12/25/18, 12:42 PM, "Wendell Piez wapiez@xxxxxxxxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx> wrote: > > How about > > > > .//*[title] except .//*[title]//*[title] > > Shouldn't that be .//*[title] except .//*[title]/*[title] > to exclude those with immediate children with a title, rather than > excluding those which have any-depth descendants with a title? > > P > -- Wendell Piez | wendell -dot- piez -at- nist -dot- gov | http://www.wendellpiez.com pellucidliterature.org | github.com/wendellpiez | gitlab.coko.foundation/wendell - pausepress.org
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
Re: [xsl] Find First Descendants Th, Eliot Kimber ekimber | Thread | |
Re: [xsl] Find First Descendants Th, Eliot Kimber ekimber | Date | |
Month |