|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Find First Descendants That Match Predicate?
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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








