Subject:Removing g with XSLT Author:joe j Date:23 Aug 2005 09:41 PM
Hello,
Anybody have an idea on how I can remove empty <g> elements? Lets say if <g> element does not have any attribute then its empty and should be removed from the svg file.
I tried doing the following:-
-------------------------------------------------
<?xml version='1.0'?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="xml" omit-xml-declaration="no" indent="no" />
my solution works but if i have nested <g> elements then the empty <g> elements inside the non-empty <g> elements are also copied!! how can I solve that with XSLT :-)