W3C home > Mailing lists > Public > www-svg@w3.org > July 2004

Re: referencing remote patterns

From: Andreas Neumann <neumann@karto.baug.ethz.ch>
Date: Thu, 08 Jul 2004 00:04:24 +0200 (CEST)
To: Peter Fry <Peter.Fry@oracle.com>
Message-ID: <1089237864.40ec7368cce2c@karmail.ethz.ch>
Cc: www-svg@w3.org

Hi Peter!

referencing remote resources (such as patterns, gradients, any named elements, 
etc.) does not work in Adobe SVG viewer 3.0. It works, however in Batik, and I 
think also in ASV6 (Adobes prerelease successor of ASV3).

Andreas

Quoting Peter Fry <Peter.Fry@oracle.com>:

> 
> Hi,
> 
> I am using the Adobe SVG plugin 3.0 and wish
> to reference patterns held in a remote resource i.e.
> The main svg doc would contain
> 
> <rect x="2800" y="334.125" width="200.0" height="82.5"
> fill="url(/upsell/patterns/patterns.svg#hatchGREEN)" stroke="white"
> stroke-width="10"
> />
> 
> The contents of /upsell/patterns/patterns.svg is
> 
> <?xml version="1.0" standalone="no"?>
> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
> "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">
> <svg width="18.0cm" height="15.0cm" viewBox="0 0 208.0 169.0"
> xmlns="http://www.w3.org/2000/svg">
> <defs>
> <pattern id="hatchGREEN" patternUnits="userSpaceOnUse" x="0" y="0"
> width="50" height="50">
> 	<g>
>     <rect x="0" y="0" width="15" height="50"
>       fill="rgb(255,99,71)" stroke="none"
>     />
>     <rect x="15" y="0" width="35" height="50"
>       fill="yellow" stroke="none"
>     />
> 	</g>
> </pattern>
> </defs>
> </svg>
> 
> Is this valid? Are there other ways of doing this.
> The majority of the SVG document is programatically
> constructed and having the patterns as a web resource
> aids maintainability and in this case performance.
> 
> Peter Fry
> 
> 



--
I finally figured out the only reason to be alive is to enjoy it.
-- Rita Mae Brown

----------------------------------------------
Andreas Neumann - Department of Cartography
Swiss Federal Institute of Technology (ETH)
ETH Hoenggerberg, CH-8093  Zurich, Switzerland
Phone: ++41-1-633 3031, Fax: ++41-1-633 1153
e-mail: neumann@karto.baug.ethz.ch
www: http://www.karto.ethz.ch/neumann/
SVG.Open: http://www.svgopen.org/
Carto.net: http://www.carto.net/
Received on Wednesday, 7 July 2004 18:07:06 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 5 February 2014 07:14:54 UTC