The SVG is generated via graphviz DOT [ http://www.research.att.com/sw/tools/graphviz/ ]. A description of a diagram is stored in a file with extension ".dot". The following allows the conversion from dot->svg.

<map:match pattern="**.dot.svg">
   <map:generate type="text2xml" src="content/xdocs/{1}.dot" />
   <map:transform type="dot2svg"/>
   <map:serialize type="svg"/>
</map:match>

I would like to reference the generated SVG within an xhtml document - possibly generated from other formats like docbook - or within a generated JavaDOC documentation where a taglet adds a tag to both describe and reference a diagram. The Javadoc case would be something similar to

/* <p>Standard comments with diagrams</p>
* [EMAIL PROTECTED] diagram description in DOT syntax}
* <p>More comments...</p>
* /

The @diagram tag is handed over to the taglet which

- Produces a ".dot" file, named for example "1234.dot"
- Produces some sort of link to the image within the generated HTML documentation, for example "<embed href='1234.dot.svg'/>"


Thanks for any idea.

Alessandro

[EMAIL PROTECTED] wrote:

Can you show me some of the code to generate the SVG...  And where do you
put the code for embedding the svg?

-----Original Message-----
From: Alessandro Evangelista [mailto:[EMAIL PROTECTED]
Sent: 01mm2004 12:21
To: [EMAIL PROTECTED]
Subject: SVG embed/object tag generation


Hi All,

I created a transformer which dynamically generates SVG images.

I am willing to reference those images from generated (x)html pages via the embed/object tag. Since the final size and aspect ratio is initially not known, I have the problem on how to set the width and height attributes of the embed/object tags.

Any idea on how to proceed? Do you know any solution on how to generate the embed tag from an SVG image ant its properties?

Would be possible to extract the width and height attributes from the root SVG tag and start the generation from there?

I would like to avoid rasterizing the images...

Thanks for you help.

Alessandro

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to