Skip to content

Content models for Part Div and NonStruct #7

@davidcarlisle

Description

@davidcarlisle

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)

Metadata

Metadata

Assignees

Labels

enhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions