xsd biztalk schema

22
XSD schema properties BizTalk schema

Upload: ahmed-zewita

Post on 26-Jan-2017

139 views

Category:

Software


2 download

TRANSCRIPT

Page 1: Xsd biztalk schema

XSD schema properties BizTalk schema

Page 2: Xsd biztalk schema

XSD Restrictions

What is the meaning of Restrictions ?

Restrictions are used to define acceptable values for XML elements or attributes

Page 3: Xsd biztalk schema

What type of restriction• Restrictions on Values• Restrictions on a Set of Values• Restrictions on a Series of Values• Other Restrictions on a Series of Values• Restrictions on Whitespace Characters• Restrictions on Length

Page 4: Xsd biztalk schema

Restrictions on Values

Ex: restriction of values such as you have an element represent age Age should between 15 and 60 so you want to make restriction on age Steps :1. Create BizTalk project 2. Add schema with restriction values 3. Right click and add element with name age 4. Right click on element and choose properties 5. Convert base datatype to integer 6. Make derived by restriction

Page 5: Xsd biztalk schema

• Make max fact type to inclusive or exclusive depend on your business • Determine the value minimum facet value and maximum facet value

Page 6: Xsd biztalk schema
Page 7: Xsd biztalk schema
Page 8: Xsd biztalk schema
Page 9: Xsd biztalk schema

Restrictions on a Set of Values

• To limit the content of an XML element to a set of acceptable values, we would use the enumeration constraint• Like the steps in previous example but there are option call

enumeration• Click on enumeration and add the value you want every value in

separate record

Page 10: Xsd biztalk schema
Page 11: Xsd biztalk schema

Restrictions on Length

• To limit the length of a value in an element, we would use the length, max Length, and min Length constraints.

Page 12: Xsd biztalk schema
Page 13: Xsd biztalk schema

Restrictions on a Series of Values

• o limit the content of an XML element to define a series of numbers or letters that can be used, we would use the pattern constraint.• The example below defines an element called "letter" with a

restriction. The only acceptable value is ONE of the LOWERCASE letters from a to z

Page 14: Xsd biztalk schema
Page 15: Xsd biztalk schema

extension• The extension element extends an existing simple Type or complex

Type element.

Attribute Description

id Optional. Specifies a unique ID for the element

base Required. Specifies the name of a built-in data type, a simpleType element, or a complexType element

any attributes Optional. Specifies any other attributes with non-schema namespace

Page 16: Xsd biztalk schema
Page 17: Xsd biztalk schema

List And union property • List allow Defines a simple type that contains a white space-separated

list of values of an inherited simple type.• Union allow Defines a simple type that contains a union of the values

of two or more inherited simple types.

Page 18: Xsd biztalk schema
Page 19: Xsd biztalk schema

Sequence • enquires the elements in the group to appear in the specified sequence

within the containing element.Max OccursThe maximum number of times the sequence can occur. The value can be an integer greater than or equal to zero. To set no limit on the maximum number, use the string "unbounded“minOccursThe minimum number of times the sequence can occur. The value can be an integer greater than or equal to zero. To specify that this sequence group is optional, set this attribute to zero.

Page 20: Xsd biztalk schema
Page 21: Xsd biztalk schema

Schema validation• Right click on schema and select one of three • Validate scheme • Validate instance• Generate instance

Page 22: Xsd biztalk schema