Restore required elements and ordering on vastInLine_type and vastWrapper_type - #59
Open
aleksUIX wants to merge 1 commit into
Conversation
vastInLine_type and vastWrapper_type use <xs:choice minOccurs="0" maxOccurs="unbounded">, which drops the cardinality of every child it contains. The elements still declare minOccurs="1", but inside a repeating optional choice that governs a single selection rather than the content model. The result is that an empty <Wrapper/> and an empty <InLine/> validate, singular elements such as AdSystem repeat, and element order is unconstrained. All three were rejected in 2.0 through 4.2. Change both to xs:sequence with the cardinality these elements have always had. No elements are added or removed. The 4.2 element order is kept because it is what the IAB VAST 4.1 and 4.2 sample files emit. Refs InteractiveAdvertisingBureau#58
aleksUIX
force-pushed
the
fix/vast-4-4-inline-wrapper-content-model
branch
from
August 9, 2026 06:46
0acd8d7 to
1a7d442
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
vastInLine_typeandvastWrapper_typeuse<xs:choice minOccurs="0" maxOccurs="unbounded">. That compositor drops the cardinality of everything inside it: the children still declareminOccurs="1", but within a repeating optional choice that governs a single selection rather than the content model. Reported in #58.Against the schema as it stands, all three of these validate:
All three were rejected in 2.0 through 4.2. This changes both types to
xs:sequencewith the cardinality these elements have always had. No elements are added or removed.On the ordering. I kept the 4.2 element order rather than the order the
xs:choicehappened to list them in, and that is not cosmetic. I tested the alternative: using 4.4's current listed order breaks all six VAST 4.1 and 4.2 files in VAST_Samples that validate against 4.4 today. The 4.2 order breaks none of them.Regression testing. Ran the 33 4.1 and 4.2 samples with the
versionattribute rewritten to 4.4, so the fixed-value constraint does not mask the content model. Six pass before and after this change, zero newly broken. VAST 4.0 samples were excluded deliberately, since they predateAdServingIdand would fail on a requirement that has held since 4.1 rather than on anything introduced here. Also confirmed the three cases above are now rejected and that ordinary inlines and wrappers still validate.Separate, not addressed here.
BlockedAdCategorieson Wrapper andExpireson InLine exist in 4.2 but are not declared anywhere invast_4.4.xsd, and neither is marked deprecated in the 4.3 text. A 4.4 wrapper carryingBlockedAdCategoriesis rejected today. Re-adding them needs type definitions, so I left them out of this change.If the group would rather keep order independence than restore cardinality, I am happy to close this. As covered in #58, XSD 1.0 cannot give both:
xs:allcaps every particle atmaxOccurs="1", andImpressionhas been 1..n since 2.0.