Zoo tutorials: [ SQL | Linux | XML ]

A Gentle Introduction to xml

Using modular xhtml

Using modular xhtml

The quiz node consists of a qu and a d. Each of these may contain character data or Inline xhtml.

The definition shown uses %Block.mix; where it should use %Inline.mix;


ValidInvalid
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE quiz SYSTEM "L02Q2.dtd">
<quiz>
  <qu>RG...</qu>
  <d><span style="color:blue">
     B</span></d>
  <d><span style="color:aqua">
     A</span></d>
  <d><span style="color:amber">
     A</span></d>
</quiz>
<!DOCTYPE quiz SYSTEM "L02Q2.dtd">
<quiz>
  <qu><nix>foo</nix></qu>
    <d>baa</d>
    <d>bar</d>
    <d>ban</d>
</quiz>
<!DOCTYPE quiz SYSTEM "L02Q2.dtd">
<quiz>
  <qu><i>Alice</i> sends secrets to...</qu>
    <d>Ben</d>
    <d>Bill</d>
    <d>Bob</d>
</quiz>
<!DOCTYPE quiz SYSTEM "L02Q2.dtd">
<quiz>
  <qu><p>Even good, odd bad...</p></qu>
    <d>Pirity bits</d>
    <d>Star Trek Movies</d>
    <d>Star Wars Movies</d>
</quiz>
<!DOCTYPE quiz SYSTEM "L02Q2.dtd">
<quiz>
  <qu>What is Scott&apos;s password?</qu>
    <d>lion</d>
    <d>tiger</d>
    <d>zebra</d>
</quiz>
<!DOCTYPE quiz SYSTEM "L02Q2.dtd">
<quiz>
  <qu><i wrong="a">Who<i> won the endian wars?</qu>
    <d>Big</d>
    <d>Little</d>
    <d>Swift</d>
</quiz>