Skip to content

Commit

Permalink
hanks letter with complete schema from class
Browse files Browse the repository at this point in the history
  • Loading branch information
ebeshero committed Sep 18, 2024
1 parent 677702d commit 83614ba
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 4 deletions.
19 changes: 18 additions & 1 deletion Class-Examples/Relax-NG/hanksLetter/hanksClassStarter.rnc
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,29 @@ start = twinkie
twinkie = element xml {dateLine, fw, greeting, p+, closing, signed?, metadata}

dateLine = element dateLine {when, text}
when = attribute when {xsd:date}
when = attribute when {xsd:date | xsd:gYearMonth | xsd:gYear}

fw = element fw {line+}
line = element line {text}

greeting = element greeting { mixed{mistake*} }
mistake = element mistake {orig, reg}
orig = element orig {text}
reg = element reg {text}

p = element p {mixed{(rend | mistake)*}}
rend = element rend {mixed{mistake*}}
closing = element closing {mixed{mistake*}}
signed = element signed {text}
metadata = element metadata {source}
source = element source {url}

url = attribute url {xsd:anyURI}








Expand Down
6 changes: 3 additions & 3 deletions Class-Examples/Relax-NG/hanksLetter/hanksTypewriter.xml
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="hanksLetter.rnc" type="application/relax-ng-compact-syntax"?>

<!-- 2024-09-16 ebb: Above is my associated schema line. In oXygen, go to
Document >> Schema >> Associate Schema. Browse for your .rnc file and associate it,
and choose Relative file association and Relax NG Compact Syntax.
oXygen then generates this line for you.
Use the red checkmark in oXygen to update validation as you make changes
from here to either the XML or the RelaxNG !
-->

<?xml-model href="hanksClassStarter.rnc" type="application/relax-ng-compact-syntax"?>
<xml>
<dateline when="2012-07-13">13 July 2012</dateline>
<dateLine when="2012-07-13">13 July 2012</dateLine>
<fw>
<line>PLAYTONE</line>
<line>Film Television Music Typewriters</line>
Expand Down

0 comments on commit 83614ba

Please sign in to comment.