Test results for Linux

test_001180_option_matchdirect_element

Test description

Test for direct element matching on a targeted element in the schema. The
target element should become the root element and should only appear once.
Legacy matching of record elements of this new root element should be turned
off in place of qualifying the new root element via its helper.

Test status

 Pass

Run command

cat _INPUT_DATA_ ¦ xmlfy -S schema.dtd -l -M cats -s

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 cats SYSTEM "schema.dtd">
<cats>
  <tabby1>1</tabby1>
  <musical1>
    <paw>2</paw>
    <stage>
      <paw>3</paw>
      <tabby>4</tabby>
    </stage>
  </musical1>
  <tabby2>5</tabby2>
  <musical2>
    <paw>6</paw>
    <stage>
      <paw>7</paw>
      <tabby>8</tabby>
    </stage>
  </musical2>
</cats>
<cats_summary>
  <version>1.5.7</version>
  <timestamp>
    <start>Wed Feb  5 22:22:33 2020</start>
    <end>Wed Feb  5 22:22:33 2020</end>
  </timestamp>
  <md5_input>7d2e599de6b7fa0b0c1d1035d933ffc8</md5_input>
  <md5_output>6764892005c5f5122e5a99508f5bcc90</md5_output>
  <sha512_input>758d6938432a08006f7b4ea9bb8616bc8fa01665f0fcfeeeb67db69d4292f78830dc6d04babd6c3e7360240a2688df0bb83dfa596aa6c4bfde5264a0483b954b</sha512_input>
  <sha512_output>0be29499ebae372e53b5a5b54594812d6f50e5e992e22a71f27bc092c3d6d9bf97b6d8f449336cc0524ac166b14da491cf64a7625c42dd671362861d957f4df4</sha512_output>
  <args>
    <command>
      <arg>xmlfy</arg>
      <arg>-X</arg>
      <arg>newline</arg>
      <arg>unix</arg>
      <arg>-S</arg>
      <arg>schema.dtd</arg>
      <arg>-l</arg>
      <arg>-M</arg>
      <arg>cats</arg>
      <arg>-s</arg>
    </command>
    <schema>
    </schema>
  </args>
  <separator>
    <level1>
      <delimiter>NEWLINE</delimiter>
    </level1>
    <level2>
      <delimiter>WHITESPACE</delimiter>
    </level2>
  </separator>
  <schema>
    <default>false</default>
    <file>schema.dtd</file>
    <interpreter>DTD</interpreter>
    <parent>
      <name>cats</name>
      <matchmode>DIRECT</matchmode>
    </parent>
    <records>
      <read>20</read>
      <expelled>0</expelled>
      <matched>1</matched>
      <unmatched>19</unmatched>
      <ignoredblank>0</ignoredblank>
      <printed>1</printed>
    </records>
  </schema>
</cats_summary>

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