Open sydb opened 5 years ago
And, BTW, if anyone can tell me why the added <wwp:sst>
element defined by the t365.odd file appended to the above comment does not show up in the RELAX NG, I’d appreciate it. (And it shows up bizarrely in the HTML.)
Started work on this in branch issue-365-content_valList
So far, I think I have most of this working (using the sample ODD kindly provided by @sydb)[^1]—it's not the most elegant fix (nor is it particularly dry), but I think this handles elementSpec, macroSpec, and dataSpecs appropriately. However, it does not re-use the full template for attList/content/valList, but it perhaps should since, at present, what I've done does not yet attempt to do anything with dataRefs in combination with valLists.
Moreover, we may also want to finesse captions (e.g. "May contain" makes sense for element content models, but doesn't necessarily for valLists).
valList[@type='closed']
)May contain | Character data only. Legal values are:
|
valList[@type='semi']
)May contain | Character data only. Suggested values include:
|
content/macroRef
=> macroDef/content/valList[@type='closed']
)May contain | Character data only. Legal values are:
|
[^1]: I did have to modify the ODD slightly — most of the spec elements were following siblings of the schemaSpec
rather than children.
Ticket #154 has been mostly addressed — the RELAX NG content model output of a
<valList>
inside a<content>
seems to be correct. (At least, in the non-comprehensive test @martindholmes and I ran.) However, the HTML documentation (and presumably the PDF and others, as well) puts the controlled vocabulary in a screwy place. Instead of putting the information about the limited values allowed as the content of the element in question into the “May contain” section, it seems that it is either inserted at the bottom of both the “Content model” and “Schema Declaration” sections (for type=closed) or ignored (for type=semi or type=open).t365.odd.txt