Skip to content

Commit d2a20e2

Browse files
Merge pull request SharePoint#8602 from nicodecleyre/main
Updates use of element.xml notation
2 parents 6f7baab + 49f8d8e commit d2a20e2

6 files changed

+15
-15
lines changed

docs/sp-add-ins/add-a-custom-content-type-to-a-sharepoint-hosted-sharepoint-add-in.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Add a custom content type to a SharePoint-hosted SharePoint Add-in
33
description: Create a custom content type, run the add-in, and test it.
4-
ms.date: 01/06/2021
4+
ms.date: 11/22/2022
55
ms.prod: sharepoint
66
ms.localizationpriority: high
77
---
@@ -69,12 +69,12 @@ In this article, you add a custom content type to the Employee Orientation Share
6969

7070
1. Select **OK** to close the dialog box, and then save and close the file.
7171

72-
### Modify the schema.xml file and element.xml file
72+
### Modify the schema.xml file and elements.xml file
7373

7474
1. Open the schema.xml file.
7575
1. Find the **Fields** element. It should have three **Field** elements: **Title**, **Division**, and **OrientationStage**. (These elements may be on a single line in this generated file. If so, separate them with line breaks.)
76-
1. Leave the file open, and in **Solution Explorer**, expand the **Site Columns** folder and the **Division** node, and then open the elements.xml file for **Division**. The **Field** element for **Division** in schema.xml should exactly duplicate the **Field** element in the **Division** elements.xml. If there is not an exact match, copy the **Field** element from the site column elements.xml file and paste it in place of the mismatched **Field** element in the schema.xml file. Close the element.xml file.
77-
1. Open the elements.xml file for **OrientationStage**. Here, too, there must be an exact match of the **Field** elements in the two files for **OrientationStage**, including all child elements, such as the **CHOICES** and **MAPPINGS** elements. If there isn't, copy the **Field** in the elements.xml file and paste it in place of the mismatched **Field** element in the schema.xml file. Close the element.xml file.
76+
1. Leave the file open, and in **Solution Explorer**, expand the **Site Columns** folder and the **Division** node, and then open the elements.xml file for **Division**. The **Field** element for **Division** in schema.xml should exactly duplicate the **Field** element in the **Division** elements.xml. If there is not an exact match, copy the **Field** element from the site column elements.xml file and paste it in place of the mismatched **Field** element in the schema.xml file. Close the elements.xml file.
77+
1. Open the elements.xml file for **OrientationStage**. Here, too, there must be an exact match of the **Field** elements in the two files for **OrientationStage**, including all child elements, such as the **CHOICES** and **MAPPINGS** elements. If there isn't, copy the **Field** in the elements.xml file and paste it in place of the mismatched **Field** element in the schema.xml file. Close the elements.xml file.
7878
1. Still in the schema.xml file, in the **View** element whose **BaseViewID** value is "1", find the child **ViewFields** element, and then add the following two **FieldRef** elements as children of it. They may already be there but missing an **ID** attribute. If so, add the ID attribute.
7979

