Hi Jon,
/bbc:*/bbc:media[not(.//bbc:images)] should exclude all descendants called bbc:images of bbc:media; if you only wanted to exclude direct children you'd use /bbc:*/bbc:media[not(./bbc:images)] cheers, Jakob. On Fri, Oct 26, 2012 at 5:03 PM, Jonathan Cook <[email protected]> wrote: > Thanks, > > And if I wanted to exclude an element under media I had a play with.. > /bbc:*/bbc:media[not(child::bbc:images)] > > And > /bbc:*/bbc:media[not(/bbc:images)] > > And > /bbc:*/bbc:media[not(*/bbc:images)] > > And > /bbc:*/bbc:media[not(bbc:images)] > > Not quite right though? > > Thanks > Jon > > On 26/10/2012 14:13, "Michael Blakeley" <[email protected]> wrote: > >> The XPath looks simple enough: try removing the final '/*' step. That step >> causes the XPath to descend from bbc:media and match its element children. >> >> /bbc:*/bbc:media/* >> vs >> /bbc:*/bbc:media >> >> -- Mike >> >> On 26 Oct 2012, at 05:29 , Jonathan Cook <[email protected]> wrote: >> >>> Hi, >>> >>> Might be more an xpath questions but if I have the following xpointer.. >>> >>> <xi:include >>> href="http://www.bbc.co.uk/asset/39166d27-7f67-c643-9248-499ca2b3b14d" >>> xpointer="xmlns(bbc=http://www.bbc.co.uk/asset) >>> xpointer(/bbc:*/bbc:media/*)"> >>> <xi:fallback> >>> <warn>Unable to resolve XInclude for >>> href="http://www.bbc.co.uk/asset/39166d27-7f67-c643-9248-499ca2b3b14d" >>> xpointer="xmlns(bbc=http://www.bbc.co.uk/asset) >>> xpointer(/bbc:*/bbc:media/*)" >>> [Asset ID=19781921]</warn> >>> </xi:fallback> >>> </xi:include> >>> >>> In the Xpointer declaration currently everything under /bbc:media is >>> included >>> when the xinclude is resolved, Is there a way to include the media node as >>> well? >>> >>> Thanks >>> Jon >>> >>> >>> http://www.bbc.co.uk >>> This e-mail (and any attachments) is confidential and may contain personal >>> views which are not the views of the BBC unless specifically stated. >>> If you have received it in error, please delete it from your system. >>> Do not use, copy or disclose the information in any way nor act in reliance >>> on it and notify the sender immediately. >>> Please note that the BBC monitors e-mails sent or received. >>> Further communication will signify your consent to this. >>> _______________________________________________ >>> General mailing list >>> [email protected] >>> http://developer.marklogic.com/mailman/listinfo/general >> >> _______________________________________________ >> General mailing list >> [email protected] >> http://developer.marklogic.com/mailman/listinfo/general > > > http://www.bbc.co.uk/ > This e-mail (and any attachments) is confidential and may contain personal > views which are not the views of the BBC unless specifically stated. > If you have received it in error, please delete it from your system. > Do not use, copy or disclose the information in any way nor act in reliance > on it and notify the sender immediately. > Please note that the BBC monitors e-mails sent or received. > Further communication will signify your consent to this. > > _______________________________________________ > General mailing list > [email protected] > http://developer.marklogic.com/mailman/listinfo/general _______________________________________________ General mailing list [email protected] http://developer.marklogic.com/mailman/listinfo/general
