-
Notifications
You must be signed in to change notification settings - Fork 3
Description
The current schema follows ISO 32005 in specifying the content models of structure elements. This leaves Part, Div and NonStruct allowing a fairly large set of child elements.
The PDF 2.0 spec (ISO 32000-2) specifies that the allowed content of each of these is context sensitive and is the allowed content of the parent.
RelaxNG could model this but at some cost in the complication of the schema, essentially adding a new pattern for each context, so for example
Ruby currently allows a NonStruct child (which then allows anything).
this could be changed to allow a NonStruct.Ruby pattern which would be the same pdf2:NonStruct element but with a content model matching that of Ruby.
This would have to be repeated for all uses of all these elements.
I think probably I should do this, as it would give better validation at the cost of making the schema perhaps less readable (and quite a bit longer) but open to suggestions (@u-fischer @zauguin)