Test results for Linux

test_001181_option_matchdirect_root

Test description

Test for direct element matching on the root element in the schema.
Legacy matching of record elements of this new root element should be turned
off in place of qualifying the root element via its helper.

Test status

 Pass

Run command

cat _INPUT_DATA_ ¦ xmlfy -S schema.dtd -l -M 0

Input data

1
1 2
1 2 3
1 2 3 4
1 2 3 4 5
1 2 3 4 5 6
1 2 3 4 5 6 7
1 2 3 4 5 6 7 8
1 2 3 4 5 6 7 8 9
1 2 3 4 5 6 7 8 9 10
1 2 3 4 5 6 7 8 9 10 11
1 2 3 4 5 6 7 8 9 10 11 12
1 2 3 4 5 6 7 8 9 10 11 12 13
1 2 3 4 5 6 7 8 9 10 11 12 13 14
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20

Schema

<!ELEMENT a (cats, b, c, cats, b)>
<!ELEMENT cats(tabby, musical,tabby, musical)>
<!ELEMENT musical(paw,stage)>
<!ELEMENT stage(paw,tabby)>
<!ELEMENT paw(#PCDATA)>
<!ELEMENT tabby (#PCDATA)>
<!ELEMENT b (#PCDATA)>
<!ELEMENT c (#PCDATA)>
<!ELEMENT musical(w,x,y,z)>

Output result

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE a SYSTEM "schema.dtd">
<a>
  <cats1>
    <tabby>1</tabby>
    <musical>
      <paw>2</paw>
      <stage>
        <paw>3</paw>
        <tabby>4</tabby>
      </stage>
    </musical>
    <tabby>5</tabby>
    <musical>
      <paw>6</paw>
      <stage>
        <paw>7</paw>
        <tabby>8</tabby>
      </stage>
    </musical>
  </cats1>
  <b1>9</b1>
  <c1>10</c1>
  <cats2>
    <tabby>11</tabby>
    <musical>
      <paw>12</paw>
      <stage>
        <paw>13</paw>
        <tabby>14</tabby>
      </stage>
    </musical>
    <tabby>15</tabby>
    <musical>
      <paw>16</paw>
      <stage>
        <paw>17</paw>
        <tabby>18</tabby>
      </stage>
    </musical>
  </cats2>
  <b2>19</b2>
</a>

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