Menu Functions

In the upper-left corner, you will find the common Windows menu displayed. There are five different menu items:

  • File

  • Edit

  • View

  • Tools

  • Help

The following sections describe the capabilities of each of these menu items in more detail.

The File Menu and WebDav

The File menu includes the New, Open, Close, Save, Save As, Exit, and Recent Files menu options. In addition to these basic menu options, you will also find two of the more esoteric looking options, Retrieve from WebDAV and Store to WebDAV.

WebDav (Web Distributed Authoring and Versioning) is a set of extensions to the HTTP 1.1 protocol that allows users to collaboratively edit and manage files on remote servers. It does this by exposing a hierarchical file storage media, such as a file system, over an HTTP connection. WebDav locks files when they are “busy” being accessed over the Web so that they cannot be overwritten accidentally by other users. Therefore, by using the retrieve and store capabilities of the BizTalk Editor interface, developers can easily protect their intellectual assets—that is, BizTalk specifications—using the WebDav server of their choice. By default, BizTalk Server uses your installation directory— for example, Program Files—plus Microsoft BizTalk Server BizTalkServerRepository DocSpecs as the root for your WebDav server. From there, it is as simple as storing and retrieving your document specifications to and from the WebDav directory of choice.

The Edit Menu

The Edit menu also contains some recognizable options including Cut, Copy, Paste, and Delete. However, some new options will require some serious inquiry. The New/Insert Record and New/Insert Field options seem ordinary, but there are quite a few details that a schema architect needs to consider before choosing to use either of them.

As mentioned earlier in Appendix A, “Understanding XML Schemas,” XML is made up primarily of elements and attributes. Elements typically contain either other elements, in which case they are known as parent elements, or text and sometimes a mixture of both. Attributes on the other hand never contain other attributes or elements but always encapsulate some form of data or basic text. For instance

<Document_Element> 
 <Element>My element might contain lots of text
   and other <OtherElement>elements</OtherElement>.
   But an attribute will only contain <A attribute="some kind of value"> some
   kind of value</A>.
 </Element>
</Document_Element>

Records

Microsoft lets you differentiate between container elements and value elements through the use of records and fields. A record can be thought of as a container element that encapsulates other records or fields; this feature is great for defining the structure of any document, not just XML. Here is an example:

<Record1> <!-- Comment: Contains Record2 --> 
<Record2> <!-- Comment: Contains Field_Elements -->
  <Field_Element>This is a field element</Field_Element>
  <Record3 field_attribute="data">This is a
      record element, with a field attribute</Record3>
</Record2>
</Record1>

It is important to note that records can contain attributes. In fact, an easy rule to remember is that an element with anything other than text is a record. If you add an attribute to an element, it's a record. If you add a child element to an element, it's a record. The only way you can have a field in BizTalk is if you have either an element with text only or an attribute. And an attribute always represents a field. You will notice when building a BizTalk specification with the BizTalk Editor that choosing records over fields gives you different options regarding what you can do with the data, so it's important that you understand these concepts thoroughly. Table B.1 makes this more clear.

Table B.1. Records and Fields
 Has attributesHas elementsHas text
No attributesNoneRecord (element)Field (element)
No elementsField (element or is an attribute)NoneField (element or is an attribute)
No textRecordRecord (element)None
NOTE: Remember that a record cannot have text, and a field cannot contain elements

Fields

As just discussed, a field can be an element or an attribute, but its primary responsibility is to handle data. Whereas a record is responsible for handling attributes and other elements, a field is responsible for describing data and text explicitly. Here are two examples of fields in an XML instance (wrapped inside a record):

<Record field="This is a field within a record element"> 
  <Field>This is a field within a record element, too</Field>
</Record>

This will become much more clear as we develop some of our specifications later in the chapter, so let's move along to discuss some of the other menu options.

The View Menu

The first six options of the View menu are simply links to the different tabs in the right window pane of the BizTalk Editor. The same goes for the Output and Warnings options. These will each be discussed later in this appendix. Here we will discuss an invalid character map. You can block a character or a range of characters from being passed through BizTalk Server by using invalid character ranges in the destination specification. Whenever BizTalk Server attempts to process a character specified in the Invalid Character Ranges dialog box, processing stops and an error message appears.

You can also expand and collapse the element tree in the left pane using the Expand Tree Items option and the Collapse Tree Items option.

The Tools Menu

The Tools menu probably contains the most unique options inside the BizTalk Editor. They are

  • Validate Specification

  • Validate Instance

  • Create XML Instance

  • Create Native Instance

  • Import

  • Export XDR Schema

  • Export XSD Schema

  • Options

The Validate Specification option simply allows you to validate the current specification. Any warnings will be displayed in the Warnings tab at the bottom of the Editor.

The Validate Instance option opens a Validate Document Instance window for you to choose an XML document instance you want to validate the schema against. In fact, you can use the validate instance to validate any type of document specification not just XML. You can validate against CSV, EDI, and so on. Just select the document you want to validate against, and the Warnings tab displays the status of the validation process. If there is an error, you will typically be told where it occurred in the document—that is, line number and position—and which node was at fault for the inconsistency.

Creating an XML instance in accordance with the schema or specification that you are designing is performed by choosing Tools, Create XML Instance from the menu. When you select this option, a Create Document Instance As window opens, allowing you to save a valid instance. If the document specification is describing a document type other than XML, you also have the ability to generate a native instance of the document by selecting Tools, Create Native Instance from the menu. Both these features give developers the ability to test their specifications prior to the completion of the application.

The Import option is a great tool for creating BizTalk specifications from current documents. When importing a document into BizTalk Editor, it must be one of the following formats:

  • Well-formed XML instance

  • Document type definition

  • XDR schema

Tip

Importing an XML instance into BizTalk Editor is useful, but it is not generally the best way to create a specification. This is because many generalities might be missed when importing an instance, as opposed to importing a DTD or XDR schema. Remember, schemas have a lot of metadata (detailed information) about the XML document, that the XML itself cannot reveal—that is, data type.

Also, it is possible to only put one element under a record, in an XML instance, when you want the specification to allow for more than one element in the record. If the Editor only sees one element, it's going to assume that you are going to want to limit the specification in the same manner. However, that being said, importing well-formed XML instances is a simple way to get started on developing a specification and almost always beats building one from scratch!


Importing a DTD gives you the added benefit of using someone's in-depth knowledge of the required document structure and putting it to use in your specification. A DTD cannot be developed without a thorough understanding of the document and its structure, so using a DTD is a great way to get a jump on building your specification. The only thing you need to add are the details that DTDs can't account for, such as namespaces and data types.

Perhaps the easiest way to go about developing your BizTalk specification is to import an XDR schema that someone has already built. From there, all you need to do is allow the Editor to append the necessary BizTalk-specific elements to the XDR, and you're ready to go.

If you want to create a valid XDR schema from the schema being viewed in the BizTalk Editor, you can use the Export XDR Schema option to extract all the BizTalk-specific elements from the specification and export only the XDR version. You also have the ability to export an XSD schema by using the Export XSD Schema option. These options are useful when you need to share your schema with business partners, or within your own organization, so that they can share information with you in a compatible format.

Note

There is also a utility called the SampleImporter in the .Program FilesMicrosoft BizTalk ServerSDKMessaging SamplesSampleImporter directory that helps you create a BizTalk Editor specification from a CSV instance.


The Options menu allows you to choose to add fields as elements rather than as attributes by default. This is nothing fancy, but helpful to those you don't want to switch to an element every time they create a new field.

The Help Menu

Finally, there is the Help menu. The Help menu is nothing new to many of you, but if you choose the Microsoft BizTalk Server 2002 Help option, you will find a useful interface with sections on “Getting Started,” tutorials, administration, application development, and even an interface reference for those interested in building custom components for BizTalk Server.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset