cu-mkp / GR8975

Repository for "What is a Book in the 21st Century" GR8975, Spring 2017
2 stars 2 forks source link

Schema: how to handle "color" element #77

Open thuchacz opened 7 years ago

thuchacz commented 7 years ago

color is in the element list, but not within the "block" possibilities. Are we still interested in this element? I would add it to 4r_1.

tcatapano commented 7 years ago

It should be allowed in the block content model. I wil add

tcatapano commented 7 years ago

@thuchacz It is already in the block content model. What validation error are you getting?

thuchacz commented 7 years ago

@tcatapano When I add the "color" element in 4_r1 (it's not in the xml version in the master repository right now), I get this:

System ID: /Users/thu/Github/GR8975/xml/p004r_1.xml Main validation file: /Users/thu/Github/GR8975/xml/p004r_1.xml Schema: /Users/thu/Github/GR8975/schema/testentry.dtd Engine name: Xerces Severity: error Description: Unexpected element "color". The content of the parent element type must match "(activity|material|material_format|profession|ref|sub_recipe|tool|unit)". Start location: 25:28 End location: 25:33

tcatapano commented 7 years ago

@thuchacz Yes, that's because the parent element is probably <purpose>, not <block>, and <color> is not available in the content model of <purpose>. Depending on what we all decide about <purpose> it seems like it should have roughly the same model as <block> except with <purpose> removed.