RE: filtering SVG

2007-11-16 Thread Pascal Sancho
Hi,

I had a similar problem in the past: replace all texts in SVG with localized 
one.
This can be done at the XSLT stage:
 - parse the SVG with the document() function;
 - use fo:instrem-foreign-object instead of fo:external-graphic

HTH,
Pascal

 -Message d'origine-
 De : Raphael Parree [mailto:[EMAIL PROTECTED] 
 Envoyé : vendredi 16 novembre 2007 09:55
 
 Hi,
 
 I was wondering if the following is possible and what would 
 be the best approach. We use a lot of SVG (exported from 
 Visio). These SVG always need a manual fix to make line ends 
 (arrow etc) visible:
 
 style type=text/css
![CDATA[marker { overflow:visible; }]]
 /style
 
 I would like to insert this style element to each svg during 
 generation. The SVGs are added as external images. So I would 
 need some sort of image filter to add this to the DOM tree of the SVG.
 
 Is this possible, and what would be the best approach...?
 
 Raphael

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



RE: filtering SVG

2007-11-16 Thread Raphael Parree
Jeremias,

I might have to resolve to that...i am having difficulties inserting text
into an existing element...

So far I have, but I still need the first template to apply template so I
can get to the second template...


xsl:apply-templates select=document(...uri to svg...)/

  xsl:template match=svg:*
  xsl:copy-of select=. /  
  /xsl:template
  xsl:template match=svg:style
svg:style type=text/css
xsl:textmarker { overflow:visible; }
/xsl:text
  xsl:apply-templates/  /svg:style
  /xsl:template

Tx (also Pascal).. I will probably try the URI Resolver..



-Original Message-
From: Jeremias Maerki [mailto:[EMAIL PROTECTED] 
Sent: 16 November 2007 10:40
To: fop-users@xmlgraphics.apache.org
Subject: Re: filtering SVG

In addition to what Pascal suggested: You can plug in a custom
URIResolver. When the image package redesign is completed you should
also be able to return a DOMSource as the result of URI resolution. At
the moment you have to return an InputStream.

Jeremias Maerki



On 16.11.2007 09:55:05 Raphael Parree wrote:
 Hi,
 
  
 
 I was wondering if the following is possible and what would be the best
 approach. We use a lot of SVG (exported from Visio). These SVG always need
a
 manual fix to make line ends (arrow etc) visible:
 
  
 
 style type=text/css
 
![CDATA[marker { overflow:visible; }]]
 
 /style
 
  
 
 I would like to insert this style element to each svg during generation.
The
 SVGs are added as external images. So I would need some sort of image
filter
 to add this to the DOM tree of the SVG.
 
  
 
 Is this possible, and what would be the best approach.?
 
  
 
 Tx.,
 
  
 
 Raphael
 


-
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]



Re: filtering SVG

2007-11-16 Thread Jeremias Maerki
In addition to what Pascal suggested: You can plug in a custom
URIResolver. When the image package redesign is completed you should
also be able to return a DOMSource as the result of URI resolution. At
the moment you have to return an InputStream.

Jeremias Maerki



On 16.11.2007 09:55:05 Raphael Parree wrote:
 Hi,
 
  
 
 I was wondering if the following is possible and what would be the best
 approach. We use a lot of SVG (exported from Visio). These SVG always need a
 manual fix to make line ends (arrow etc) visible:
 
  
 
 style type=text/css
 
![CDATA[marker { overflow:visible; }]]
 
 /style
 
  
 
 I would like to insert this style element to each svg during generation. The
 SVGs are added as external images. So I would need some sort of image filter
 to add this to the DOM tree of the SVG.
 
  
 
 Is this possible, and what would be the best approach.?
 
  
 
 Tx.,
 
  
 
 Raphael
 


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