Re: [xep-support] SVG questions/problems

From: Bob Stayton <>
Date: Thu Aug 02 2007 - 09:05:51 PDT

I can address item #4. The DocBook documentation says that an svg element should appear inside an imageobject element:

Did you see someplace where it said it should be inside an imagedata element?

Regarding validity, the svg element must be in the svg namespace, so it does not violate DocBook's validity. To validate a document with multiple namespaces, you need a multiple namespace validator.

Bob Stayton
Sagehill Enterprises
DocBook Consulting

  ----- Original Message -----
  From: Mats Sigge
  Sent: Thursday, August 02, 2007 2:05 AM
  Subject: [xep-support] SVG questions/problems

  Hi! We are using RenderX to render DocBook with embedded SVG into PDF. We have some problems with the SVG rendering:
    1.. We believe that the same font is used in the document text as in the SVG images. However, some Unicode symbols will not display in the SVG images, for example the infinity sign. (They display nicely in Firefox in the same SVG.)
    2.. Links do not work in SVG. (The same links will work in Firefox if the SVG is embedded in an XHTML document.)
    3.. How do we center text vertically? We have tried a number of different approaches but cannot get it to work. (As with the others, it works in Firefox.)
    4.. This might be a DocBook stylesheet problem, but according to the definition, SVG should be surrounded by the <imagedata> tag (in turn surrounded by <imageobject>. When we do that, the image will not show. However, if we remove the <imagedata tag> and place the SVG directly below the imageobject tag, the SVG will render (although the XML is not valid).
    5.. A minor problem, but ligatures are not used in text inside SVG, but it is used in the same text outside SVG.
  Anyone have any hints about what may be wrong? Below is a DocBook document with embedded SVG which reproduces all these problems.


  / Mats S
  <?xml version="1.0" encoding="iso-8859-1"?>
  <article xmlns:svg="" xmlns:xl=""
      <section xml:id="section-one">
          <title>Section One</title>
                  <svg:svg width="650" height="720" version="1.1">
                      <svg:style type="text/css"> text {
                          font-family:serif; dominant-baseline:middle; text-anchor:middle; }
                          text.occurs { font-stretch:normal; dominant-baseline:hanging;
                          text-anchor:end; } rect, line, polygon { stroke:black; } </svg:style>
                      <svg:rect width="100%" height="100%" style="fill:rgb(235,235,235);"/>
                      <svg:g transform="translate(320,360)">
                          <svg:rect width="350" height="30" x="-175" y="-15" style="fill:none;"/>
                          <svg:text x="0" y="0"> This is centered horizontally but not vertically </svg:text>
                          <svg:a xl:href="#section-two">
                              <svg:text x="0" y="50"> This will not render as a link </svg:text>
                          <svg:text x="0" y="100"> This is the infinity symbol: &#x221e; </svg:text>
                          <svg:text x="0" y="150"> These are not ligatures: fi fl </svg:text>
              <link xl:href="#section-two">This will render as a link</link>
              This is the infinity symbol: &#x221e;
              These are ligatures: fi fl
      <section xml:id="section-two">
          <title>Section Two</title>
                      <svg:svg width="650" height="720" version="1.1">
                          <svg:g transform="translate(320,360)">
                              <svg:text x="0" y="0"> This will not render at all </svg:text>

(*) To unsubscribe, send a message with words 'unsubscribe xep-support'
in the body of the message to from the address
you are subscribed from.
(*) By using the Service, you expressly agree to these Terms of Service
Received on Thu Aug 2 10:10:24 2007

This archive was generated by hypermail 2.1.8 : Thu Aug 02 2007 - 10:10:27 PDT