Subject: How to strip all optional but empty elements from a XML doc?
From: "Ben Stover" <bxstover@xxxxxxxxxxx>
Date: Tue, 04 Aug 2009 06:55:28 +0200
|
Assume I have a XML doc and a XSD schema file which defines mandatory and optional element fields.
How can I now go recursively through the whole XML document and find all elements which are optional (e.g. minoccurs=0)
but currently EMPTY. These empty, optional elements should be stripped off so that the resulting XML does not contain them any more.
How can I achive this with an XSLT script?
Ben
|