xmlDocumentComponent with Schema
You can use the xmlDocumentComponent and xmlElementComponent with XML documents associated with schemas. Studio's XML Components only support the use of XML Schema Definition (XSD) files. Studio provides functions for working with schema definition files as links at the bottom of the Properties window. The functions are listed here.
Descriptions of these functions follow.
To specify the schema provider for a document, click the Edit Schema Provider link in the Properties grid for the xmlDocumentComponent. Once you click the Set Schema Provider link, the Edit Schema Provider window is displayed.
Click the Select Schema Provider Type box and choose the XSD option. In the Specify Schema Provider Source field, browse to the schema for the xmlDocumentComponent.
After you select a file and click OK, Studio performs these tasks.
Analyzes the XSD file and dynamically produces an assembly containing data types defined by the XSD. The assembly file is written to the \DynamicAssemblies folder. The name of the .dll file is shown at the end of the UniqueID on Automation property for the xmlDocumentComponent, such as XmlDocumentComponent-8CBAD114B4E439A.dll.
Changes the XMLSchemaProviderType property from "None" to "XSD".
Adds new Create methods for the xmlDocumentComponent types. For example, given the schema with types Publishers and Titles, new methods named CreatePublishers and CreateTitles would be added for the xmlDocumentComponent. The result of these methods is an element of the corresponding type.
Edit Schema Provider Dialog Functions
The dialog provides functions for removing the schema provider associated with the xmlDocumentComponent and regenerating the schema assembly.
Clear – Click the Clear button to remove the schema provider set in the "Specify Schema Provider Source". When you select the Clear button, a warning displays for you to confirm clearing the schema. Confirm by clicking Yes. The DocumentMode is automatically set to FreeForm and the SchemaProvider is deleted. All Create[type] methods are removed from the Designer.
Refresh – Click the Refresh button to regenerate the schema assembly. When you select the Refresh link, a warning displays for you to confirm refreshing the schema. Confirm by clicking Yes. Types defined by the selected schema are updated in Studio.
Click the Save Diagnostics link to save the source code and XSD file to the dynamic assemblies folder for diagnostics purposes. When you click the Save Diagnostics link, a dialog shows you the names of the files created. These files are created:
XmlDocumentComponent - id.cs
XmlDocumentComponet -id.XSD
These files are written to the OpenSpan Studio\Dynamic Assemblies folder.
Click the View Schema link to open modal dialog that contains a web browser showing the current contents of either the XSD (view schema) or the current contents of the xml document (view document). Here is an example of the View Schema window:
Related information
Privacy | Trademarks | Terms of Use | Feedback
Updated: 01 July 2024
© 2016 - 2024 Pegasystems Inc. Cambridge, MA All rights reserved.