(: * * Usage: xqilla -u -v "inFile" * * XQilla will update the file ($inFile) in-place, so it should * use a copy if the original is to be saved. * * This XQuery script removes empty Component elements that * may have been generated by genWix.py. * :) (: preamble -- shut up revaliation and declare input files :) declare revalidation skip; declare variable $inFile as xs:untypedAtomic external; (: the main query :) for $i in doc($inFile)//Directory/Component where not(exists($i/File)) return delete node $i