XML/CSS Style/xlink — различия между версиями

Материал из Web эксперт
Перейти к: навигация, поиск
 
м (1 версия)
 
(нет различий)

Текущая версия на 08:26, 26 мая 2010

Color for xlink

File: Data.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="Style.css"?>
<document xmlns:xlink="http://www.w3.org/1999/xlink">
  <page>
    <title>Images With XLink</title>
    <paragraph>This 
      <link xlink:type="simple" 
            xlink:show="embed" 
            xlink:actuate="onLoad" 
            xlink:title="Lions" 
            xlink:href="lions.jpg">link
      </link>
      should embed an image but doesn"t.
    </paragraph>
  </page>
</document>
File: Style.css
title{
  display:block;
  color: #000000;
  font-size: 30px;
  font-weight: bold;
}
paragraph {
  display:block;
  padding:10px;
  margin: 10px;
}
link {
  color: #0000FF;
  text-decoration: underline;
}



link style

File: Data.xml
<?xml version="1.0"?>
<?xml-stylesheet type="text/css" href="Style.css"?>
<document xmlns:xlink="http://www.w3.org/1999/xlink">
  <page>
    <title>Images With XLink</title>
    <paragraph>This 
      <link xlink:type="simple" 
            xlink:show="replace" 
            xlink:actuate="onRequest" 
            xlink:title="Lions" 
            xlink:href="lions.jpg">link
      </link>
      will replace the content with an image.
    </paragraph>
  </page>
</document>
File: Style.css
title{
  display:block;
  color: #000000;
  font-size: 30px;
  font-weight: bold;
}
paragraph {
  display:block;
  padding:10px;
  margin: 10px;
}
link {
  color: #0000FF;
  text-decoration: underline;
}



Style for xlink

File: Data.xml
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/css" href="Style.css" ?>
<page xmlns:xlink="http://www.w3.org/1999/xlink">
  <paragraph>
    <link xlink:type="simple" xlink:show="replace"
      xlink:actuate="onRequest"
      xlink:title="This link is like a link between pages in HTML"
      xlink:href="http://www.wbex.ru">
      Click here
    </link>
    to be taken to a new page
  </paragraph>
</page>
File: Style.css
page {
  display:block;
  padding:10px;
  color:#000000; 
  background-color:#FFFFFF;
  border-style:solid; 
  border-width:2px; 
  border-color:#000000;
}
paragraph {
  display:block;
  font-family:arial, verdana, sans-serif; 
  font-size:20px;
  padding:20px;
  color:#000000; 
  background-color:#FFFFFF;
}
link {
  display:inline;
  color:#0000FF;
  text-decoration:underline;
}