newtfire / textEncoding-Hub

shared repo for DIGIT 110: Text Encoding class at Penn State Erie, The Behrend College
https://newtfire.github.io/textEncoding-Hub/
Creative Commons Zero v1.0 Universal
17 stars 1 forks source link

Relax NG 3 #25

Closed bwm5473 closed 3 years ago

bwm5473 commented 4 years ago

Hey, it's Brett. I've been trying to fix my third RelaxNG exercise, but I'm a bit stumped. I was hoping to make the title and the author name their own individual tags, but I'm not sure . The xml code is also labeling the lines as syntax errors, so I might be stuck. Any ideas what I'm doing wrong here, and any suggestions on what I can do to fix it?

Here are the codes for xml and RelaxNG: If_relax_ng.zip

ebeshero commented 3 years ago

@bwm5473 I am embarrassed to have missed this post from long ago, but you may want to review it again now that you're needing a schema for the project. Briefly the problem is that you needed to define mixed{} content for elements like <heading>, since they are a mix of text flowing unpredictably around elements. Your schema is setting things in a strict sequence which does not match your XML.

Also, you only permitted line elements to contain an attribute, so your schema forbids those elements to have any content at all besides just the tags.