-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
56 additions
and
0 deletions.
There are no files selected for viewing
34 changes: 34 additions & 0 deletions
34
Class-Examples/Relax-NG/goodMorning/drbSchema-goodMorning.rnc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
start = xml | ||
xml = element xml {source, poem} | ||
|
||
source = element source {title, author, date } | ||
title = element title {level, text} | ||
level = attribute level {"book" | "inner" } | ||
author = element author { text} | ||
date = element date {when, empty } | ||
# I am going to choose to use the reserve word | ||
# even though you don't have to. Here is another | ||
# way to write this: | ||
# date = element date {when} | ||
when = attribute when {xsd:date | xsd:gYear} | ||
|
||
poem = element poem {title, lg+ } | ||
|
||
lg = element lg {ln+} | ||
ln = element ln {n, mixed{ (placeName | place | motif)* } } | ||
placeName = element placeName {ref, text} | ||
place = element place {ref, text} | ||
motif = element motif {text} | ||
|
||
n = attribute n {xsd:integer} | ||
ref = attribute ref {"NYC-Harlem" | "NYC-Man" | text} | ||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
start = xml | ||
xml = element xml {source, poem} | ||
source = element source {title, author, date} | ||
title = element title {level, text} | ||
author = element author {text} | ||
date = element date {when} | ||
when = attribute when {xsd:date | xsd:gYearMonth | xsd:gYear} | ||
level = attribute level {"inner" | "book"} | ||
|
||
|
||
poem = element poem {title, lg*} | ||
lg = element lg {ln+} | ||
ln = element ln {n, mixed{(placeName | place | motif)*}} | ||
n = attribute n {xsd:integer} | ||
|
||
placeName = element placeName {ref, text} | ||
place = element place {ref, text} | ||
motif = element motif {text} | ||
ref = attribute ref {"NYC-PennSt" | "NYC-Man" | "NYC-Harlem" | "NYC" | "Cuba" | "PR" | "Ha" | "Ja" | "Fla" | "La" | "Ga"| "NYC-Brook" | "NYC-Bronx"} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters