W3C home > Mailing lists > Public > www-style@w3.org > November 2004

Re: Multiple Background Images

From: Andrew Fedoniouk <news@terrainformatica.com>
Date: Fri, 5 Nov 2004 16:50:23 -0800
Message-ID: <004701c4c39a$99c17970$a202000a@ANDREWF>
To: "Ted Shanyfelt" <ted@ahi.uhh.hawaii.edu>
Cc: <www-style@w3.org>

Hi, Ted, seems I am getting your point :)

Let's split server side parameters and client side ones.

So what we have here:

1) To create SVG on the server we can use
url(svg.cgi?bg1=foo&bg2=bar) as is. So our server will take
parameters provided and synthesize some SVG for us. This is, I believe, 
preferred way. At least from CSS point of view. Let's keep our client (UA) 
thin (at least in our dreams).

2) To modify SVG on the client we may use SVG DOM manipulation using 
JavaScript
DOM functions. This will work in SVG viewers with JavaScript enabled.

To be precise your question should sound like:
"How to define in CSS and pass parameters into SVG's onLoad  [1] event 
handler?"
But this is completely different story and, I guess, it is far from scope of 
url(...).
url() is asynchronous request and is not a function in common sence.


Andrew Fedoniouk.
http://terrainformatica.com

[1] http://www.w3.org/TR/SVG11/interact.html#LoadEvent

PS: expectation that document.location will always reflect requested url is 
a bit optimistic.


Original Message from: "Ted Shanyfelt"
|
| Actually, it's the location property of the document,
| not the URL property that allows access to parameters
| in JavaScript, but in practice, JavaScript does allow
| access to parameters.  If SVG could do the same when
| called upon by background: url(a.svg?bg1=foo,bg2=bar)
| or something similiar, we would have better flexibility.
|
| ...
| document.write(document.location);
| </script>
| <form method='GET' action='self.html'>
| <input type='text' name='foo' value='This is foo'/>
| <input type='submit'/>
| ...
|
| (This example in self.html works with Gecko
| and MSIE and maybe others.)
|
| If recommending against using url() for passing
| URL-encoded parameters, how would you recommend
| to pass parameters?
|
| _-Ted Shaneyfelt
|
| p.s. I'd also be interested in using XSLT to generate
| the svg background document, if there were a
| mechanism to do so.
|
| If XML could build the document with XSLT on the
| fly (if XML or XSLT could accept parameters in this
| manner):
| - The layering could be handled by SVG,
| - The scalability could be handled by XSLT,
| - The parameters could be handled by XML and the url()
|  interface (or something like it, perhaps call it location()
|  instead of url() if you like).
|
|
| 
Received on Saturday, 6 November 2004 00:50:44 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:54:34 GMT