W3C home > Mailing lists > Public > public-html@w3.org > May 2007

Substitutions for site/path in SRC,HREF

From: Dmitry Turin <html60@narod.ru>
Date: Fri, 18 May 2007 14:12:34 +0400
Message-ID: <5123685558.20070518141234@narod.ru>
To: public-html@w3.org

Values of several attributes SRC and HREF can have identical part
(for example, name of site, or path to directory),
but it's impossible to specify value of this part in css-file (and in STYLE-element)
as because SRC and HREF are not properies,
as because css-file (and STYLE-element) can define only _whole_ value
instead of part of value.

I offer to enter _substitutions_ like the following
($site$, $path$, $location$, $site_and_path$ are substitutions).
Because SRC and HREF are attributes,
i suggest to use not css-file or STYLE-element, but to use sbs-file or SBS-element

<html>
  <head>
  </head>
  <sbs>
    site:          site.net;
    path:          folder1/folder2;
    location:      dirA/dirB/dirC/dirD/dirE;
    site_and_path: site.com/dir1/dir2/dir3;
  </sbs>
  <body>
    <link href="$site$/$path$/filename.txt">
    <img  src= "/$location$/filename.jpg">
    <a    href="$site_and_path$/filename.htm">
  </body>
</html>

<html>
  <head>
    <link src=./filename.txt type="text/sbs" rel="substitution">
  </head>
  <body>
    <link href="$site$/$path$/filename.txt">
    <img  src= "/$location$/filename.jpg">
    <a    href="$site_and_path$/filename.htm">
  </body>
</html>


Dmitry Turin
http://html6.by.ru
http://sql4.by.ru
http://computer2.by.ru
Received on Friday, 18 May 2007 12:54:27 UTC

This archive was generated by hypermail 2.3.1 : Monday, 29 September 2014 09:38:44 UTC