Re: SVG spec.: marker URI base address

On Friday, September 23, 2005, 11:54:30 AM, kohl wrote:

k> The reference from CSS to a marker seems to be problematic, there should
k> be an explicit statement in the SVG and/or CSS standards ( see my error 
k> message https://bugzilla.mozilla.org/show_bug.cgi?id=309612 )

There is:

  In order to create modular style sheets that are not dependent on the
  absolute location of a resource, authors may use relative URIs.
  Relative URIs (as defined in [RFC1808]) are resolved to full URIs
  using a base URI. RFC 1808, section 3, defines the normative algorithm
  for this process. For CSS style sheets, the base URI is that of the
  style sheet, not that of the source document.
  http://www.w3.org/TR/CSS2/syndata.html#uri

More generally, this falls from the definition of relative URIs, see RFC
3986.

k> After a change in Mozilla SVG a local reference like

k>             marker-end: url(#dartZ); marker-start: url(#CtrlPoint);

k> is not evaluated to point to the SVG/XML-file, when it is given in an 
k> external style sheet, but to nowhere in the CSS-file

That is correct.

k> The developer is saying, that this is conforming to CSS standards, and 
k> checking the standards I've seen no strict argument against.

The developer is correct.

k> But this will be against the necessity to write CSS files usable for 
k> more than one source, or bind marker definitions to inline styling.

k> I think, there should be a specific hint in the SVG specifications to 
k> this problem of "back linking" from a CSS-file to the calling 
k> SVG/XML-file set up by the marker statement.

That is fair enough, we will add such a note.

k> (E.g. like different URI calculation for CSS links and SVG links in CSS 
k> files ("URI name spacing") )

In fact they all follow the same rules - a relative URI is expanded to
an absolute URI by looking for an in-scope base declaration (CSS doesn't
have that) and then, relative to the base URI of the document.

What is missing in CSS is some way to say that the URI is relative to the
document being styled.

Instead, what you have to do is put your markers, gradients etc in some
common file, like commonstuff.svg which is in the same directory as your
style sheet.

marker-end: url(commonstuff.svg#dartZ);
marker-start: url(commonstuff.svg#CtrlPoint);


-- 
 Chris Lilley                    mailto:chris@w3.org
 Chair, W3C SVG Working Group
 W3C Graphics Activity Lead
 Co-Chair, W3C Hypertext CG

Received on Friday, 23 September 2005 18:23:46 UTC