Community Tip - You can subscribe to a forum, label or individual post and receive email notifications when someone posts a new topic or reply. Learn more! X
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
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