OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

docbook message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [docbook] status of graph2svg

Thanks, Dave. I believe the difference is that you used the stylesheets to create an SVG file, and then processed it through as an external object. I am trying to use the SVG as an in stream object:

<fo:instream-foreign-object width="3in">

The SVG generated from graph2svg won't work this way, at least in my experience.


On 11/13/11 1:13 AM, davep wrote:
On 11/12/2011 03:33 PM, Paul Tremblay wrote:
A while back Dave Pawson posted a question about graph2svg:

I am wondering about the status and usefulness of the stylesheets. First, the stylesheets require an xsl processor, and the only xsl 2 processor is Saxon. However, if you use the latest version of Saxon, saxon9he.jar, the stylesheets crash because this processor does not accept built in functions. Instead, one has to download the older version to get the stylesheets to work.

But the documentation for the stylesheets is very sparse. The original is in Russian, a language I don't read. I can't figure out simple things like how to put labels on my x and y axis. Also, the SVG document has no width and height attribute in the root element. So far as I understand, that makes it unusable for FO implementation, or at least FOP processing. FOP requires a height and width attribute. You just can't put these attributes in after the document is generated because it will throw the scale off.

I have used them (as a two part exercise) in a (quite large) docbook document.
Put simply they work for me?

Agreed on the documentation... I got out of it what I put into it.

Here, my usage.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE msgr SYSTEM "/sgml/svg/graph2svg/msgr/msgr.dtd">
<msgr  xmlns="http://graph2svg.googlecode.com";

       yAxisType="shifted" xGrid="major"
       yGrid="major" legend="right">
<title>Graph Title</title>


<title>axis label </title>


In ant I use

<echo>Generate aprilbm.svg</echo>

Where the macro is

<macrodef name="call-xslt2" backtrace="true">
<attribute name="source"/>
<attribute name='stylesheet'/>
<attribute name="output"/>
<java classname="${xslt2_processor}"

<classpath refid="xslt2.processor.classpath" />
<jvmarg line="-Dorg.apache.xerces.xni.parser.XMLParserConfiguration=org.apache.xerces.parsers.XIncludeParserConfiguration"/> <jvmarg line="-Djavax.xml.parsers.DocumentBuilderFactory=org.apache.xerces.jaxp.DocumentBuilderFactoryImpl"/> <jvmarg line="-Djavax.xml.parsers.SAXParserFactory=org.apache.xerces.jaxp.SAXParserFactoryImpl"/>
<arg value="-l"/>
<arg value="-o"/>
<arg value="@{output}"/>
<arg line="-x org.apache.xml.resolver.tools.ResolvingXMLReader"/>
<arg line="-y org.apache.xml.resolver.tools.ResolvingXMLReader"/>
<arg line="-r org.apache.xml.resolver.tools.CatalogResolver "/>
<arg line="${basedir}/@{source} @{stylesheet} " />

The max x and y values are based on the data, so shouldn't be a problem, though I can't
recall dealing with those? Let me know if it still is.

btw, I have a version of the stylesheets with English comments?

In the xslt 1.0 file I have

<figure xml:id="ch10.fig1">
<title>Plot of  Oct 09</title>
<imagedata fileref="graphics/octbm.svg" format="SVG"
<phrase>title </phrase></textobject>
<caption><para>Plot of  alt text</para></caption>

Quote, that works for me, ymmv?



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]