If you want to use ACL, there is an OID function, oid_empty() that will identify EMPTY elements. Then just select (oid_select()) and delete the selection.
You can tie this in with the 'oid_content_model()' function and verify the ELEMENT itself is EMPTY (and not just a tag with no content).
Something like this
if(oid_empty(o)=="1" && oid_content_model(o)!="EMPTY")
Then use 'oid_delete()' function to delete the OID.
You'll need to run something to traverse the file,
o=oid_first()
while oid_valid(o)
{
if(oid_empty(o)=="1" && oid_content_model(o)=="EMPTY")
{oid_delete(o)}
o=oid_forward(o)
}
That is pretty close, may take some tweaking, but close enough to start.
Lynn
---- "Buss wrote:
> You can use an xpath to return a node tree of the whole document, then oid_content() to check each one for content and mark for deletion.
>
> Is this just for elements that contain no children or PCDATA when they should? Is it possible that these elements might have attributes defined?
>
> Quick and dirty, off the top of my head...
>
> ret=oid_xpath_nodeset(oid_root(),nodearr,"//*")
> for(n in nodearr){
> if(!oid_content(nodearr[n]){
> oid_delete(nodearr[n])
> }
> }
>