W3C home > Mailing lists > Public > www-svg@w3.org > August 2005

Resolving URIs in shadow trees

From: Cameron McCormack <cam-www-svg@aka.mcc.id.au>
Date: Tue, 2 Aug 2005 17:25:57 +1000
To: www-svg@w3.org
Message-ID: <20050802072557.GD25652@port.mcc.id.au>

I may have overlooked this, but I'm not sure what the rules are for
resolving URIs within shadow trees.  For example:

  <svg ...>
    <clipPath id="CP1"/>
    <text id="T1"/>
      <xbl:definition element="ex:test">
          <clipPath id="CP2"/>
          <text id="T2"/>
          <g id="G1" clip-path="url(#CP1)"/>
          <g id="G2" clip-path="url(#CP2)"/>
          <use xlink:href="#T1"/>
          <use xlink:href="#T2"/>
          <handler ev:event="xbl:bound">
            var CP3 = document.createElementNS(SVGNS, "clipPath");
            CP3.id = "CP3";

            var G3 = document.createElementNS(SVGNS, "g");
            G3.id = "G3";
            G3.setAttributeNS(null, "clip-path", "url(#CP3)");

            var T3 = document.createElementNS(SVGNS, "text");
            T3.id = "T3";

            var U3 = document.createElementNS(SVGNS, "use");
            U3.id = "U3";
            U3.setAttributeNS(XLINKNS, "xlink:href", "#T3");


There are six cases for URI referencing here that I can see:

  referer	referent	reference type	defined where
  -------	--------	--------------	-------------
  G1		CP1		CSS url()	document scope
  G2		CP2		CSS url()	document scope AND shadow tree
  G3		CP3		CSS url()	shadow tree
  U1		T1		xlink:href	document scope
  U2		T2		xlink:href	document scope AND shadow tree
  U3		T3		xlink:href	shadow tree

So my questions are:

  - Does G1's clip-path property resolve to CP1 in the document level
    scope or null?
  - Does G2's clip-path property resolve to the CP2 in the shadow tree,
    the CP2 in the document (the child of the xbl:template element)
    or null?
  - Does G3's clip-path property resolve to CP3 in the shadow tree or

and those same questions again substituting "T" for "CP", "href" for
"clip-path" and "U" for "G".



  e-mail : cam (at) mcc.id.au    	icq : 26955922
     web : http://mcc.id.au/	        msn : cam-msn (at) aka.mcc.id.au
  office : +61399055779		     jabber : heycam (at) jabber.org
Received on Tuesday, 2 August 2005 07:26:09 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:29:27 UTC