Skip to content

Commit fcdd9e4

Browse files
authored
Feb 25 xsd update (#1884)
1 parent dc1318f commit fcdd9e4

File tree

14 files changed

+191
-2
lines changed

14 files changed

+191
-2
lines changed

data/namespaces.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -681,6 +681,11 @@
681681
"Uri": "http://schemas.microsoft.com/office/spreadsheetml/2020/threadedcomments2",
682682
"Version": "Office2021"
683683
},
684+
{
685+
"Prefix": "xlwcv",
686+
"Uri": "http://schemas.microsoft.com/office/spreadsheetml/2024/workbookCompatibilityVersion",
687+
"Version": "Microsoft365"
688+
},
684689
{
685690
"Prefix": "xml",
686691
"Uri": "http://www.w3.org/XML/1998/namespace"
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"TargetNamespace": "http://schemas.microsoft.com/office/spreadsheetml/2024/workbookCompatibilityVersion",
3+
"Types": [
4+
{
5+
"Name": "xlwcv:CT_Version/xlwcv:version",
6+
"ClassName": "Version",
7+
"Summary": "Defines the Version Class.",
8+
"BaseClass": "OpenXmlLeafElement",
9+
"IsLeafElement": true,
10+
"Version": "Microsoft365",
11+
"Attributes": [
12+
{
13+
"QName": ":warnBelowVersion",
14+
"Type": "UInt32Value",
15+
"Version": "Microsoft365",
16+
"PropertyComments": "warnBelowVersion"
17+
},
18+
{
19+
"QName": ":setVersion",
20+
"Type": "UInt32Value",
21+
"Version": "Microsoft365",
22+
"PropertyComments": "setVersion"
23+
}
24+
]
25+
}
26+
]
27+
}

