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

brainstorm: attributes as virtual tags

From: Dmitry Turin <html60@narod.ru>
Date: Tue, 24 Apr 2007 17:01:43 +0300
Message-ID: <7424538796.20070424170143@narod.ru>
To: public-html@w3.org

Today HTML-element is so, that applied information is between openning and closing tags.
All attributes of openning tags are service attributes.
But data are saved in database as records;
and tags, several attributes of which contains applied information, correspond to records.

Now we must create xsl-file to visialize xml-file.
I offer more quick way:
we shall specify attributes in css-file so, as if they are enclosed tags
(we shall put sign "" before names of attributes).
Let name these tags as virtual tags.

Example 1.
Let html- or xml-file contain:

<a a1="x" a2="y" a3="z" a4="w">

We create css-file:

a a1 {
  color: red;
  newstring:yes;
}
a a2 {
  color: blue;
  newstring:yes;
}
a a3 {
  color: green;
  newstring:yes;
}

Than browser display <a a1="x" a2="y" a3="z" a4="w"> so, as if it is

<a a4="w">
  <span color="red">  x</span><br>
  <span color="blue"> y</span><br>
  <span color="green">z</span><br>
</a>


Example 2.
Let html- or xml-file contain:

<tab>
  <a a1="v11" a2="v12" a3="v13">
  <a a1="v21" a2="v22" a3="v23">
  <a a1="v31" a2="v32" a3="v33">
</tab>

We create css-file:

tab {
  kind:table
}
a {
  type:row;
  newstring:yes;
}
a a1 {
}
a a2 {
}
a a3 {
}

Than browser display xml- or html-file so, as if it is

<table>
  <tr>
    <td>v11</td>
    <td>v12</td>
    <td>v13</td>
  </tr>
  <tr>
    <td>v21</td>
    <td>v22</td>
    <td>v23</td>
  </tr>
  <tr>
    <td>v31</td>
    <td>v32</td>
    <td>v33</td>
  </tr>
<table>

I offer to enter attribute "kind" to specify any (new) tag as already
known tag.
http://html60.by.ru/site/html60/en/author/anytag_eng.htm


Dmitry Turin
http://html6.by.ru
http://sql4.by.ru
http://computer2.by.ru
Received on Tuesday, 24 April 2007 13:59:10 UTC

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