cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Using fo:instream-foreign-object to create an svg ellipse around a step number

ClayHelberg
17-Peridot

Using fo:instream-foreign-object to create an svg ellipse around a step number

Hi Kathy-



From the annotated version of the XSL support document in the Arbortext
Help Center:



6.6.6 fo:instream-foreign-object

Arbortext software does not support this extended-level formatting
object.



Sorry. You might have better luck if you save the SVG as an external
file and reference it as an external graphic.



--Clay


6 REPLIES 6
KR
1-Newbie
1-Newbie
(To:ClayHelberg)

Itseems easy to usesvg withininstream-foreign-object to create an ellipse around a step number in XSL FO. However, Arbortext publishing engine seems toonly publish the svg text element with the step number and I'm not seeing any attempt at the svg ellipse. I can make this work in another rendering tool. It's entirely possible that the other tool I'm using to test my XSL FO just renders the svg ellipse differently -- so perhaps the size and coorinates just happen to work foranother renderingtool, but are not correct within thearbortext interpretation **OR** Arbortext just doesn't do svg other than the text elementin instream-foreign-object. Does anyone know if svg in instream-foreign-objectis supposed to work?

<fo:instream-foreign-object< font="> content-height="10pt">

<svg:svg< font="> xmlns:svg="http://www.w3.org/2000/svg"

height="50" width="150" viewBox="0 0 100 50">

<svg:circle< font="> r="50" fill="red" stroke="black" stroke-width="3"/>

<svg:ellipse< font="> cx="25" cy="25" rx="40" ry="25"

fill="none" stroke="black" stroke-width="3"/>

<text< font="> x="10" y="40" font-family="Arial" font-size="50" fill="black" >

<xsl:number< font="> count="crewDrillStep" level="any" from="crewDrill|subCrewDrill" format="1."/>

</text>

</svg:svg>

</fo:instream-foreign-object>

Thanks in advance,

Kathy

KR
1-Newbie
1-Newbie
(To:ClayHelberg)

The whole graphic for every possible number in every possible font size is
exactly what I wanted to avoid. Too bad, so sad.

Kathy


What font sizes are possible? How does the ellipse differ for
different font sizes and different numbers? What sort of FO code
surrounds the number and ellipse (e.g., a table)? It might be
possible to have a limited number of variants of the ellipse and
overprint it with the number.

-Brandon 🙂


lfraley
6-Contributor
(To:ClayHelberg)

Kathy:

What products/tech are you using? Styler? Publishing Engine? Print
Composer? FOSI?

Liz

Unicode contains a large range of circled numbers, perhaps you could use
these? (I think there are quite a few fonts out there that support a good
range of circled numbers)



Unicode also has a combining "diacritic" that is a circle U+20DD
(

Hi Kathy-

Don't give up hope yet. If you're creative, you can probably set
something up to do this as part of your publishing process. You're
already generating the SVG, so just route it out to a file and then
generate a reference to that file as an fo:external-graphic instead of
putting it inline. Here's an XSL template that gives you a general sense
of how this could work:

<xsl:template match="graphic">

                <xsl:document href="{some_generated_filename}.svg">

                </xsl:document>

                <fo:external-graphic src="{same_generate_filename}.svg">

</xsl:template>

Note that the <xsl:document> element is an XSLT 2.0 feature, so you'll
need to set the version attribute on your xsl:stylesheet root element to
"2.0". You might also have to do some tweaking with the path for the
generated SVG file to make this work with PE.

--Clay

Announcements