开发者

Create an hyperlink from SVG to a block in XSL-FO / PDF

Hope somebody can help me, I'm stuck.

I am creating a set of SVG's and HTML files from an XML doc (via XSLT2), and I have hyperlinks in my SVG graphics (with xlink:href) to the HTML files. Basically, showing a database structure with rectangles for tables, and a click on a table goes to the explanation in HTML. So far so good.

Now, my customer tells me "I need all that in a single interactive PDF doc". So using another XSLT I produce a single XSL-FO doc with fo:block's for each table details and instream SVG's for the diagrams. The FO doc will be further processed through FOP to produce the PDF.

But now, I can't find a way to refer to开发者_JAVA百科 a fo:block in the same doc from the rectangle in the embedded SVG? xlink:href expects a reference to an <a name="">, so how to indicate that I want to point to a fo:block id? Or is there an equivalent to the <a name=""> construct in FO?

Any help/hint greatly appreciated! Thanks to the community.


Add an id attribute to the fo:block and it should work:

<fo:block id="foo"></fo:block>
<image xlink:href="#foo" />
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