title: Batik SVG to PNG with included xhtml
body: <p>I'm using Batik (1.8) to convert SVGs to PNGs within my plugin. One of my clients has a SVG (snipped see below) which uses XHTML for text elements inside the SVG. Those text elements are not shown in the rasterized PNG.</p>
  
  <p>Further details: obviously Batik evaluates the required feature (extensibility) as true and then tries to handle the XHTML part - it does not use the fall back outside the foreignObject. The handling of the XHTML part is however not successful as no text is shown. No exceptions etc. are thrown. The code used is pretty much the standard code as shown in the Batik examples. Any ideas what I can do to make Batik show that text?</p>
  
  <p>Thank you for any hints,</p>
  
  <p>Andreas</p>
  
  <pre><code>&lt;!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"&gt;
  &lt;svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="300px" height="167px" version="1.1" style="background-color: rgb(255, 255, 255);"&gt;
  &lt;defs/&gt;
  &lt;g transform="translate(0.5,0.5)"&gt;&lt;rect x="1" y="47" width="120" height="60" fill="none" stroke="#000000" stroke-dasharray="3 3" pointer-events="none"/&gt;
  &lt;g transform="translate(49.5,70.5)"&gt;
  &lt;switch&gt;&lt;foreignObject style="overflow:visible;" pointer-events="all" width="22" height="12" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Extensibility"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display: inline-block; font-size: 12px; font-family: Helvetica; color: rgb(0, 0, 0); line-height: 1.2; vertical-align: top; width: 24px; white-space: nowrap; word-wrap: normal; text-align: center;"&gt;&lt;div xmlns="http://www.w3.org/1999/xhtml" style="display:inline-block;text-align:inherit;text-decoration:inherit;"&gt;Test&lt;/div&gt;&lt;/div&gt;&lt;/foreignObject&gt;&lt;text x="11" y="12" fill="#000000" text-anchor="middle" font-size="12px" font-family="Helvetica"&gt;Test&lt;/text&gt;&lt;/switch&gt;&lt;/g&gt;
  &lt;/g&gt;&lt;/svg&gt;
  </code></pre>