List of articles   choose language


XML without XSL



Gold

Today HTML-element is so, that applied information is between its openning and closing tags. All attributes of openning tags are service's. But data are saved in database as records, which is extracted as XML-tags (i.e. many attributes contains applied information).

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). We shall name these tags as virtual.

html-, xml-file css-file displaying on screen
<a a1="x" a2="y" a3="z" a4="w">
a a1 {
  color: red;
  newstring:yes;
}
a a2 {
  color: blue;
  newstring:yes;
}
a a3 {
  color: green;
  newstring:yes;
}
<a a4="w">
  <span color="red">  x</span><br>
  <span color="blue"> y</span><br>
  <span color="green">z</span><br>
</a>
<tab>
  <a a1="v11" a2="v12" a3="v13">
  <a a1="v21" a2="v22" a3="v23">
  <a a1="v31" a2="v32" a3="v33">
</tab>
tab {
  kind:table
}
a {
  type:row;
  newstring:yes;
}
a a1 {
}
a a2 {
}
a a3 {
}
<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>

html60author



List of articles   choose language


Используются технологии uCoz