The operator remove... within returns a copy of the SGML element given as argument in which all the sub-elements corresponding to selection are deleted.
Prototypes:
list <-- remove selection within element
list <-- remove selection as varname within element where booleanThe second variant returns only elements for which boolean is TRUE. Varname is a variable which is mapped to each visited node, and which can be used in boolean.
Selection follows the syntax and specifications explained for the within operator.
Examples:
- Removing empty sub-elements:
remove every as $x within file $myfile where empty(content($x))
- Removing all #PCDATA:
remove every #PCDATA within file $myfile<CESDOC VERSION="3.15"><CESHEADER VERSION="2.1"><FILEDESC><TITLESTMT><H.TITLE> </H.TITLE></TITLESTMT><PUBLICATIONSTMT><DISTRIBUTOR> ...(full result)...