[Home] [By Thread] [By Date] [Recent Entries]

  • From: Dmitry Turin <dev3os@n...>
  • To: xml-dev@l...
  • Date: Wed, 20 Feb 2008 15:59:31 +0200

Manos,

MB> CSS namespace awareness is crucial for proper styling of XML documents.
MB> MB> [1] http://www.w3.org/TR/css3-namespace/

Styling will be applied after resolving namespace.
XML-file:

<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet    type="text/css"  href="my-style.css"?>
<document>
  <m>nnn</m>
  <s href="k.xml">
    <t>
      <a href="r.xml">Error</a>
    </t>
  </s>
</document>

CSS-file:

@namespace i "http://www.w3.org/2001/xinclude";
s {
  prefix:    i;
  element:   include;
}
t {
  prefix:    i;
  element:   fallback;
}
m {
  prefix:    i;
  color:     red;
}

---

instead of

<?xml version="1.0" encoding="utf-8"?>
<document>
  <i:m>nnn</m>
  <i:include href="k.xml" >
    <i:fallback>
      <a href="r.xml">Error</a>
    </i:fallback>
  </i:include>
</document>

with CSS-file:

@namespace i "http://www.w3.org/2001/xinclude";
i|m {
  color:     red;
}

===

P.S.
But i prefer:

s {
  namespace: http://www.w3.org/2001/xinclude;
  element:   include;
}
t {
  namespace: http://www.w3.org/2001/xinclude;
  element:   fallback;
}
m {
  namespace: http://www.w3.org/2001/xinclude;
  color:     red;
}



Dmitry Turin
HTML6     (6. 5.4)  http://html60.euro.ru
SQL5      (5.11.3)  http://sql50.euro.ru
Unicode7  (7. 2.1)  http://unicode70.euro.ru
Computer2 (2. 0.2)  http://computer20.euro.ru



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index]


Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member