Test results for Linux

test_003040_rnc_with_args

Test description

Test for xmlfy argument handling inside a RNC schema file.

Test status

 Pass

Run command

cat _INPUT_DATA_ ¦ xmlfy -S schema.rnc

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

## xmlfy-args: -F2 , -q -t -s
start = football
football = element football { heading ¦ match* }
heading = element heading { team, won, lost, drawn }
match = element match { team, won, lost, drawn }
team = element team { text }
won = element won { text }
lost = element lost { text }
drawn = element drawn { text }

Output result

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE football SYSTEM "schema.rnc">
<football>
  <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>
</football>
<football_summary>
  <version>1.5.7</version>
  <timestamp>
    <start>Mon Feb  3 23:37:18 2020</start>
    <end>Mon Feb  3 23:37:18 2020</end>
  </timestamp>
  <md5_input>f9ebab051769fda3e1fd9c16213aaaa1</md5_input>
  <md5_output>eecf5531374c1b921603f4c7e19b15e6</md5_output>
  <sha512_input>23334790845cccc13406748378383393ae095da0b4a906f218f8d2d94877b00ce7d8798a38f54f8dff5cef55bd1c5b8c7343399bcfa8e2e141ab528a1c4dcd0a</sha512_input>
  <sha512_output>1009298158df4846aec2ea8fe6ce3cb0ed93b09f1932a9abf054f685626046f9d270333ab2de1d72c8bd3121d522c30a12addff76b33762ed433fd3da9cbbbc5</sha512_output>
  <args>
    <command>
      <arg>xmlfy</arg>
      <arg>-X</arg>
      <arg>newline</arg>
      <arg>unix</arg>
      <arg>-S</arg>
      <arg>schema.rnc</arg>
    </command>
    <schema>
      <arg>-F2</arg>
      <arg>,</arg>
      <arg>-q</arg>
      <arg>-t</arg>
      <arg>-s</arg>
    </schema>
  </args>
  <separator>
    <level1>
      <delimiter>NEWLINE</delimiter>
    </level1>
    <level2>
      <delimiter>,</delimiter>
    </level2>
  </separator>
  <schema>
    <default>false</default>
    <file>schema.rnc</file>
    <interpreter>RNC</interpreter>
    <parent>
      <name>football</name>
      <matchmode>DEFAULT</matchmode>
      <elements>
        <heading>
          <match_control>MATCH_ONE</match_control>
          <instance1>
            <fields>4</fields>
          </instance1>
        </heading>
        <match>
          <match_control>MATCH_NONE_OR_MANY</match_control>
          <instance1>
            <fields>4</fields>
          </instance1>
        </match>
      </elements>
    </parent>
    <records>
      <elements>
        <heading>
          <total>1</total>
          <instance1>1</instance1>
        </heading>
        <match>
          <total>5</total>
          <instance1>5</instance1>
        </match>
      </elements>
      <read>7</read>
      <expelled>0</expelled>
      <matched>6</matched>
      <unmatched>0</unmatched>
      <ignoredblank>1</ignoredblank>
      <printed>6</printed>
    </records>
  </schema>
</football_summary>

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