Test results for Linux

test_003020_rnc_simple_with_comments

Test description

Test for comment handling in 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 4 2 2
 
Milan 2 2 4

Schema

## start = soccer
## soccer = element soccer { heading ¦ match* }
start = football
 
football = element football { heading ¦ match* } ## Soccer is the real football
heading = element heading { team, won, lost, drawn }
match = element match { team, won, lost, drawn }
     ## these are fields
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</team>
    <won>4</won>
    <lost>2</lost>
    <drawn>2</drawn>
  </match>
  <match>
    <team>Milan</team>
    <won>2</won>
    <lost>2</lost>
    <drawn>4</drawn>
  </match>
</football>

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