data/schemas/schemas_openxmlformats_org_spreadsheetml_2006_main.json

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25445,6 +25445,10 @@
2544525445
{
2544625446
"Name": "xlecs:CT_ExternalCodeService/xlecs:externalCodeService",
2544725447
"PropertyName": "ExternalCodeService"
25448+
},
25449+
{
25450+
"Name": "xlwcv:CT_Version/xlwcv:version",
25451+
"PropertyName": "Version"
2544825452
}
2544925453
],
2545025454
"Particle": {
@@ -25498,6 +25502,10 @@
2549825502
"Name": "xlecs:CT_ExternalCodeService/xlecs:externalCodeService",
2549925503
"InitialVersion": "Microsoft365"
2550025504
},
25505+
{
25506+
"Name": "xlwcv:CT_Version/xlwcv:version",
25507+
"InitialVersion": "Microsoft365"
25508+
},
2550125509
{
2550225510
"Kind": "Any",
2550325511
"Occurs": [

data/typed/namespaces.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -183,6 +183,10 @@
183183
"Prefix": "xlpda",
184184
"Namespace": "DocumentFormat.OpenXml.Office.SpreadSheetML.Y2024.PivotDynamicArrays"
185185
},
186+
{
187+
"Prefix": "xlwcv",
188+
"Namespace": "DocumentFormat.OpenXml.Office.SpreadSheetML.Y2024.WorkbookCompatibilityVersion"
189+
},
186190
{
187191
"Prefix": "wne",
188192
"Namespace": "DocumentFormat.OpenXml.Office.Word"
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
[
2+
{
3+
"Name": "xlwcv:CT_Version/xlwcv:version",
4+
"ClassName": "Version"
5+
}
6+
]

generated/DocumentFormat.OpenXml.Framework/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/Namespaces.g.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,7 @@ internal partial class OpenXmlNamespaceResolver
158158
{ "http://schemas.microsoft.com/office/spreadsheetml/2022/richvaluerel", "xlrvrel" },
159159
{ "http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments", "xltc" },
160160
{ "http://schemas.microsoft.com/office/spreadsheetml/2020/threadedcomments2", "xltc2" },
161+
{ "http://schemas.microsoft.com/office/spreadsheetml/2024/workbookCompatibilityVersion", "xlwcv" },
161162
{ "http://www.w3.org/XML/1998/namespace", "xml" },
162163
{ "http://schemas.microsoft.com/office/excel/2006/main", "xne" },
163164
{ "http://schemas.microsoft.com/office/spreadsheetml/2019/namedsheetviews", "xnsv" },
@@ -327,6 +328,7 @@ internal partial class OpenXmlNamespaceResolver
327328
{ "xlrvrel", "http://schemas.microsoft.com/office/spreadsheetml/2022/richvaluerel" },
328329
{ "xltc", "http://schemas.microsoft.com/office/spreadsheetml/2018/threadedcomments" },
329330
{ "xltc2", "http://schemas.microsoft.com/office/spreadsheetml/2020/threadedcomments2" },
331+
{ "xlwcv", "http://schemas.microsoft.com/office/spreadsheetml/2024/workbookCompatibilityVersion" },
330332
{ "xml", "http://www.w3.org/XML/1998/namespace" },
331333
{ "xne", "http://schemas.microsoft.com/office/excel/2006/main" },
332334
{ "xnsv", "http://schemas.microsoft.com/office/spreadsheetml/2019/namedsheetviews" },
@@ -496,6 +498,7 @@ internal partial class OpenXmlNamespaceResolver
496498
{ "xlrvrel", FileFormatVersions.Microsoft365 },
497499
{ "xltc", FileFormatVersions.Office2019 },
498500
{ "xltc2", FileFormatVersions.Office2021 },
501+
{ "xlwcv", FileFormatVersions.Microsoft365 },
499502
{ "xml", FileFormatVersions.Office2007 },
500503
{ "xne", FileFormatVersions.Office2007 },
501504
{ "xnsv", FileFormatVersions.Office2021 },

generated/DocumentFormat.OpenXml.Linq/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/Linq.NoNamespace.g.cs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17807,6 +17807,18 @@ public static partial class NoNamespace
1780717807
/// </remarks>
1780817808
public static readonly XName setDefinition = "setDefinition";
1780917809

17810+
/// <summary>
17811+
/// Represents the setVersion XML attribute.
17812+
/// </summary>
17813+
/// <remarks>
17814+
/// <para>As an XML attribute, it:</para>
17815+
/// <list type="bullet">
17816+
/// <item><description>is contained in the following XML elements: <see cref="XLWCV.version" />.</description></item>
17817+
/// <item><description>corresponds to the following strongly-typed properties: Version.SetVersion.</description></item>
17818+
/// </list>
17819+
/// </remarks>
17820+
public static readonly XName setVersion = "setVersion";
17821+
1781017822
/// <summary>
1781117823
/// Represents the shadeToTitle XML attribute.
1781217824
/// </summary>
@@ -22511,6 +22523,18 @@ public static partial class NoNamespace
2251122523
/// </remarks>
2251222524
public static readonly XName w = "w";
2251322525

22526+
/// <summary>
22527+
/// Represents the warnBelowVersion XML attribute.
22528+
/// </summary>
22529+
/// <remarks>
22530+
/// <para>As an XML attribute, it:</para>
22531+
/// <list type="bullet">
22532+
/// <item><description>is contained in the following XML elements: <see cref="XLWCV.version" />.</description></item>
22533+
/// <item><description>corresponds to the following strongly-typed properties: Version.WarnBelowVersion.</description></item>
22534+
/// </list>
22535+
/// </remarks>
22536+
public static readonly XName warnBelowVersion = "warnBelowVersion";
22537+
2251422538
/// <summary>
2251522539
/// Represents the weight XML attributes.
2251622540
/// </summary>

generated/DocumentFormat.OpenXml.Linq/DocumentFormat.OpenXml.Generator/DocumentFormat.OpenXml.Generator.OpenXmlGenerator/Linq.X.g.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,7 @@ public static partial class X
14541454
/// <para>As an XML element, it:</para>
14551455
/// <list type="bullet">
14561456
/// <item><description>has the following parent XML elements: <see cref="extLst" />, <see cref="X14.extLst" />, <see cref="X15.extLst" />, <see cref="XFPB.extLst" />, <see cref="XLMSFORMS.extLst" />, <see cref="XLRD.extLst" />, <see cref="XLRD2.extLst" />, <see cref="XLRDWI.extLst" />, <see cref="XLTC.extLst" />, <see cref="XNSV.extLst" />.</description></item>
1457-
/// <item><description>has the following child XML elements: <see cref="X14.cacheField" />, <see cref="X14.cacheHierarchy" />, <see cref="X14.calculatedMember" />, <see cref="X14.conditionalFormattings" />, <see cref="X14.connection" />, <see cref="X14.dataField" />, <see cref="X14.dataValidations" />, <see cref="X14.definedNames" />, <see cref="X14.dxfs" />, <see cref="X14.id" />, <see cref="X14.ignoredErrors" />, <see cref="X14.pivotCacheDefinition" />, <see cref="X14.pivotCaches" />, <see cref="X14.pivotField" />, <see cref="X14.pivotHierarchy" />, <see cref="X14.pivotTableDefinition" />, <see cref="X14.protectedRanges" />, <see cref="X14.slicerCaches" />, <see cref="X14.slicerList" />, <see cref="X14.slicerStyles" />, <see cref="X14.sourceConnection" />, <see cref="X14.sparklineGroups" />, <see cref="X14.table" />, <see cref="X14.workbookPr" />, <see cref="X15.cachedUniqueNames" />, <see cref="X15.cacheHierarchy" />, <see cref="X15.calculatedMember" />, <see cref="X15.connection" />, <see cref="X15.dataField" />, <see cref="X15.dataModel" />, <see cref="X15.dxfs" />, <see cref="X15.movingPeriodState" />, <see cref="X15.pivotCacheDecoupled" />, <see cref="X15.pivotCacheIdVersion" />, <see cref="X15.pivotCaches" />, <see cref="X15.pivotFilter" />, <see cref="X15.pivotTableData" />, <see cref="X15.pivotTableReferences" />, <see cref="X15.pivotTableUISettings" />, <see cref="X15.queryTable" />, <see cref="X15.slicerCacheHideItemsWithNoData" />, <see cref="X15.slicerCachePivotTables" />, <see cref="X15.slicerCaches" />, <see cref="X15.tableSlicerCache" />, <see cref="X15.timelineCachePivotCaches" />, <see cref="X15.timelineCacheRefs" />, <see cref="X15.timelinePivotCacheDefinition" />, <see cref="X15.timelineRefs" />, <see cref="X15.timelineStyles" />, <see cref="X15.webExtensions" />, <see cref="X15.workbookPr" />, <see cref="XLECS.externalCodeService" />, <see cref="XLMSFORMS.msForm" />, <see cref="XLPAR.autoRefresh" />, <see cref="XLPDA.pivotCacheDynamicArray" />, <see cref="XPRD.richInfo" />, <see cref="XXPIM.implicitMeasureSupport" />, <see cref="XXPVI.cacheVersionInfo" />, <see cref="XXPVI.pivotVersionInfo" />.</description></item>
1457+
/// <item><description>has the following child XML elements: <see cref="X14.cacheField" />, <see cref="X14.cacheHierarchy" />, <see cref="X14.calculatedMember" />, <see cref="X14.conditionalFormattings" />, <see cref="X14.connection" />, <see cref="X14.dataField" />, <see cref="X14.dataValidations" />, <see cref="X14.definedNames" />, <see cref="X14.dxfs" />, <see cref="X14.id" />, <see cref="X14.ignoredErrors" />, <see cref="X14.pivotCacheDefinition" />, <see cref="X14.pivotCaches" />, <see cref="X14.pivotField" />, <see cref="X14.pivotHierarchy" />, <see cref="X14.pivotTableDefinition" />, <see cref="X14.protectedRanges" />, <see cref="X14.slicerCaches" />, <see cref="X14.slicerList" />, <see cref="X14.slicerStyles" />, <see cref="X14.sourceConnection" />, <see cref="X14.sparklineGroups" />, <see cref="X14.table" />, <see cref="X14.workbookPr" />, <see cref="X15.cachedUniqueNames" />, <see cref="X15.cacheHierarchy" />, <see cref="X15.calculatedMember" />, <see cref="X15.connection" />, <see cref="X15.dataField" />, <see cref="X15.dataModel" />, <see cref="X15.dxfs" />, <see cref="X15.movingPeriodState" />, <see cref="X15.pivotCacheDecoupled" />, <see cref="X15.pivotCacheIdVersion" />, <see cref="X15.pivotCaches" />, <see cref="X15.pivotFilter" />, <see cref="X15.pivotTableData" />, <see cref="X15.pivotTableReferences" />, <see cref="X15.pivotTableUISettings" />, <see cref="X15.queryTable" />, <see cref="X15.slicerCacheHideItemsWithNoData" />, <see cref="X15.slicerCachePivotTables" />, <see cref="X15.slicerCaches" />, <see cref="X15.tableSlicerCache" />, <see cref="X15.timelineCachePivotCaches" />, <see cref="X15.timelineCacheRefs" />, <see cref="X15.timelinePivotCacheDefinition" />, <see cref="X15.timelineRefs" />, <see cref="X15.timelineStyles" />, <see cref="X15.webExtensions" />, <see cref="X15.workbookPr" />, <see cref="XLECS.externalCodeService" />, <see cref="XLMSFORMS.msForm" />, <see cref="XLPAR.autoRefresh" />, <see cref="XLPDA.pivotCacheDynamicArray" />, <see cref="XLWCV.version" />, <see cref="XPRD.richInfo" />, <see cref="XXPIM.implicitMeasureSupport" />, <see cref="XXPVI.cacheVersionInfo" />, <see cref="XXPVI.pivotVersionInfo" />.</description></item>
14581458
/// <item><description>has the following XML attributes: <see cref="NoNamespace.uri" />.</description></item>
14591459
/// <item><description>corresponds to the following strongly-typed classes: CacheFieldExtension, CacheHierarchyExtension, CacheSourceExtension, CalculatedMemberExtension, ConditionalFormattingRuleExtension, ConnectionExtension, DataFieldExtension, Extension, PivotCacheDefinitionExtension, PivotFieldExtension, PivotFilterExtension, PivotHierarchyExtension, PivotTableDefinitionExtension, QueryTableExtension, SlicerCacheDefinitionExtension, StylesheetExtension, TableExtension, WorkbookExtension, WorksheetExtension.</description></item>
14601460
/// </list>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
// Copyright (c) Microsoft. All rights reserved.
2+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
3+
4+
using System.Xml.Linq;
5+
6+
namespace DocumentFormat.OpenXml.Linq
7+
{
8+
/// <summary>
9+
/// Declares XNamespace and XName fields for the xmlns:xlwcv="http://schemas.microsoft.com/office/spreadsheetml/2024/workbookCompatibilityVersion" namespace.
10+
/// </summary>
11+
public static partial class XLWCV
12+
{
13+
/// <summary>
14+
/// Defines the XML namespace associated with the xlwcv prefix.
15+
/// </summary>
16+
public static readonly XNamespace xlwcv = "http://schemas.microsoft.com/office/spreadsheetml/2024/workbookCompatibilityVersion";
17+
18+
/// <summary>
19+
/// Represents the xlwcv:version XML element.
20+
/// </summary>
21+
/// <remarks>
22+
/// <para>As an XML element, it:</para>
23+
/// <list type="bullet">
24+
/// <item><description>has the following parent XML elements: <see cref="X.ext" />.</description></item>
25+
/// <item><description>has the following XML attributes: <see cref="NoNamespace.setVersion" />, <see cref="NoNamespace.warnBelowVersion" />.</description></item>
26+
/// <item><description>corresponds to the following strongly-typed classes: Version.</description></item>
27+
/// </list>
28+
/// </remarks>
29+
public static readonly XName version = xlwcv + "version";
30+
}
31+
}
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
// <auto-generated/>
2+
3+
// Copyright (c) Microsoft. All rights reserved.
4+
// Licensed under the MIT license. See LICENSE file in the project root for full license information.
5+
6+
#nullable enable
7+
8+
using DocumentFormat.OpenXml;
9+
using DocumentFormat.OpenXml.Framework;
10+
using DocumentFormat.OpenXml.Framework.Metadata;
11+
using DocumentFormat.OpenXml.Packaging;
12+
using DocumentFormat.OpenXml.Validation.Schema;
13+
using System;
14+
using System.Collections.Generic;
15+
using System.IO.Packaging;
16+
17+
namespace DocumentFormat.OpenXml.Office.SpreadSheetML.Y2024.WorkbookCompatibilityVersion
18+
{
19+
/// <summary>
20+
/// <para>Defines the Version Class.</para>
21+
/// <para>This class is available in Microsoft365 and above.</para>
22+
/// <para>When the object is serialized out as xml, it's qualified name is xlwcv:version.</para>
23+
/// </summary>
24+
public partial class Version : OpenXmlLeafElement
25+
{
26+
/// <summary>
27+
/// Initializes a new instance of the Version class.
28+
/// </summary>
29+
public Version() : base()
30+
{
31+
}
32+
33+
/// <summary>
34+
/// <para>warnBelowVersion, this property is only available in Microsoft365 and later.</para>
35+
/// <para>Represents the following attribute in the schema: warnBelowVersion</para>
36+
/// </summary>
37+
public UInt32Value? WarnBelowVersion
38+
{
39+
get => GetAttribute<UInt32Value>();
40+
set => SetAttribute(value);
41+
}
42+
43+
/// <summary>
44+
/// <para>setVersion, this property is only available in Microsoft365 and later.</para>
45+
/// <para>Represents the following attribute in the schema: setVersion</para>
46+
/// </summary>
47+
public UInt32Value? SetVersion
48+
{
49+
get => GetAttribute<UInt32Value>();
50+
set => SetAttribute(value);
51+
}
52+
53+
internal override void ConfigureMetadata(ElementMetadata.Builder builder)
54+
{
55+
base.ConfigureMetadata(builder);
56+
builder.SetSchema("xlwcv:version");
57+
builder.Availability = FileFormatVersions.Microsoft365;
58+
builder.AddElement<Version>()
59+
.AddAttribute("warnBelowVersion", a => a.WarnBelowVersion)
60+
.AddAttribute("setVersion", a => a.SetVersion);
61+
}
62+
63+
/// <inheritdoc/>
64+
public override OpenXmlElement CloneNode(bool deep) => CloneImp<Version>(deep);
65+
}
66+
}

0 commit comments

Comments
 (0)