Version slice: 52 elements · 36 attributes
Source
IAB 官方仓库仅提供 3.0 draft XSD(vast3_draft.xsd;vendor 于 xsd/3.0.xsd),与 3.0 final 规范存在少量差异(见 catalog.test.ts EXEMPTIONS)
Annotated element tree × Real samples
Fully expanded tree on the left (trailing figure is cardinality: 1 / 0..1 / 1..* / 0..*): per-node ▾ collapse, “Collapse all” for the outline; translations hidden by default — toggle “Show translations”; real XML samples on the right; clicking an element name highlights it on both sides
<VAST>@version*0..1…+161响应根元素,version 属性声明 VAST 版本号。
<Ad>one of InLine | Wrapper@id@sequence0..*…+157顶层广告单元,包裹响应中的每个广告;序列广告(Ad Pod)通过 sequence 排序。
<InLine>0..1…+81完整广告数据(内联广告):创意、追踪与元数据的完整定义。与 Wrapper 二选一。
<AdSystem>@version1广告服务器(Ad Server)标识,version 属性注明其版本。
<AdTitle>1广告标题,供广告投放系统与报表展示。
<Impression>uri@id1..*曝光(Impression)追踪地址:广告开始播放时请求,用于计数计费;可多个。
<Description>0..1广告描述文本。
<Advertiser>@id3.0+0..1广告主名称,4.1 起可提供 id。
<Pricing>decimal@model*@currency*3.0+0..1定价信息(3.0 引入,4.0 起弃用):价格应在交易层传递而非 VAST 内。
<Survey>uri@type(3.0+)0..1调研问卷地址(4.1 起弃用)。
<Error>uri0..*错误上报地址:播放失败时由播放器请求,[ERRORCODE] 宏携带错误码。
<Creatives>1…+65创意集合容器。
<Creative>@id@sequence@AdID@apiFramework0..*…+64单个创意:线性(Linear)、非线性(NonLinearAds)或伴随(CompanionAds)之一。
<Linear>@skipoffset(3.0+)0..1…+31线性广告(Linear Ad):随内容时间轴播放的前贴/中贴/后贴视频广告。
<Icons>3.0+0..1…+8图标集合容器(如 AdChoices 广告选择标识)。
<Icon>@program@width*@height*@xPosition*@yPosition*@apiFramework@offset@duration0..*…+7单个图标:位置(xPosition/yPosition)与尺寸,资源为静态图/iframe/HTML。
<StaticResource>uri@creativeType0..1静态资源(图片等)地址,creativeType 注明 MIME 类型。
<IFrameResource>uri0..1iframe 资源地址。
<HTMLResource>0..1内联 HTML 资源(直接嵌入标记)。
<IconClicks>3.0+0..1…+2图标点击行为容器(3.0 引入)。
<IconClickThrough>uri0..1图标点击跳转地址。
<IconClickTracking>uri@id0..*图标点击追踪地址。
<IconViewTracking>uri0..1图标曝光追踪地址。
<Duration>duration1时长:线性广告为必填(HH:MM:SS);非线性(4.4)在时基媒体/事件场景下必填。
<Skipoffset>offset3.00..1跳过时间点(元素形态,仅 VAST 3.0;4.0 起改用 Linear 的 skipoffset 属性)。
<AdParameters>@xmlEncoded(3.0+)0..1传递给创意脚本的初始化参数,xmlEncoded 注明是否 XML 编码。
<TrackingEvents>0..1…+1追踪事件集合容器。
<Tracking>uri@event*@offset(3.0+)0..*单个追踪事件:event 指定事件名(start、quartile、complete、progress 等),文本为上报地址;progress 事件用 offset 指定时间点。
<VideoClicks>0..1…+3视频点击行为容器。
<ClickThrough>uri@id0..1点击跳转(ClickThrough)目标地址:用户点击广告后打开的落地页。
<ClickTracking>uri@id0..*点击追踪(ClickTracking)地址:与跳转分离的点击计数上报。
<CustomClick>uri@id0..*自定义点击追踪地址。
<MediaFiles>1…+1媒体文件集合容器。
<MediaFile>uri@id@delivery@type*@width*@height*@bitrate@minBitrate(3.0+)@maxBitrate(3.0+)@scalable(3.0+)@maintainAspectRatio(3.0+)@apiFramework@codec(3.0+)1..*可播放媒体素材地址:delivery(progressive/streaming)、MIME 类型、宽高与码率供播放器择优。
<CompanionAds>@required(3.0+)0..1…+10伴随广告(Companion Ads)集合容器:与主广告同时展示的广告位。
<Companion>@id@width*@height*@assetWidth(3.0+)@assetHeight(3.0+)@expandedWidth@expandedHeight@apiFramework@adSlotId(3.0+)0..*…+9单个伴随广告:独立尺寸的广告位创意(如播放器旁 300×250 横幅)。
<StaticResource>uri@creativeType0..1静态资源(图片等)地址,creativeType 注明 MIME 类型。
<IFrameResource>uri0..1iframe 资源地址。
<HTMLResource>0..1内联 HTML 资源(直接嵌入标记)。
<AltText>0..1伴随广告的替代文本(无障碍与加载失败兜底)。
<TrackingEvents>0..1…+1追踪事件集合容器。
<Tracking>uri@event*@offset(3.0+)0..*单个追踪事件:event 指定事件名(start、quartile、complete、progress 等),文本为上报地址;progress 事件用 offset 指定时间点。
<CompanionClickThrough>uri@id0..1伴随广告点击跳转地址。
<CompanionClickTracking>uri@id3.0+0..*伴随广告点击追踪地址。
<AdParameters>@xmlEncoded3.0+0..1传递给创意脚本的初始化参数,xmlEncoded 注明是否 XML 编码。
<NonLinearAds>0..1…+20非线性广告容器:叠加在播放内容之上、不阻断播放的广告形式。
<NonLinear>@id@width*@height*@expandedWidth@expandedHeight@scalable@maintainAspectRatio@minSuggestedDuration@apiFramework0..*…+8单个非线性(NonLinear)创意:叠加图/浮层,资源为静态图/iframe/HTML;4.4 起亦支持 MediaFiles 媒体投递。
<StaticResource>uri@creativeType0..1静态资源(图片等)地址,creativeType 注明 MIME 类型。
<IFrameResource>uri0..1iframe 资源地址。
<HTMLResource>0..1内联 HTML 资源(直接嵌入标记)。
<AdParameters>@xmlEncoded3.0+0..1传递给创意脚本的初始化参数,xmlEncoded 注明是否 XML 编码。
<TrackingEvents>0..1…+1追踪事件集合容器。
<Tracking>uri@event*@offset(3.0+)0..*单个追踪事件:event 指定事件名(start、quartile、complete、progress 等),文本为上报地址;progress 事件用 offset 指定时间点。
<NonLinearClickThrough>uri0..1非线性广告点击跳转地址。
<NonLinearClickTracking>uri@id3.0+0..*非线性广告点击追踪地址。
<CompanionAds>@required(3.0+)0..1…+10伴随广告(Companion Ads)集合容器:与主广告同时展示的广告位。
<Companion>@id@width*@height*@assetWidth(3.0+)@assetHeight(3.0+)@expandedWidth@expandedHeight@apiFramework@adSlotId(3.0+)0..*…+9单个伴随广告:独立尺寸的广告位创意(如播放器旁 300×250 横幅)。
<StaticResource>uri@creativeType0..1静态资源(图片等)地址,creativeType 注明 MIME 类型。
<IFrameResource>uri0..1iframe 资源地址。
<HTMLResource>0..1内联 HTML 资源(直接嵌入标记)。
<AltText>0..1伴随广告的替代文本(无障碍与加载失败兜底)。
<TrackingEvents>0..1…+1追踪事件集合容器。
<Tracking>uri@event*@offset(3.0+)0..*单个追踪事件:event 指定事件名(start、quartile、complete、progress 等),文本为上报地址;progress 事件用 offset 指定时间点。
<CompanionClickThrough>uri@id0..1伴随广告点击跳转地址。
<CompanionClickTracking>uri@id3.0+0..*伴随广告点击追踪地址。
<AdParameters>@xmlEncoded3.0+0..1传递给创意脚本的初始化参数,xmlEncoded 注明是否 XML 编码。
<CompanionAds>@required(3.0+)0..1…+10伴随广告(Companion Ads)集合容器:与主广告同时展示的广告位。
<Companion>@id@width*@height*@assetWidth(3.0+)@assetHeight(3.0+)@expandedWidth@expandedHeight@apiFramework@adSlotId(3.0+)0..*…+9单个伴随广告:独立尺寸的广告位创意(如播放器旁 300×250 横幅)。
<StaticResource>uri@creativeType0..1静态资源(图片等)地址,creativeType 注明 MIME 类型。
<IFrameResource>uri0..1iframe 资源地址。
<HTMLResource>0..1内联 HTML 资源(直接嵌入标记)。
<AltText>0..1伴随广告的替代文本(无障碍与加载失败兜底)。
<TrackingEvents>0..1…+1追踪事件集合容器。
<Tracking>uri@event*@offset(3.0+)0..*单个追踪事件:event 指定事件名(start、quartile、complete、progress 等),文本为上报地址;progress 事件用 offset 指定时间点。
<CompanionClickThrough>uri@id0..1伴随广告点击跳转地址。
<CompanionClickTracking>uri@id3.0+0..*伴随广告点击追踪地址。
<AdParameters>@xmlEncoded3.0+0..1传递给创意脚本的初始化参数,xmlEncoded 注明是否 XML 编码。
<ViewableImpression>@id3.0+0..*…+3可见性(Viewability)追踪容器,按可见结果分组上报。
<Viewable>uri0..*广告被判定为可见(viewable)时请求的地址。
<NotViewable>uri0..*广告被判定为不可见时请求的地址。
<ViewUndetermined>uri0..*可见性无法判定时请求的地址。
<AdVerifications>3.00..1广告验证(Ad Verification)容器:承载 OMID 等验证供应商的执行代码(4.0 引入)。
<Extensions>xs:any content0..1…+1扩展容器:xs:any,任意厂商自定义内容。
<Extension>xs:any content@type0..*单个扩展项,type 标识用途;4.4 起标准化 AdCOM 信令(plcmt/pos/playbackmethod/attr)。
<Wrapper>@followAdditionalWrappers(3.0+)@allowMultipleAds(3.0+)@fallbackOnNoAd(3.0+)0..1…+72重定向包装器:不含创意本体,通过 VASTAdTagURI 指向下游广告服务器再次请求。与 InLine 二选一。
<AdSystem>@version1广告服务器(Ad Server)标识,version 属性注明其版本。
<Impression>uri@id0..*曝光(Impression)追踪地址:广告开始播放时请求,用于计数计费;可多个。
<Error>uri0..*错误上报地址:播放失败时由播放器请求,[ERRORCODE] 宏携带错误码。
<VASTAdTagURI>uri1Wrapper 的下游广告请求地址:播放器据此发起二次请求获取真正的创意。
<Creatives>1…+65创意集合容器。
<Creative>@id@sequence@AdID@apiFramework0..*…+64单个创意:线性(Linear)、非线性(NonLinearAds)或伴随(CompanionAds)之一。
<Linear>@skipoffset(3.0+)0..1…+31线性广告(Linear Ad):随内容时间轴播放的前贴/中贴/后贴视频广告。
<Icons>3.0+0..1…+8图标集合容器(如 AdChoices 广告选择标识)。
<Icon>@program@width*@height*@xPosition*@yPosition*@apiFramework@offset@duration0..*…+7单个图标:位置(xPosition/yPosition)与尺寸,资源为静态图/iframe/HTML。
<StaticResource>uri@creativeType0..1静态资源(图片等)地址,creativeType 注明 MIME 类型。
<IFrameResource>uri0..1iframe 资源地址。
<HTMLResource>0..1内联 HTML 资源(直接嵌入标记)。
<IconClicks>3.0+0..1…+2图标点击行为容器(3.0 引入)。
<IconClickThrough>uri0..1图标点击跳转地址。
<IconClickTracking>uri@id0..*图标点击追踪地址。
<IconViewTracking>uri0..1图标曝光追踪地址。
<Duration>duration1时长:线性广告为必填(HH:MM:SS);非线性(4.4)在时基媒体/事件场景下必填。
<Skipoffset>offset3.00..1跳过时间点(元素形态,仅 VAST 3.0;4.0 起改用 Linear 的 skipoffset 属性)。
<AdParameters>@xmlEncoded(3.0+)0..1传递给创意脚本的初始化参数,xmlEncoded 注明是否 XML 编码。
<TrackingEvents>0..1…+1追踪事件集合容器。
<Tracking>uri@event*@offset(3.0+)0..*单个追踪事件:event 指定事件名(start、quartile、complete、progress 等),文本为上报地址;progress 事件用 offset 指定时间点。
<VideoClicks>0..1…+3视频点击行为容器。
<ClickThrough>uri@id0..1点击跳转(ClickThrough)目标地址:用户点击广告后打开的落地页。
<ClickTracking>uri@id0..*点击追踪(ClickTracking)地址:与跳转分离的点击计数上报。
<CustomClick>uri@id0..*自定义点击追踪地址。
<MediaFiles>1…+1媒体文件集合容器。
<MediaFile>uri@id@delivery@type*@width*@height*@bitrate@minBitrate(3.0+)@maxBitrate(3.0+)@scalable(3.0+)@maintainAspectRatio(3.0+)@apiFramework@codec(3.0+)1..*可播放媒体素材地址:delivery(progressive/streaming)、MIME 类型、宽高与码率供播放器择优。
<CompanionAds>@required(3.0+)0..1…+10伴随广告(Companion Ads)集合容器:与主广告同时展示的广告位。
<Companion>@id@width*@height*@assetWidth(3.0+)@assetHeight(3.0+)@expandedWidth@expandedHeight@apiFramework@adSlotId(3.0+)0..*…+9单个伴随广告:独立尺寸的广告位创意(如播放器旁 300×250 横幅)。
<StaticResource>uri@creativeType0..1静态资源(图片等)地址,creativeType 注明 MIME 类型。
<IFrameResource>uri0..1iframe 资源地址。
<HTMLResource>0..1内联 HTML 资源(直接嵌入标记)。
<AltText>0..1伴随广告的替代文本(无障碍与加载失败兜底)。
<TrackingEvents>0..1…+1追踪事件集合容器。
<Tracking>uri@event*@offset(3.0+)0..*单个追踪事件:event 指定事件名(start、quartile、complete、progress 等),文本为上报地址;progress 事件用 offset 指定时间点。
<CompanionClickThrough>uri@id0..1伴随广告点击跳转地址。
<CompanionClickTracking>uri@id3.0+0..*伴随广告点击追踪地址。
<AdParameters>@xmlEncoded3.0+0..1传递给创意脚本的初始化参数,xmlEncoded 注明是否 XML 编码。
<NonLinearAds>0..1…+20非线性广告容器:叠加在播放内容之上、不阻断播放的广告形式。
<NonLinear>@id@width*@height*@expandedWidth@expandedHeight@scalable@maintainAspectRatio@minSuggestedDuration@apiFramework0..*…+8单个非线性(NonLinear)创意:叠加图/浮层,资源为静态图/iframe/HTML;4.4 起亦支持 MediaFiles 媒体投递。
<StaticResource>uri@creativeType0..1静态资源(图片等)地址,creativeType 注明 MIME 类型。
<IFrameResource>uri0..1iframe 资源地址。
<HTMLResource>0..1内联 HTML 资源(直接嵌入标记)。
<AdParameters>@xmlEncoded3.0+0..1传递给创意脚本的初始化参数,xmlEncoded 注明是否 XML 编码。
<TrackingEvents>0..1…+1追踪事件集合容器。
<Tracking>uri@event*@offset(3.0+)0..*单个追踪事件:event 指定事件名(start、quartile、complete、progress 等),文本为上报地址;progress 事件用 offset 指定时间点。
<NonLinearClickThrough>uri0..1非线性广告点击跳转地址。
<NonLinearClickTracking>uri@id3.0+0..*非线性广告点击追踪地址。
<CompanionAds>@required(3.0+)0..1…+10伴随广告(Companion Ads)集合容器:与主广告同时展示的广告位。
<Companion>@id@width*@height*@assetWidth(3.0+)@assetHeight(3.0+)@expandedWidth@expandedHeight@apiFramework@adSlotId(3.0+)0..*…+9单个伴随广告:独立尺寸的广告位创意(如播放器旁 300×250 横幅)。
<StaticResource>uri@creativeType0..1静态资源(图片等)地址,creativeType 注明 MIME 类型。
<IFrameResource>uri0..1iframe 资源地址。
<HTMLResource>0..1内联 HTML 资源(直接嵌入标记)。
<AltText>0..1伴随广告的替代文本(无障碍与加载失败兜底)。
<TrackingEvents>0..1…+1追踪事件集合容器。
<Tracking>uri@event*@offset(3.0+)0..*单个追踪事件:event 指定事件名(start、quartile、complete、progress 等),文本为上报地址;progress 事件用 offset 指定时间点。
<CompanionClickThrough>uri@id0..1伴随广告点击跳转地址。
<CompanionClickTracking>uri@id3.0+0..*伴随广告点击追踪地址。
<AdParameters>@xmlEncoded3.0+0..1传递给创意脚本的初始化参数,xmlEncoded 注明是否 XML 编码。
<CompanionAds>@required(3.0+)0..1…+10伴随广告(Companion Ads)集合容器:与主广告同时展示的广告位。
<Companion>@id@width*@height*@assetWidth(3.0+)@assetHeight(3.0+)@expandedWidth@expandedHeight@apiFramework@adSlotId(3.0+)0..*…+9单个伴随广告:独立尺寸的广告位创意(如播放器旁 300×250 横幅)。
<StaticResource>uri@creativeType0..1静态资源(图片等)地址,creativeType 注明 MIME 类型。
<IFrameResource>uri0..1iframe 资源地址。
<HTMLResource>0..1内联 HTML 资源(直接嵌入标记)。
<AltText>0..1伴随广告的替代文本(无障碍与加载失败兜底)。
<TrackingEvents>0..1…+1追踪事件集合容器。
<Tracking>uri@event*@offset(3.0+)0..*单个追踪事件:event 指定事件名(start、quartile、complete、progress 等),文本为上报地址;progress 事件用 offset 指定时间点。
<CompanionClickThrough>uri@id0..1伴随广告点击跳转地址。
<CompanionClickTracking>uri@id3.0+0..*伴随广告点击追踪地址。
<AdParameters>@xmlEncoded3.0+0..1传递给创意脚本的初始化参数,xmlEncoded 注明是否 XML 编码。
<Extensions>xs:any content0..1…+1扩展容器:xs:any,任意厂商自定义内容。
<Extension>xs:any content@type0..*单个扩展项,type 标识用途;4.4 起标准化 AdCOM 信令(plcmt/pos/playbackmethod/attr)。
<Extensions>xs:any content0..1…+1扩展容器:xs:any,任意厂商自定义内容。
<Extension>xs:any content@type0..*单个扩展项,type 标识用途;4.4 起标准化 AdCOM 信令(plcmt/pos/playbackmethod/attr)。
<Error>uri≤ 3.00..1错误上报地址:播放失败时由播放器请求,[ERRORCODE] 宏携带错误码。
<Extensions>xs:any content0..1…+1扩展容器:xs:any,任意厂商自定义内容。
<Extension>xs:any content@type0..*单个扩展项,type 标识用途;4.4 起标准化 AdCOM 信令(plcmt/pos/playbackmethod/attr)。
Teaching baseline (VAST 4.2): covers the full InLine main chain; demo values, structure strictly aligned with the official 4.2 XSD
<?xml version="1.0" encoding="UTF-8"?><VAST version="4.2"><Ad id="ortb-demo-001" sequence="1"><InLine><AdSystem version="2.0">ortb.cn demo server</AdSystem><AdTitle>ORTB 演示:15 秒可跳过贴片</AdTitle><Impression id="imp-main"><![CDATA[https://example.com/impression?aid=ortb-demo-001]]></Impression><Category authority="https://www.iabtechlab.com/category-list">IAB1-7</Category><Advertiser id="adv-1001">ORTB Demo Advertiser</Advertiser><Description>演示用 InLine 线性广告,覆盖 VAST 4.2 主链要素。</Description><Error><![CDATA[https://example.com/error?[ERRORCODE]]]></Error><ViewableImpression id="vi-1"><Viewable><![CDATA[https://example.com/viewable]]></Viewable><NotViewable><![CDATA[https://example.com/notviewable]]></NotViewable><ViewUndetermined><![CDATA[https://example.com/viewundetermined]]></ViewUndetermined></ViewableImpression><UniversalAdId idRegistry="ad-id.org">8465-1234-5678</UniversalAdId><AdServingId>a5f3c2d1-0000-4e2b-9c1d-demo00000001</AdServingId><AdVerifications><Verification vendor="omid-demo"><JavaScriptResource apiFramework="omid" browserOptional="true"><![CDATA[https://example.com/omid.js]]></JavaScriptResource><VerificationParameters><![CDATA[{"partner":"demo"}]]></VerificationParameters><TrackingEvents><Tracking event="verificationNotExecuted"><![CDATA[https://example.com/om-fail?[REASON]]]></Tracking></TrackingEvents></Verification></AdVerifications><Creatives><Creative id="cr-1" adId="8465-1234-5678" sequence="1"><UniversalAdId idRegistry="ad-id.org">8465-1234-5678</UniversalAdId><Linear skipoffset="00:00:05"><Duration>00:00:15</Duration><AdParameters xmlEncoded="false"><![CDATA[{"title":"demo"}]]></AdParameters><TrackingEvents><Tracking event="creativeView"><![CDATA[https://example.com/t?e=creativeView]]></Tracking><Tracking event="start"><![CDATA[https://example.com/t?e=start]]></Tracking><Tracking event="firstQuartile"><![CDATA[https://example.com/t?e=firstQuartile]]></Tracking><Tracking event="midpoint"><![CDATA[https://example.com/t?e=midpoint]]></Tracking><Tracking event="thirdQuartile"><![CDATA[https://example.com/t?e=thirdQuartile]]></Tracking><Tracking event="complete"><![CDATA[https://example.com/t?e=complete]]></Tracking><Tracking event="progress" offset="00:00:10"><![CDATA[https://example.com/t?e=progress10]]></Tracking><Tracking event="skip"><![CDATA[https://example.com/t?e=skip]]></Tracking></TrackingEvents><MediaFiles><MediaFile id="mf-720" delivery="progressive" type="video/mp4" width="1280" height="720" bitrate="2500" codec="H.264" scalable="true" maintainAspectRatio="true"><![CDATA[https://example.com/media/720p.mp4]]></MediaFile><MediaFile id="mf-1080" delivery="progressive" type="video/mp4" width="1920" height="1080" bitrate="5000" codec="H.264"><![CDATA[https://example.com/media/1080p.mp4]]></MediaFile><Mezzanine delivery="progressive" type="video/mp4" width="3840" height="2160" codec="H.264"><![CDATA[https://example.com/media/mezzanine.mp4]]></Mezzanine></MediaFiles><VideoClicks><ClickThrough id="ct-1"><![CDATA[https://example.com/landing]]></ClickThrough><ClickTracking id="ctr-1"><![CDATA[https://example.com/t?e=click]]></ClickTracking></VideoClicks><Icons><Icon program="AdChoices" width="18" height="18" xPosition="right" yPosition="top" type="image/png"><StaticResource creativeType="image/png"><![CDATA[https://example.com/adchoices.png]]></StaticResource><IconClicks><IconClickThrough><![CDATA[https://example.com/adchoices-info]]></IconClickThrough></IconClicks></Icon></Icons></Linear></Creative><Creative id="cr-2" sequence="2"><CompanionAds><Companion id="comp-300x250" width="300" height="250" assetWidth="300" assetHeight="250" expandedWidth="300" expandedHeight="250"><StaticResource creativeType="image/jpeg"><![CDATA[https://example.com/companion.jpg]]></StaticResource><AltText>ORTB 演示伴随广告</AltText><CompanionClickThrough><![CDATA[https://example.com/companion-landing]]></CompanionClickThrough></Companion></CompanionAds></Creative></Creatives><Extensions><Extension type="demo-note">演示数据:ortb.cn 协议页示例</Extension></Extensions></InLine></Ad></VAST>