Test results for Linux

test_002030_dtd_complex

Test description

Test for DTD schema handling with more complex data.

Test status

 Pass

Run command

cat _INPUT_DATA_ ¦ xmlfy -S schema.dtd -F , -q -t

Input data

Team, Won, Lost, Drawn
"Barcelona", 5, 1, 2
"Manchester United", 4, 2, 2
,,,
"AC Milan", 2, 2, 4

"  Rail Madrid", 2, 2, 4

Schema

<!ELEMENT soccer (heading) (match*)>
<!ELEMENT heading (team, won, lost, drawn)>
<!ELEMENT match (team, won, lost, drawn)>
<!ELEMENT team (#PCDATA)>
<!ELEMENT won (#PCDATA)>
<!ELEMENT lost (#PCDATA)>
<!ELEMENT drawn (#PCDATA)>

Output result

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE soccer SYSTEM "schema.dtd">
<soccer>
  <heading>
    <team>Team</team>
    <won>Won</won>
    <lost>Lost</lost>
    <drawn>Drawn</drawn>
  </heading>
  <match>
    <team>Barcelona</team>
    <won>5</won>
    <lost>1</lost>
    <drawn>2</drawn>
  </match>
  <match>
    <team>Manchester United</team>
    <won>4</won>
    <lost>2</lost>
    <drawn>2</drawn>
  </match>
  <match>
    <team></team>
    <won></won>
    <lost></lost>
    <drawn></drawn>
  </match>
  <match>
    <team>AC Milan</team>
    <won>2</won>
    <lost>2</lost>
    <drawn>4</drawn>
  </match>
  <match>
    <team>Rail Madrid</team>
    <won>2</won>
    <lost>2</lost>
    <drawn>4</drawn>
  </match>
</soccer>

Goto:   Top of page.   Section "Environment".   Section "Summary".   Section "Test cases".