Question : Refining xi:include element to exclude data when a specific child tag's text is present.

Hello.

I've got the following working <xi:include> tag ...

1:
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.dateperiod')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[@role='oop'])" />


This tag says to include all OOP orientated constructorsynopsis for the class.dateperiod.

This is working fine. We have OOP and procedural constructors and only want the OOP ones in the global class definition.


What I now want to include is all non private methods.

Starting with ...

1:
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.dateperiod')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[@role='oop'])" />


(which includes all OOP methods, static/dynamic, public/private/protected), I want to make it exclude where there is a <modifier>private</modifier>.

But not sure how.

The <modifier> may NOT be the first child of <methodsynopsis> but it will be a child.


I don't know squat about this technology, only what I've managed to test and get working. So please be gentle.

Regards,

Richard.

P.S. I have a related issue at Refining xi:include element to include data when a specific attribute value is present or the attribute is not present

Answer : Refining xi:include element to exclude data when a specific child tag's text is present.

Solution found:

Tip #4 on http://www.xml.com/lpt/a/1018

[not(modifier='private')]
Random Solutions  
 
programming4us programming4us