svg in xsl fo

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • cleary1981
    New Member
    • Jun 2008
    • 178

    svg in xsl fo

    hi,

    the below script will add svg drawings to my pdf. the problem is I want the drawing to be specific in each case.

    Code:
    <xsl:for-each select="quote/panels/panel">
            			<!-- Nextpage: SVG Drawings -->
            			<fo:block break-before="page">
             		
           				<fo:instream-foreign-object>
           			
    					<svg xmlns="http://www.w3.org/2000/svg" width="29.7cm" height="29.7cm" xml:space="preserve">
      						
    						<g transform="rotate(-90)">
         						<image xlink:href="00004.svg" x="-27cm" y="1cm" width="70cm" height="40cm"/>
      						</g>
      						
    					</svg>
    					
    					</fo:instream-foreign-object>
    				
           				</fo:block>
            			</xsl:for-each>
    I have tried using a select inside but that doesn't work
    Code:
    <image xlink:href="<xsl:value-of select='svgdrawing'/>" x="-27cm" y="1cm" width="70cm" height="40cm"/>
    Can this be done?
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    instead of (this is actually invalid xml (syntax violation))
    Originally posted by cleary1981
    Code:
    <image xlink:href="<xsl:value-of select='svgdrawing'/>" x="-27cm" y="1cm" width="70cm" height="40cm"/>
    try
    Code:
    <image xlink:href="{svgdrawing/text()}" x="-27cm" y="1cm" width="70cm" height="40cm"/>

    Comment

    • cleary1981
      New Member
      • Jun 2008
      • 178

      #3
      ok, you are actually a genuis. Thanks.

      Comment

      Working...