8080
```xml

docs/sp-add-ins/programmatically-deploy-a-custom-button-in-the-provider-hosted-add-in.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Programmatically deploy a custom button in the provider-hosted add-in
33
description: Register a custom ribbon button with a custom list in the same provider-hosted SharePoint Add-in.
4-
ms.date: 12/04/2017
4+
ms.date: 11/22/2022
55
ms.prod: sharepoint
66
ms.localizationpriority: medium
77
---
@@ -105,7 +105,7 @@ The following procedure shows how to implement this strategy.
105105

106106
- Because the custom action, that is, the custom button, was registered with the ribbon of a list *type*, it is scoped to the entire website and is in the website's collection of custom actions. So the code retrieves it from that collection.
107107

108-
- The value of the `action.Name` comes from the **ID** attribute of the **CustomAction** element in the element.xml file in **AddEmployeeToCorpDB**.
108+
- The value of the `action.Name` comes from the **ID** attribute of the **CustomAction** element in the elements.xml file in **AddEmployeeToCorpDB**.
109109

110110
> [!IMPORTANT]
111111
> **You must change the `action.Name` value in the code to match the value in your elements.xml file.** The GUID part of the name will be different. Note that there is a `"."` character between the GUID and the rest of the name. The following is an example of the line:

docs/spfx/extensions/get-started/building-simple-cmdset-with-dialog-api.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Build your first ListView Command Set extension
33
description: Create an extension project, and then code and debug your extension by using SharePoint Framework (SPFx) Extensions.
4-
ms.date: 07/15/2022
4+
ms.date: 11/22/2022
55
ms.custom: scenarios:getting-started
66
---
77
# Build your first ListView Command Set extension
@@ -318,7 +318,7 @@ Possible ___location values that can be used with a ListView Command Set:
318318

319319
Open the file **./config/package-solution.json**.
320320

321-
The **package-solution.json** file defines the package metadata as shown in the following code. To ensure that the **element.xml** file is taken into account while the solution package is created, the default scaffolding of this file is updated to include additional details for a feature definition. This feature definition is used to provision and execute the **elements.xml** file.
321+
The **package-solution.json** file defines the package metadata as shown in the following code. To ensure that the **elements.xml** file is taken into account while the solution package is created, the default scaffolding of this file is updated to include additional details for a feature definition. This feature definition is used to provision and execute the **elements.xml** file.
322322

323323
> [!NOTE]
324324
> You can use **ClientSideInstance.xml** to automatically deploy your extensions cross all sites in your tenant. More details around this option from [Tenant Wide Deployment of SharePoint Framework Extensions](../basics/tenant-wide-deployment-extensions.md) article. As this solution is intended configured not to use tenant-scope option, this xml file is ignored when solution is activated in the app catalog.

docs/spfx/extensions/get-started/building-simple-field-customizer.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Build your first Field Customizer extension
33
description: Extensions are client-side components that run inside the context of a SharePoint page. Extensions can be deployed to SharePoint Online, and you can use modern JavaScript tools and libraries to build them.
4-
ms.date: 06/13/2022
4+
ms.date: 11/22/2022
55
ms.custom: scenarios:getting-started
66
---
77

@@ -279,7 +279,7 @@ Look at the XML in this file. The `ClientSideComponentId` property has been auto
279279

280280
Open the **./config/package-solution.json** file.
281281

282-
The **package-solution.json** file defines the package metadata as shown in the following code. To ensure that the **element.xml** file is taken into account while the solution package is created, the default scaffolding of this file is updated to include additional details for a feature definition. This feature definition is used to provision and execute the **elements.xml** file.
282+
The **package-solution.json** file defines the package metadata as shown in the following code. To ensure that the **elements.xml** file is taken into account while the solution package is created, the default scaffolding of this file is updated to include additional details for a feature definition. This feature definition is used to provision and execute the **elements.xml** file.
283283

284284
Also notice that the `includeClientSideAssets` attribute is set to `true`. This means the JavaScript assets will be included in the **\*.sppkg** file:
285285

docs/spfx/extensions/get-started/serving-your-extension-from-sharepoint.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Deploy your extension to SharePoint (Hello World part 3)
33
description: Deploy your SharePoint Framework Application Customizer to SharePoint and see it working on modern SharePoint pages.
4-
ms.date: 06/13/2022
4+
ms.date: 11/22/2022
55
ms.localizationpriority: high
66
ms.custom: scenarios:getting-started
77
---
@@ -83,7 +83,7 @@ For this tutorial, we don't need this file as we'll be activating solution in a
8383
8484
### Ensure that definitions are taken into account within the build pipeline
8585

86-
The **./config/package-solution.json** file defines the package metadata. To ensure that the **element.xml** file is taken into account while the solution is being packaged, the default scaffolding includes the required configuration to define a Feature Framework feature definition in the solution package.
86+
The **./config/package-solution.json** file defines the package metadata. To ensure that the **elements.xml** file is taken into account while the solution is being packaged, the default scaffolding includes the required configuration to define a Feature Framework feature definition in the solution package.
8787

8888
The original `elementManifests` property in the **./config/package-solution.json** file looks like this:
8989

docs/spfx/web-parts/get-started/provision-sp-assets-from-package.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Provision SharePoint assets from your SharePoint client-side web part
33
description: SharePoint assets can be provisioned as part of the SharePoint Framework solution, and deployed to SharePoint sites when the solution is installed on it.
4-
ms.date: 02/14/2022
4+
ms.date: 11/22/2022
55
ms.localizationpriority: high
66
ms.custom: scenarios:getting-started
77
---
@@ -74,7 +74,7 @@ To provision SharePoint assets to sites with feature framework elements, we need
7474
- List instances
7575
- List instances with custom schema
7676

77-
### Add an element.xml file for SharePoint definitions
77+
### Add an elements.xml file for SharePoint definitions
7878

7979
In the following steps, we define the needed structure to be provisioned.
8080

@@ -239,7 +239,7 @@ There are a few things to take note of from this XML:
239239
- Make sure you define a **unique GUID** for the `id` property in the `feature` property.
240240
- You can technically have multiple features in the package because the `features` property is an array. However, this isn't recommended.
241241
- **elements.xml** is referenced under `elementManifests` so that it's properly packaged for the feature definition as an element manifest file.
242-
- You can have multiple **element.xml** files in the definition, and they would be executed in the order they're mentioned in the JSON definition. Typically, you should avoid using multiple **element.xml** files because this adds unnecessary complexity. You can define all needed assets in a single **element.xml** file.
242+
- You can have multiple **elements.xml** files in the definition, and they would be executed in the order they're mentioned in the JSON definition. Typically, you should avoid using multiple **elements.xml** files because this adds unnecessary complexity. You can define all needed assets in a single **elements.xml** file.
243243

244244
## Deploy and test asset provisioning
245245

0 commit comments

Comments
 (0)