Table of Contents

Advertisement

Quick Links

XML Model
User's Guide
Sybase
®
PowerDesigner
®
11.1
Windows

Advertisement

Table of Contents
loading

Summary of Contents for Sybase PowerDesigner XML

  • Page 1 XML Model User's Guide Sybase ® PowerDesigner ® 11.1 Windows...
  • Page 2 LAST REVISED: June 2005 Copyright © 1991-2005 Sybase, Inc. All rights reserved. Information in this manual may change without notice and does not represent a commitment on the part of Sybase, Inc. and its subsidiaries. Sybase, Inc. provides the software described in this manual under a Sybase License Agreement. The software may be used only in accordance with the terms of the agreement.
  • Page 3: Table Of Contents

    Contents About This Book ....................ix XML Model Basics..............1 Functional overview ..............2 What is an XML model? ............3 About XML................4 Objects in an XML model ........... 5 How to link a child object to a parent object in an XML model? ...............
  • Page 4 Defining Any Attribute properties........61 Defining identity constraints ............ 64 Defining a unique constraint..........64 Defining a key constraint ..........66 Defining a keyRef constraint ..........67 Creating an identity constraint.......... 69 Defining an identity constraint selector......70 Defining an identity constraint field........73 Defining groups...............
  • Page 5 Defining an include............127 Defining a redefine ............128 Defining business rules............132 What is a business rule? ..........132 Defining business rule properties ........132 Creating a business rule..........133 Applying a business rule to an XML object ....135 Working with an XML model .........139 Checking an XML model............
  • Page 6 Understanding object mapping ........166 Defining data sources in an XML model ......166 Mapping XML Model objects to PDM objects ....169 Mapping XML Model objects to OOM objects....171 Creating a mapping for an XML object......172 Modifying the mapping of an attribute ......175 Manipulating XML objects graphically........
  • Page 7 Exchanging data with databases supporting XML ..215 Why use XML in databases? ..........216 Generating an annotated schema for Microsoft SQL Server 2000 ................217 Mapping XML objects to PDM objects ......217 Reinforcing mapping with extended attributes ....225 Generating an annotated schema for Oracle 9i2....
  • Page 8 viii PowerDesigner...
  • Page 9: About This Book

    About This Book This book describes the PowerDesigner XML Model environment. It shows Subject you how to do the following: Build an XML model Work on an XML model Generate and reverse engineer a DTD file Generate and reverse engineer an XSD file...
  • Page 10 About This Book Object Oriented Model (OOM) to model a software system using an object-oriented approach for Java or other object languages Business Process Model (BPM) to model the means by which one or more processes are accomplished in operating business practices XML Model (XSM) to model the structure of an XML file using a DTD or an XML schema Requirements Model (RQM) to list and document the customer needs...
  • Page 11 About This Book Repository Getting Started To learn the basics of the Repository. Repository User’s Guide To work in a multi-user environment using a central repository. PowerDesigner documentation uses specific typefaces to help you readily Typographic conventions identify specific items: monospace text (normal and bold) Used for: Code samples, commands, compiled functions and files, references to variables.
  • Page 12 About This Book PowerDesigner...
  • Page 13: Xml Model Basics

    C H A P T E R XML Model Basics About this chapter This chapter presents PowerDesigner XML Model. It provides you with an introduction to the basic notions of XML modeling. Contents Topic Page Functional overview What is an XML model?
  • Page 14: Functional Overview

    Functional overview Functional overview With the graphical interface and the Browser tree view of PowerDesigner XML Model, you can design an XML diagram which represents the content of an XML Schema Definition file (.XSD), a Document Type Definition file (.DTD) or an XML-Data Reduced file (.XDR). Since XML structures can be very complex, it is much easier to visualize them through comprehensive and explicit diagrams, than to read XML-coded pages.
  • Page 15: What Is An Xml Model

    Chapter 1 XML Model Basics What is an XML model? An XML model is a graphical representation of an XML Schema Definition file (.XSD), a Document Type Definition file (.DTD) or an XML-Data Reduced file (.XDR). With its Browser tree view and diagram, an XML model gives you a global and schematic view of all the elements composing an XSD, a DTD or an XDR file.
  • Page 16: About Xml

    What is an XML model? About XML Why use XML? The eXtensible Markup Language is used for different reasons: It describes and structures data, whereas HTML only displays data It uses a self-describing and personalized syntax It can be exchanged between incompatible systems, since data is stored in plain text format DTD, XSD or XDR The structure of an XML model is described by a DTD, an XSD or an XDR...
  • Page 17: Objects In An Xml Model

    Chapter 1 XML Model Basics Extract of an XSD file: An XSD file always starts with the <schema> tag (root element). All objects created in the model will appear in the XSD file between the schema start-tag and end-tag An XDR file is a simplified XSD file (or schema). It does not support simple and complex user-defined data types Extract of an XDR file: An XDR file always starts with the <schema>...
  • Page 18 What is an XML model? An XML model is a tree structure of child elements attached to parent elements. Elements are the basic describing items of an XML model. They can be made of other elements combined in different ways through group particles.
  • Page 19 Chapter 1 XML Model Basics Tool Object Description — Notation A notation is used to define and process non- XML objects within an XML model These tools are available in the palette of the diagram window. The main objects of an XML model are represented by symbols in its diagram.
  • Page 20: How To Link A Child Object To A Parent Object In An Xml Model

    What is an XML model? How to link a child object to a parent object in an XML model? XML objects do not support standard link objects. To link a child object to a parent object, you must click the child object tool in the palette and then click the symbol of the parent object in the diagram.
  • Page 21 Chapter 1 XML Model Basics Tool Sequence symbol Choice symbol All symbol No link No link No link No link No link Caution A group particle (sequence, choice, all) cannot be created from scratch in a diagram. It must be the child element of an element, a group or a complex type. For more information, see sections How to link a child object to an element, How to link a child object to a group particle, How to link a child object to a group of elements, How to link a child object to a complex type,...
  • Page 22: Defining The Xml Model Environment

    Users are invited to assist Sybase by testing fixes of the definition provided by Sybase and report any continuing inconsistencies.
  • Page 23: Changing The Xml Language Of An Xml Model

    Chapter 1 XML Model Basics Changing the XML language of an XML model If you change the XML language of an XML model, you have to define the status of the language: language Description Share To use the shared XML language stored in the XML Languages directory of your installation.
  • Page 24 Defining the XML model environment Click OK. A message box informs you that the current XML language has been changed. Click OK. Changes concerning simple and complex types Simple types and complex types are only supported by XSDs (schemas). When changing an XSD into a DTD or an XDR, simple types and global complex types (directly linked to the <schema>...
  • Page 25: Selecting Extended Model Definitions At Model Creation

    Chapter 1 XML Model Basics Selecting extended model definitions at model creation Extended model definitions (.XEM files) provide means for customizing and extending PowerDesigner metaclasses, parameters and generation. Extended model definitions are typed like models in PowerDesigner. You create an extended model definition for a specific type of model and you cannot share these files between heterogeneous models.
  • Page 26: Defining Model Options

    Defining the XML model environment For more information on extended model definitions, see chapter Extended Model Definitions Reference Guide, in the Advanced User Documentation. Defining model options Name/Code case You can define the case sensitivity of names and codes for all objects in the sensitive current model.
  • Page 27: Xml Model Extended Dependencies

    Chapter 1 XML Model Basics To define XML model options: Select Tools Model Options. Right-click the diagram background and select Model Options in the contextual menu. The Model Options dialog box opens to the Model Settings pane. Select or clear the Name/Code case sensitive check box in the All Objects groupbox.
  • Page 28 Defining the XML model environment You can type stereotypes directly in the Stereotype column of the object property sheet or select a value from the dropdown listbox if you have previously defined stereotypes in an embedded or imported extended model definition (.XEM).
  • Page 29: Defining An Xml Model

    Chapter 1 XML Model Basics Defining an XML model This section presents the main operations you have to perform before starting to build or work on an XML model. Defining model properties The model property sheet displays the definition of the current model. Only the specific pages of an XML model are explained in this section.
  • Page 30 Defining an XML model If you want to display the XML language, click the Properties tool beside the XML language box in the General page to display the property sheet of the XML language. Click OK. Model General page The General page of the model property sheet displays the following properties: Property Description...
  • Page 31 Chapter 1 XML Model Basics Model Detail page The Detail page of a model property sheet (only available in a model targeted with XSD) displays the following properties: Property Description Target Namespace of all the model objects. Its name is a URI which Namespace does not refer to any file but only to an assigned name.
  • Page 32 Defining an XML model Model Items page The Items page of the model property sheet displays the list of global objects (with no parent symbol in the diagram, directly linked to the <schema> tag) created in the model. This list reflects the order in which global objects are being declared in the schema.
  • Page 33 Chapter 1 XML Model Basics Tool Tooltip Description Add Annotation Adds an annotation to the model, to provide documentation or application information. Only available in a model targeted with XSD For more information on these items, see chapter Building an XML model.
  • Page 34 Defining an XML model Model Namespaces page A namespace is a URI indicating a location where objects are declared. The prefix of a namespace, followed by a colon (:) and the name of an object, indicates that this object is declared in that namespace. Namespaces are not supported by DTDs.
  • Page 35 Chapter 1 XML Model Basics In the case of a model targeted with XDR, two namespaces are predefined in the list of namespaces. XSM User's Guide...
  • Page 36: Creating An Xml Model

    Defining an XML model Model Preview page The Preview page of the model property sheet displays a preview of the XSD, DTD or XDR file generated from the XML model. Example of an XSD file (or schema file): The schema file starts with the XML declaration followed by the <schema> (root element) declaration.
  • Page 37 Chapter 1 XML Model Basics Creating an XML model using the New model option When you create a new XML model using the New model option, you have to select an XML language. You can then select one of the following options: Option Description Share...
  • Page 38 Defining an XML model <optional> If you want to attach one or more extended model definitions to the model, click the Extended Model Definitions tab, and select the extended model definitions of your choice. For more information on attaching extended model definitions to a model, see section Selecting extended model definitions at model creation.
  • Page 39 Chapter 1 XML Model Basics Creating an XML model using the New model from template option To create a new XML model using the New model from template option: Select File New to display the New dialog box. Select XML Model in the list of model types. Select the New model from template radio button in the upper right part of the dialog box to display the Template page.
  • Page 40: Opening An Existing Xml Model

    Defining an XML model Opening an existing XML model An XML model has the file extension .XSM. Choose XML If PowerDesigner cannot find the XML language attached to the XML model language you want to open, the Choose XML Language dialog box appears to let you select another XML language to attach to the model.
  • Page 41: Saving And Closing An Xml Model

    Chapter 1 XML Model Basics Saving and closing an XML model Saving an XML To save an XML model, choose one of the following options: model Select File Save Click the Save tool in the standard toolbar Right-click the XML model in the Browser tree view and select Save in the contextual menu If it is the first time you save an XML model, a standard Windows Save As dialog box appears: Type a file name, choose a folder in your directory and...
  • Page 42 Defining an XML model PowerDesigner...
  • Page 43: Building An Xml Model

    C H A P T E R Building an XML model About this chapter This chapter describes how to build an XML model (XSM). It explains the role of each object in an XML model and how to create and modify them. Contents Topic Page...
  • Page 44: Xml Diagram Basics

    XML diagram basics XML diagram basics You can create XML diagrams in an XML model. Defining an XML diagram An XML diagram is a graphical view of an XML model. The following example shows the diagram of the Resume XML model: The main objects of an XML model are represented by symbols in its diagram.
  • Page 45: Why Build An Xml Diagram

    XML document if you are not familiar with the syntax of XML Schema Definition (XSD), Document Type Definition (DTD) or XML-Data Reduced (XDR). With the user-friendly graphical interface of PowerDesigner XML Model, you can build an XML diagram and then generate automatically an XSD, a DTD or an XDR file.
  • Page 46: Creating An Xml Diagram

    XML diagram basics Creating an XML diagram There are two ways to create an XML diagram: From a new XML model From an existing XML model For information on creating an XML diagram from a new XML model, see section Creating an XML model in chapter XML Model Basics. For information on creating an XML diagram from an existing XML model, see section Creating a new diagram in chapter Managing Models in the General Features Guide.
  • Page 47: Defining Elements

    Chapter 2 Building an XML model Defining elements Elements are the basic building blocks of an XML model. An XML model is a tree structure of elements where child elements are attached to parent elements. For example (Browser tree view and diagram): XSM User's Guide...
  • Page 48: Defining Element Properties

    Defining elements Generated schema: In a schema, elements are declared with <element> tags. Defining element properties To display an element property sheet, double-click its symbol in a diagram. PowerDesigner...
  • Page 49 Chapter 2 Building an XML model Element general properties There are global and local elements: Global elements have no parent element in a diagram. They are directly linked to the <schema> tag (root element) in a schema. They can be reused in the model through referencing elements (See “XML_declaration”...
  • Page 50 Defining elements Property Description Reference Name of a global element. The current element will have the same properties as the global element. The Reference property is only available for child elements. Use the dropdown listbox to select a global element in the current model. Use the Browse tool to select a global element from any model opened in the current workspace.
  • Page 51 Chapter 2 Building an XML model Defining elements In a model targeted with the XML-Data Reduced language, elements are in XDR files defined by different attributes: Property or page XDR attribute in element for an element Description property sheet To specify if a global element can —...
  • Page 52 Defining elements Example of an XDR file: Element detail properties The Detail page of an element property sheet displays the following properties: Property Description Minimum Minimum number of times the element can occur. To specify that the element is optional, set this attribute to zero Maximum Maximum number of times the element can occur.
  • Page 53 Chapter 2 Building an XML model Property Description Nillable Property defining if the element is null or not In the case of a model targeted with XDR, the Detail page is only available for local elements. Element attributes properties Attributes give additional information about an element. The Attributes page of an element property sheet allows you to add attributes to an element declaration: Tool...
  • Page 54 Defining elements Element constraints properties Identity constraints allow you to indicate that element values must be unique within their specified scope. You can use the Constraints page of an element property sheet to add the following constraints to an element declaration: Tool Tooltip Description...
  • Page 55: Creating An Element

    Chapter 2 Building an XML model Attributes Mapping The Attributes Mapping page allows you to define the mapping between page PDM columns or OOM class attributes and the element attributes. Tool Tooltip Description Add Mapping Use this tool to select the attributes in the current element that will be mapped to PDM columns or OOM class attributes.
  • Page 56 Defining elements Click the Pointer tool in the palette. Right-click to recover the Pointer. Double-click the element symbol in the diagram. The element property sheet appears. Type a name and a code for the element. Select a data type for the element. You can use the Type dropdown listbox or the Browse tool.
  • Page 57: How To Link A Child Object To An Element

    Chapter 2 Building an XML model How to link a child object to an element? XML objects do not support standard link objects. To link a child object to an element, you must click the child object tool in the palette and then click the element symbol in the diagram.
  • Page 58: Defining The Attributes Of An Element

    Defining elements Tool Action Result If you click an element symbol with the Complex Type tool, a complex type symbol appears superposed, but not linked, to the No link element symbol. A global complex type cannot be the child of an element If you click an element symbol with the Sequence tool, a sequence group particle appears...
  • Page 59 Chapter 2 Building an XML model For example: Generated schema: In a schema, attributes are declared with <attribute> tags. XSM User's Guide...
  • Page 60 Defining elements Attribute general properties There are global and local attributes: Global attributes are defined with the Model menu. In a schema, they are directly linked to the <schema> tag (root element). They can be reused for any element in the model through references (See “NUMBER” attribute in the generated schema) Local attributes only apply to the elements in which they are created.
  • Page 61 Chapter 2 Building an XML model Property Description Reference Name of an attribute in the current model or another model opened in the workspace. A reference allows you to reuse an attribute with all its properties without having to define it again.
  • Page 62 Defining elements Example of an XDR file: Attribute detail properties The Detail page of an attribute property sheet displays the following properties: Property Description Default Default value. Enter a default value only if there is no fixed value Fixed Fixed value. Enter a fixed value only if there is no default value Indicator of how the attribute is used.
  • Page 63 Chapter 2 Building an XML model Element values with XDR In a model targeted with the XML-Data Reduced language, there is also a Values page in the element property sheet. Adding an attribute to an element To add an attribute to an element: Double-click the element symbol in the diagram.
  • Page 64: Modifying Element Display Preferences

    Defining elements The element symbol appears in the diagram with the attribute name. In the example, <None> indicates that no data type has been defined for the attribute. Modifying element display preferences You can modify the following display preferences for an element by selecting Tools Display Preferences: Preference Description...
  • Page 65 Chapter 2 Building an XML model Child elements are linked to their parent element through a group particle. Defining group particles Group particles indicate how child elements are related with their parent element. You can choose a group particle from the following list: Tool Tooltip Description...
  • Page 66 Defining elements Group particles properties To display a group particle property sheet, double-click its symbol in a diagram. General properties The General page of a group particle property sheet displays the following properties: Property Description Type Type of the group particle. You can change its type by selecting a value in the dropdown listbox and clicking OK Minimum Minimum number of times the group particle can occur.
  • Page 67 Chapter 2 Building an XML model You can access directly to the Items page of a group particle property sheet through the contextual menu. Right-click a group particle symbol in the diagram and select Items in the contextual menu. Creating a group particle There are different ways to create a group particle.
  • Page 68 Defining elements Click OK. The group particle symbol appears selected, with an Expand tab on its right side. Click an empty space in the diagram, to deselect the group particle symbol, and click the Expand tab to reveal the child element symbols and their link.
  • Page 69 Chapter 2 Building an XML model The child elements appear one by one in the diagram, linked to the group particle symbol. Right-click to recover the Pointer. Clicking an element symbol with the Element tool When you click an element symbol with the Element tool, a sequence symbol (by default) appears in the diagram between the parent element and the child element.
  • Page 70: Defining Any Properties

    Defining elements Tool Sequence symbol Choice symbol All symbol A referencing group A referencing group No link is created. You must is created. You must now select a group now select a group for the reference for the reference No link No link No link No link...
  • Page 71 Chapter 2 Building an XML model Generated XSD file: In an XSD file, Any is declared with the <any> tag. Generated DTD file: In a DTD file, Any is declared within an <!ELEMENT> tag with the keyword “ANY”. Generated XDR file: In an XDR file, Any is declared through of an <ElementType>...
  • Page 72 Defining elements Property Description ID of the Any. Its value must be of type ID and unique within the model containing the Any. Only available in a model targeted with XSD Namespace Namespaces containing the objects that can be used. If you select ##any, objects from any namespace can be used.
  • Page 73: Modifying The Any Display Preference

    Chapter 2 Building an XML model Define the Any properties in the different pages of the property sheet. Click OK. Modifying the Any display preference You can modify the Stereotype display preference for Any by selecting Tools Display Preferences. Defining Any Attribute properties The Any Attribute feature allows you to insert any attribute of specified namespaces into an element, a complex type or an attribute group declaration.
  • Page 74 Defining elements For example: Caution Any Attribute only appears in a schema (see the Preview page of a model property sheet). The Any Attribute feature is available via a check box in the bottom-left corner of an Attributes page. To display an Any Attribute property sheet, select the Any Attribute check box and then click the Properties tool.
  • Page 75 Chapter 2 Building an XML model Any Attribute general properties The General page of an Any Attribute property sheet displays the following properties: Property Description ID of the Any Attribute. Its value must be of type ID and unique within the model containing the Any Attribute Namespace Namespaces containing the attributes that can be used.
  • Page 76: Defining Identity Constraints

    Defining identity constraints Defining identity constraints Identity constraints enable you to indicate that element values must be unique within their specified scope. There are three kinds of identity constraints: unique, key and keyRef. Each identity constraint has two specific attributes: selector and field. In a schema, an identity constraint is declared with its corresponding tag: <unique>, <key>...
  • Page 77 Chapter 2 Building an XML model The UNIQUENUM unique constraint, defined on the project element, specifies that the numEmployee attribute must be unique or null within the employee element To display a unique property sheet, double-click its name or its icon in the Browser tree view.
  • Page 78: Defining A Key Constraint

    Defining identity constraints Defining a key constraint A key constraint specifies that an element or an attribute value (or set of values) must be a key within a specified scope. A key means that data should be unique, not null and always present within a specified scope.
  • Page 79: Defining A Keyref Constraint

    Chapter 2 Building an XML model Key general properties The General page of a key property sheet displays the following properties: Property Description Name Name of the key constraint. It must be a no-colon-name (See Glossary) Code Code of the key constraint. It must be a no-colon-name Comment Descriptive label of the key constraint Stereotype...
  • Page 80 Defining identity constraints For example: Generated schema: The KEYREF_UNIGOLD keyRef, defined on the product element, by reference to the UNIGOLD unique constraint, specifies that the gold attribute must be unique or null within the component_2 element, as well as it must be unique or null within the component_1 element (See UNIGOLD).
  • Page 81: Creating An Identity Constraint

    Chapter 2 Building an XML model KeyRef general properties The General page of a keyRef property sheet displays the following properties: Property Description Name Name of the keyRef constraint. It must be a no-colon-name (See Glossary) Code Code of the keyRef constraint. It must be a no-colon-name Comment Descriptive label of the keyRef constraint Stereotype...
  • Page 82: Defining An Identity Constraint Selector

    Defining identity constraints To create an identity constraint from an element property sheet: Click the Constraints tab of an element property sheet. Click the Add Unique, Add Key or Add KeyRef Constraint tool in the Constraints page. An identity constraint appears in the list with predefined name and code (a unique constraint in the example).
  • Page 83 Chapter 2 Building an XML model XPath abbreviated syntax You can use the following abbreviated syntax to define an XPath expression: Syntax Description Root node of the XML document. It is the root element with its ramifications Selects the context node. It is the current element (on which an identity constraint is defined) with its ramifications Selects the context node parent...
  • Page 84 Defining identity constraints Syntax Description /book/chapter[2]/section[3] Selects the third section in the second chapter of the book employee[@dept=”doc”] Selects all the employee child elements of the context node with a dept attribute set to doc employee[@dept=”doc”][3] Selects the third employee child element of the context node with a dept attribute set to doc employee[3][@dept=”doc”] Selects the third employee child element of the...
  • Page 85: Defining An Identity Constraint Field

    Chapter 2 Building an XML model Click Apply. Click the Properties tool beside the XPath box. The selector property sheet appears. Define the selector properties in the different pages of the property sheet. Click OK. Defining an identity constraint field The Fields page of an identity constraint lets you type one or more XPath expressions to specify the values used to define an identity constraint (unique, key or keyRef).
  • Page 86 Defining identity constraints Defining field general properties The General page of a field property sheet displays the following properties: Property Description XPath An XPath expression relative to each element selected by the selector of the identity constraint. It identifies a single element (with a simple type) whose content or value is used for the identity constraint Stereotype...
  • Page 87 Chapter 2 Building an XML model The field property sheet appears. Define the field properties in the different pages of the property sheet. Click OK. XSM User's Guide...
  • Page 88: Defining Groups

    Defining groups Defining groups You can define groups of elements or attributes in an XML model. Defining a group of elements A group of elements is a set of elements arranged by a group particle (all, choice or sequence). You create a group of elements when you need to reuse a set of elements in several parts of your model.
  • Page 89 Chapter 2 Building an XML model In the generated XSD file, the group is first declared with the <group> tag and then reused through a reference (ref) set to descriptionLines: In the generated DTD file, the group is expanded directly within its parent element: In the generated XDR file, the group is declared through a <group>...
  • Page 90 Defining groups Referencing groups are created in a diagram within an element, a complex type or a global group. You must select a global group for their Reference property (See the following table) Groups in DTD and XDR files In a model targeted with DTD or XDR language, there are no global or referencing groups, although they appear on the diagram.
  • Page 91 Chapter 2 Building an XML model Once you have defined the reference of a referencing group, you can locate the referenced group in the diagram by right-clicking the referencing group symbol and selecting Find Referenced Group in the contextual menu. The referenced group appears with handles in the diagram.
  • Page 92 Defining groups Type a name and a code for the group. Click OK. Select a group particle tool in the palette (Sequence, Choice or All). Click the group symbol in the diagram. The group particle symbol appears attached to the group symbol. Select the Element tool in the palette.
  • Page 93: How To Link A Child Object To A Group Of Elements

    Chapter 2 Building an XML model How to link a child object to a group of elements? XML objects do not support standard link objects. To link a child object to a group, you must click the child object tool in the palette and then click the group symbol in the diagram.
  • Page 94: Modifying The Group Display Preference

    Defining groups Pointer indications When you cannot click a symbol or an empty space in a diagram, the Pointer displays a forbidden sign (See complex type in Tool column). When there is a possibility to create a symbol above, below or next to another one, the Pointer displays an arrow indicating the corresponding direction (See element in Tool column).
  • Page 95 Chapter 2 Building an XML model Generated XSD file: In a schema, a group of attributes is declared with the <attributeGroup> tag. It can contain the following tags: <attribute>, <attributeGroup> or <anyAttribute>. Generated DTD file: Attribute groups are not supported by XDR. Defining attribute group properties To display an attribute group property sheet, double-click its name or its icon in the Browser tree view.
  • Page 96 Defining groups The General page of an attribute group property sheet displays the following properties: Property Description Name Name of the attribute group. It must be a no-colon-name (See Glossary). Required when the attribute group is global Code Code of the attribute group. It must be a no-colon-name. Required when the attribute group is global Comment Descriptive label of the attribute group...
  • Page 97 Chapter 2 Building an XML model Tool Tooltip Description Add Attribute Group with Adds one or several attribute groups with Reference to Attribute a reference to attribute groups defined in Group from a Selection the current model. Select one or several attribute groups in the Selection dialog Any Attribute Adds any attribute of a specified...
  • Page 98 Defining groups Type a name and a code for the attribute group. Click OK. Select the Attributes page. Select different tools to add items to the attribute group. Click Apply. Double-click on the left of a row to display an item property sheet. Type a name and a code for the item.
  • Page 99: Managing External Shortcuts Through References And Data Types

    Chapter 2 Building an XML model Managing external shortcuts through references and data types External shortcuts allow you to share objects between different models. You can define external shortcuts in an XML model, but you cannot use them directly in the model, except as substitution groups for elements (see Detail page in element property sheet).
  • Page 100 Managing external shortcuts through references and data types Example of shortcuts through a reference and a data type: PowerDesigner...
  • Page 101: Defining Simple Types

    Chapter 2 Building an XML model Defining simple types You can only define simple types in a model targeted with XSD. What is a simple type? A simple type is a data type definition for elements or attributes with text- only content.
  • Page 102: Defining Simple Type Properties

    Defining simple types Defining simple type properties To display a simple type property sheet, double-click its name or its icon in the Browser tree view. The General page of a simple type property sheet displays the following properties: Property Description Name Name of the simple type.
  • Page 103 Chapter 2 Building an XML model The simple type property sheet appears. Type a name and a code for the simple type. Click OK. The simple type symbol appears in the diagram. Caution If the simple type symbol does not appear in the diagram, select Show Symbols in the Symbol menu, then click the Simple Type tab and select the simple type box to display its symbol in the diagram.
  • Page 104: Defining Complex Types

    Defining complex types Defining complex types You can only define complex types in a model targeted with XSD. What is a complex type? A complex type is a data type definition used to define attributes and child elements of a parent element. It is a template for a data type definition that can be reused and derived by extension or restriction.
  • Page 105: Defining Complex Type Properties

    Chapter 2 Building an XML model Caution Global complex types appear in the model as objects, with their corresponding symbol in the diagram. Local complex types only appear in the schema (see Preview page of an element property sheet). Defining complex type properties To display a complex type property sheet, double-click its symbol in a diagram.
  • Page 106 Defining complex types Complex type detail properties The Detail page of a complex type property sheet displays the following properties: Property Description Final Property to prevent derivation of the current complex type Block Property to prevent another complex type with the specified type of derivation from being used in place of the current complex type Mixed...
  • Page 107 Chapter 2 Building an XML model Tool Tooltip Description Add Attribute Group with Adds one or several attribute groups with Reference to Attribute a reference to attribute groups defined in Group from a Selection the current model. Select one or several attribute groups in the Selection dialog Any Attribute Adds any attribute of a specified...
  • Page 108: Modifying Complex Type Display Preferences

    Defining complex types Icon Tool Description Create from Sources To copy abstract data type attributes or class attributes to the current complex type attributes Generate Mapping To automatically generate a mapping between abstract data type attributes or class attributes and complex type attributes with same name or code in the data source and the current model For more information on complex type mapping, see section Mapping...
  • Page 109 Chapter 2 Building an XML model To create a complex type from the palette: Select the Complex Type tool in the palette. Click an empty space in the diagram. A complex type symbol appears in the diagram at the click position. Click the Pointer tool in the palette.
  • Page 110: How To Link A Child Object To A Complex Type

    Defining complex types 10 Click the group particle symbol in the diagram for each child element you want to create. The child element symbols appear attached to the group particle symbol. 11 Double-click a child element symbol to display its property sheet. 12 Type a name and a code for the child element.
  • Page 111 Chapter 2 Building an XML model Tool Action Result If you click a complex type symbol with the Group tool, a referencing group is created. You can modify the group particle via its property sheet. You must now select a group for the reference If you click a complex type symbol with the Complex...
  • Page 112: Defining Simple Content Properties

    Defining complex types Defining simple content properties A simple content allows you to extend or restrict the values of a complex type supporting character data or a simple type. It cannot contain elements. Simple content The General page of a simple content property sheet allows you to define an general property id for the simple content.
  • Page 113: Defining Complex Content Properties

    Chapter 2 Building an XML model Defining complex content properties A complex content allows you to extend or restrict the values of a complex type with mixed content (character data and elements) or elements only. Complex content The General page of a complex content property sheet displays the following general properties properties: Property...
  • Page 114: Defining Derivations

    Defining derivations Defining derivations You use derivations when you want to extend or restrict the values of simple and complex types. An XML model allows you to derive: Simple types by restriction, list or union Complex types by extension or restriction Derivation in element property sheet When you define a derivation in an element property sheet, a simple or a complex type is automatically created within the element declaration (See...
  • Page 115 Chapter 2 Building an XML model Generated schema: Defining extension The General page of an extension property sheet displays the following general properties properties: Property Description ID of the extension. Its value must be of type ID and unique within the model containing the extension Base Type Data type on which the extension is based To define a derivation by extension:...
  • Page 116: Deriving By Restriction

    Defining derivations Type an ID and select a base type. Click OK. Deriving by restriction You derive a simple type or a complex type by restriction when you want to restrict the values of their base type. Restriction on a simple type The property sheet of a simple type restriction displays several specific pages: General...
  • Page 117 Chapter 2 Building an XML model Restriction general The General page of a simple type restriction property sheet displays the properties following properties: Property Description ID of the simple type restriction. Its value must be of type ID and unique within the model containing the simple type restriction Base type Data type on which the restriction is based.
  • Page 118 Defining derivations Icon Facet Description Fraction digits Maximum number of decimal digits in the fractional part Whitespace Way of handling white spaces. If the value is Preserve, white spaces are unchanged. If the value is Replace, tabs, line feeds and carriage returns are replaced with spaces.
  • Page 119 Chapter 2 Building an XML model For example: the meetings simple type, based on the xs:gMonthDay data type, is restricted to the following dates: 01/20, 03/20, 05/20 and 07/20. Generated schema: Restriction patterns The Patterns page of a simple type restriction property sheet allows you to properties enter the exact sequence of acceptable values for the simple type restriction.
  • Page 120 Defining derivations For example: the zipCode simple type, based on the xs:string data type, is restricted to the following pattern: two uppercase letters, from A to Z, followed by a five-digit number, each digit ranging from 0 to 9. Generated schema: Creating a restriction on a simple type You derive a simple type by restriction when you want to restrict the values of its base type.
  • Page 121 Chapter 2 Building an XML model Select Restriction in the dropdown listbox of the Derivation box. Click Apply. Click the Properties tool beside the Derivation box. The restriction property sheet appears. Type an ID and a base type for the simple type restriction. XSM User's Guide...
  • Page 122 Defining derivations If you select Embedded type, the base type disappears and a simple type is created in the schema within the current simple type. Click Apply, and then the Properties tool beside the Embedded type box, to define a derivation and a base type for the embedded simple type.
  • Page 123 Chapter 2 Building an XML model 10 Type an ID and select the Fixed box, if needed. 11 Click OK. Enumeration and Pattern facets For Enumeration and Pattern facets, click their corresponding tabs in the restriction property sheet and double-click the arrow left of an enumeration or a pattern value to display its property sheet.
  • Page 124: Deriving By List

    Defining derivations The Content box is set to Complex. Click Apply. Click the Properties tool beside the Derivation box. The restriction property sheet appears. Type an ID and a base type for the complex type restriction. Click OK. Deriving by list You derive a simple type by list when you want to define it as a list of values of a specified data type.
  • Page 125: Deriving By Union

    Chapter 2 Building an XML model To define a simple type derivation by list: Select List in the Derivation dropdown listbox of a simple type property sheet. Click Apply. Click the Properties tool beside the Derivation box. The simple type list property sheet appears. Enter an ID and a type for the simple type list.
  • Page 126 Defining derivations Union general The General page of a simple type union property sheet displays the properties following properties: Property Description ID of the simple type union. Its value must be of type ID and unique within the model containing the simple type union Member Types White space separated list of built-in data types.
  • Page 127: Defining Annotations

    Chapter 2 Building an XML model Defining annotations You define annotations when you want to add information about an XML model. Annotations are made of Documentation and Application Information: Documentation allows you to write a URI reference or any well-formed XML content that will give extra information about XML objects or documents Application Information allows you to write a URI reference or any well-...
  • Page 128: Defining Annotation Properties

    Defining annotations This global annotation is composed of a documentation, with a well-formed XML content (extract of a DTD file), and an application information. Annotations are only available in models targeted with XSD. Defining annotation properties To display an annotation property sheet, double-click its name or icon in the Browser tree view.
  • Page 129: Defining Application Information Properties

    Chapter 2 Building an XML model You can display a documentation property sheet: By double-clicking its name or icon in the Browser tree view By double-clicking left of its row in the Items page of an annotation property sheet Documentation general properties The General page of a documentation property sheet displays the following properties: Property...
  • Page 130: Creating An Annotation

    Defining annotations Application information content The Content page of an application information property sheet allows you to write or paste any well-formed XML content. Creating an annotation You can create a global annotation from the Items page or the External Schemas page of a model property sheet.
  • Page 131 Chapter 2 Building an XML model Type an ID for the annotation. Click OK. XSM User's Guide...
  • Page 132: Defining Notations

    Defining notations Defining notations Notations allow you to define and process non-XML objects within an XML model. For example: picture files with a .GIF extension. Generated schema: Notations are not available on models targeted with XDR. Defining notation properties To display a notation property sheet, double-click its name or its icon in the Browser tree view.
  • Page 133: Creating A Notation

    Chapter 2 Building an XML model Creating a notation You can create a notation: From the Browser tree view From the List of Notations in the Model menu To create a notation from the Browser tree view: Right-click the name or the icon of the model to display the contextual menu.
  • Page 134: Defining Entities

    Defining entities Defining entities Entities enable you to include predefined values, external XML or non-XML files in an XML model targeted with a DTD. When an XML processor reads an entity reference in an XML document, it will replace this entity reference by its value defined in the DTD file of the XML document.
  • Page 135: Creating An Entity

    Chapter 2 Building an XML model Property Description Value Value of the entity. A string of characters in the case of a predefined value. A URI in the case of an XML or a non-XML file. For example: http://something.com/pictures/logo.gif Public URI reference identifying the non-XML object.
  • Page 136 Defining entities Type a value. Click OK. PowerDesigner...
  • Page 137: Defining Import, Include And Redefine

    Chapter 2 Building an XML model Defining import, include and redefine Import, Include and Redefine allow you to enrich your XML model with external namespaces, schema files or schema components. Import, Include and Redefine are only available in a model targeted with XSD.
  • Page 138 Defining import, include and redefine Property Description Comment Descriptive label of the import Stereotype Sub-classification used to extend the semantics of an object without changing its structure. It can be predefined or user- defined Creating an import You can create an import: From the Browser tree view From the List of Imports in the Model menu To create an import from the Browser tree view:...
  • Page 139: Defining An Include

    Chapter 2 Building an XML model Defining an include An include allows you to include a specified schema file in the target namespace of the current schema. With an include, you can use schema components from any schema with the same target namespace as the current schema or with no specified target namespace.
  • Page 140: Defining A Redefine

    Defining import, include and redefine Creating an include You can create an include: From the Browser tree view From the List of Includes in the Model menu To create an include from the Browser tree view: Right-click the name or the icon of the model to display the contextual menu.
  • Page 141 Chapter 2 Building an XML model With a redefine, you can use schema components from any schema with the same target namespace as the current schema or with no specified target namespace. In a schema, a redefine is declared with the <redefine> tag. For example: Defining redefine properties To display a redefine property sheet, double-click its name or its icon in the...
  • Page 142 Defining import, include and redefine Redefine items The Items page of a redefine property sheet displays a list of items to be properties redefined. Tool Tooltip Description Group Adds a group of elements to be redefined Attribute Group Adds a group of attributes to be redefined Simple Type Adds a simple type to be redefined Complex Type...
  • Page 143 Chapter 2 Building an XML model Define redefine properties in the different pages. Click OK. XSM User's Guide...
  • Page 144: Defining Business Rules

    Defining business rules Defining business rules You can define business rules in an XML model and attach them to objects. What is a business rule? A business rule is a written statement specifying what an XML model must contain or how it must be structured to support business needs. A business rule is a rule that your business follows.
  • Page 145: Creating A Business Rule

    Chapter 2 Building an XML model You can define several types of business rules in an XML model: Type Description Example Constraint Additional check constraint The start date should be on a value inferior to the end date of a project Definition Properties of an element in...
  • Page 146 Defining business rules To create a business rule from the List of Business Rules: Select Model Business Rules to display the List of Business Rules. Click the Add a Row tool. Click a blank line in the list. A rule appears with generic name, code and rule type (Definition, by default).
  • Page 147: Applying A Business Rule To An Xml Object

    Chapter 2 Building an XML model In the General page, select a business rule type in the Type dropdown listbox. Click OK. Applying a business rule to an XML object Once you have defined a business rule in the List of Business Rules, you can apply this business rule to an XML object.
  • Page 148 Defining business rules To apply a business rule to an XML object: Double-click an object in the model to display the object property sheet. Click the Rules tab to display the Rules page. Click the Add Rules tool to display the list of business rules. The Selection window appears.
  • Page 149 Chapter 2 Building an XML model Select the business rules you want to add to the object. Click OK. The business rules are added to the object and appear in the list of business rules for the object. Click OK. U Column in the List of business rules When you apply a business rule to an object, the U (Used) column beside this business rule is automatically checked in the List of...
  • Page 150 Defining business rules PowerDesigner...
  • Page 151: Working With An Xml Model

    C H A P T E R Working with an XML model About this chapter This chapter describes how you can work with an XML model and how you can generate an XML model from a PDM or an OOM. When building an XML model, you can check the validity of your model at any time, with the Check Model feature.
  • Page 152: Checking An Xml Model

    Checking an XML model Checking an XML model The XML Model is a very flexible tool. It should allow you to build your model without any controls or constraints on data exchange and consistency of the system. However, you can use the Check Model feature at any time to control the consistency and correctness of the model you are building.
  • Page 153: Xml Model Object Selection In The Check Model

    Chapter 3 Working with an XML model These messages represent two different levels of problem severity. You can modify the level of problem severity for each object parameter verified by the Check model. This severity level can depend on the degree of normalization you want to achieve in your model.
  • Page 154: Checking An Xml Model

    Checking an XML model Checking an XML model You can check the validity of an XML model at any time. To check an XML model: Select Tools Check Model. Right-click the diagram background and select Check Model from the contextual menu. The Check Model Parameters dialog box opens to the Options page.
  • Page 155 Chapter 3 Working with an XML model Click an object tab at the bottom of the Selection page. The corresponding object page displays all the objects in the current XML model. Select check boxes only for objects you want to be checked. Clear check boxes for objects that you do not want to be checked.
  • Page 156: Displaying Previously Applied Check Options In An Xml Model

    Checking an XML model The Check Model Result List displays errors and warnings based on the check options you have defined. Dockable result window When you right-click an object parameter in the Result List, a contextual menu appears listing correction options. Among these, you can also select options to clear, dock or hide the result window.
  • Page 157: Making Corrections Based On Xml Model Check Results

    Chapter 3 Working with an XML model Making corrections based on XML model check results You use the Check Model feature to locate and correct problems in an XML model. Using the Check toolbar generally located in the upper part of the PowerDesigner main window, you have access to the following correction options when you select an error in the Result List: Symbol...
  • Page 158 Checking an XML model Making manual corrections to an XML model Some errors cannot be corrected automatically, they have to be corrected manually. To make manual corrections to an XML model: Select an object parameter from the Result List. Right-click the object parameter and select Correct from the contextual menu to display the object property sheet.
  • Page 159: Xml Model Objects Verified By Check Model

    Chapter 3 Working with an XML model XML Model objects verified by Check Model The Check Model verifies the validity of XML model objects. When errors are encountered during a check model, corrections can be made manually or automatically. Manual corrections depend on how you are using your model.
  • Page 160: Model Check

    XML Model objects verified by Check Model Model check This check only applies to models built on a schema. During a model check, the following object controls are made. Identifier uniqueness Two or more objects cannot have the same identifier (ID). Manual correction Automatic correction Give a unique identifier to each object...
  • Page 161: Business Rule Check In An Xsm

    Chapter 3 Working with an XML model Missing namespaces There should be at least one namespace defined for the model. Manual correction Automatic correction Type a URI and a prefix in the Adds the target namespace URI and a Namespaces page of the model property prefix “ns”...
  • Page 162: File Check

    XML Model objects verified by Check Model Data source name and code uniqueness There cannot be two data sources with identical names and/or codes in a model. Manual correction Automatic correction Rename one of the data sources Renames the data source by appending a number to its name or code Existence of model...
  • Page 163: Entity Check

    Chapter 3 Working with an XML model Embedded file name uniqueness A model cannot contain two embedded files with identical names. Manual correction Automatic correction Rename one of the embedded files Renames the file by appending a number to its name Existence of external file location An external file should have a valid path location.
  • Page 164: Include Check

    XML Model objects verified by Check Model Include check During an include check, the following object control is made. Undefined schema location You must define a schema location for an include. Manual correction Automatic correction Define a URI or select a schema file for —...
  • Page 165: Element Check

    Chapter 3 Working with an XML model Existence of attribute A complex type should have at least one attribute. Manual correction Automatic correction Define an attribute for the complex type — Existence of particle A complex type must contain elements, groups, group particles and/or Any. Manual correction Automatic correction Add items to the complex type or delete...
  • Page 166 XML Model objects verified by Check Model Undefined reference An element without a defined data type must have a reference. Manual correction Automatic correction In the element property sheet, define a — reference with the Reference dropdown listbox or the Browse tool Existence of attribute An element without a reference, a data type or a substitution group should have at least one attribute.
  • Page 167: Group Check

    Chapter 3 Working with an XML model Group check During a group check, the following object controls are made. Group name and code uniqueness A model cannot contain two groups with identical names and/or codes. Manual correction Automatic correction Rename one of the groups Renames the group by appending a number to its name or code Undefined reference...
  • Page 168: Attribute Check

    XML Model objects verified by Check Model Attribute check During an attribute check, the following object controls are made. Attribute name and code uniqueness The parent of an attribute cannot contain two attributes with identical names and/or codes. Manual correction Automatic correction Rename one of the attributes Renames the attribute by appending a...
  • Page 169: Attribute Group Check

    Chapter 3 Working with an XML model Notation name and code uniqueness A model cannot contain two notations with identical names and/or codes. Manual correction Automatic correction Rename one of the notations Renames the notation by appending a number to its name or code Undefined notation A notation must have at least one URI defined for Public or System properties.
  • Page 170: Import Check

    XML Model objects verified by Check Model Existence of attributes An attribute group must contain at least one attribute. Manual correction Automatic correction Add attributes to attribute group or delete Deletes unassigned attribute group attribute group Import check During an import check, the following object control is made. Undefined schema location and namespace An import must have at least a schema location or a namespace defined.
  • Page 171: Key Check

    Chapter 3 Working with an XML model Existence of component A redefine must contain at least one of the following items: simple type, complex type, group or attribute group. Manual correction Automatic correction Add items to the redefine — Key check During a key check, the following object controls are made.
  • Page 172: Keyref Check

    XML Model objects verified by Check Model For more information on XPath expressions, see section Defining an identity constraint selector in chapter Building an XML model. KeyRef check During a keyRef check, the following object controls are made. KeyRef name and code uniqueness An element cannot contain two keyRefs with identical names and/or codes.
  • Page 173: Unique Check

    Chapter 3 Working with an XML model Undefined selector You must define an XPath expression for a keyRef selector attribute. Manual correction Automatic correction In the keyRef property sheet, define an — XPath expression for the selector attribute. For example: s:company/s:employee For more information on XPath expressions, see section Defining an identity constraint selector in chapter Building an XML model.
  • Page 174: Extended Object Check

    XML Model objects verified by Check Model Undefined Selector You must define an XPath expression for a unique constraint selector attribute. Manual correction Automatic correction In the unique constraint property sheet, — define an XPath expression for the unique constraint selector attribute. For example: s:company/s:employee For more information on XPath expressions, see section Defining an identity constraint selector in chapter Building an XML model.
  • Page 175: Replication Check

    Chapter 3 Working with an XML model Replication check During a replication check, the following object control is made. Partial object replication A replica object is partially synchronized with its replicated object. Manual correction Automatic correction Modify the list of replicated attributes Enforces the replication of from the replication property sheet desynchronized attributes of the...
  • Page 176: Simple Type List Check

    XML Model objects verified by Check Model Undefined base type You must define a base type when you derive a simple or a complex type by restriction. Manual correction Automatic correction In the simple or complex type property — sheet, click the Properties tool beside the Derivation box to display the Extension property sheet and select a base type with the Base type dropdown listbox or the...
  • Page 177: Simple Type Union Check

    Chapter 3 Working with an XML model Simple type union check During a simple type union check, the following object control is made. Undefined base type You must define at least two data types when you derive a simple type by union.
  • Page 178: Mapping Objects In An Xml Model

    Mapping objects in an XML model Mapping objects in an XML model Object mapping is the ability to establish a correspondence between objects belonging to heterogeneous models and diagrams. The following table shows all the allowed mappings between XML Model objects and PDM or OOM objects: XML Model objects PDM objects...
  • Page 179 Chapter 3 Working with an XML model Data source properties in an XML model To display a data source property sheet, double-click its name or its icon in the Browser tree view. Data source The General page of a data source property sheet displays the following general properties properties: Property...
  • Page 180 Mapping objects in an XML model Click the Properties tool to display the data source property sheet. In the General page, select a model type in the Model Type dropdown listbox. In the Models page, click the Add Models tool. A model selection dialog box appears.
  • Page 181: Mapping Xml Model Objects To Pdm Objects

    Chapter 3 Working with an XML model Mapping XML Model objects to PDM objects You can map elements or complex types and their corresponding attributes to PDM objects. The following table shows all the allowed mappings between XML Model objects and PDM objects: XML Model object PDM object Element...
  • Page 182 Mapping objects in an XML model In the Mapping page, you can use the following tools to select a data source for the current element: Tool Description Adds a mapping between the current element and an existing data source. The first time you define a mapping for an element, the Mapping for dropdown listbox is empty.
  • Page 183: Mapping Xml Model Objects To Oom Objects

    Chapter 3 Working with an XML model You have to use the Mapping page of a complex type property sheet to define complex type mappings. For more information on how to select a data source, see section Mapping elements. Complex Type The Complex Type Sources page allows you to associate one or several Sources page abstract data types in the data source to the current complex type.
  • Page 184: Creating A Mapping For An Xml Object

    Mapping objects in an XML model For more information on how to select a data source, see section Mapping elements. Element Sources The Element Sources page allows you to associate one or several classes in page the data source to the current element. You can use the Add Objects tool to select classes from the OOMs opened in the current workspace.
  • Page 185 Chapter 3 Working with an XML model Select the Mapping tab to display the Mapping page. Click the Add a Mapping for a Data Source tool to select a data source for the mapping. Select a data source in the Mapping For dropdown listbox if you have already selected one or several data sources.
  • Page 186 Mapping objects in an XML model Select the Attributes Mapping tab in the Mapping page. Click the Add Mapping tool to display an attribute selection box. Create From Sources and Generate Mapping tools Click the Create From Sources tool to automatically create attributes from the columns selected in the data source.
  • Page 187: Modifying The Mapping Of An Attribute

    Chapter 3 Working with an XML model Modifying the mapping of an attribute You can modify the default mapping created for an attribute. The Attribute Mappings property sheet can be used to fine tune the mapping between an attribute in the current element and columns or attributes in data source tables or classes.
  • Page 188: Manipulating Xml Objects Graphically

    Manipulating XML objects graphically Manipulating XML objects graphically The graphical interface of PowerDesigner allows you to manipulate XML objects within or between the Browser tree view and the diagram window. A global object is right under the model item in the Browser tree view. It has no parent symbol in the diagram.
  • Page 189: Global Objects

    Chapter 3 Working with an XML model Global objects You can move global objects within or between the Browser tree view and the diagram window. Move Select Tools General Options to make sure that Move is the Default action of the Drag & Drop option. Within Browser You can move a global object within the Browser to convert it into a local object (under a group particle item), but you cannot move a global object...
  • Page 190 Manipulating XML objects graphically If the new global object does not appear in the diagram, select Symbol Show Symbols and click the corresponding tab to select the object symbol. Example before local to global conversions within the Browser Job is a child element of the Customer element. Nickname is the attribute of the Name element.
  • Page 191: Comparing And Merging Xml Models

    Chapter 3 Working with an XML model Comparing and merging XML models You can compare and merge two XML models with the same XML language. The comparison process allows you to highlight the differences between two XML models. The merge process allows you to form a single model that combines design efforts performed independently by several team members.
  • Page 192: Generating An Xml Model From A Physical Data Model

    Generating an XML model from a Physical Data Model Generating an XML model from a Physical Data Model This section explains how to generate an XML model from a Physical Data Model. Generating XML Model objects When you generate an XML model from a PDM, PowerDesigner translates PDM objects into specified XML Model objects as follows: PDM object Generated object in an XML model...
  • Page 193: Generating And Updating An Xml Model

    Chapter 3 Working with an XML model Select Symbol Show Symbols to reveal the other generated XML Model objects (simple types and complex types). XML model naming conventions If the code of the generated XML Model objects does not correspond to the target language naming conventions, you can define a code naming convention script to convert object names into codes.
  • Page 194: Defining Xml Model Generation Options

    Generating an XML model from a Physical Data Model Update existing You can generate a PDM into an existing XML model. XML model If you choose to update an existing XML model when the current PDM has never been generated, the Select model dropdown listbox is empty by default. You have to click the Ellipsis button to display the Select a model dialog box in which you can select a model.
  • Page 195 Chapter 3 Working with an XML model Option Description Save generation When selected, PowerDesigner keeps track of the identity of dependencies each generated object. It is useful when merging two XML models which have been generated from the same PDM. Objects can be compared and recognized as the same object, even if the object has been modified in the merged XML model...
  • Page 196: Generating A New Xml Model From A Pdm

    Generating an XML model from a Physical Data Model Generating a new XML model from a PDM You can generate an XML model from a PDM or from a package in a PDM. PowerDesigner creates a new XML model containing all the objects that you selected to generate in the XML model.
  • Page 197: Updating An Existing Xml Model

    Chapter 3 Working with an XML model Click the Detail tab to define options and generation parameters. Click the Target Models tab to select the target models of shortcuts in the current model. Click the Selection tab to display the Selection page. Select the name of a PDM from the Select Location dropdown listbox.
  • Page 198 Generating an XML model from a Physical Data Model You can only generate an XML model from the active PDM diagram window. To update an existing XML model by generating from a PDM: Select Tools Generate XML Model to display the XML Model Generation Options dialog box.
  • Page 199 Chapter 3 Working with an XML model Click the Detail tab to define options and generation parameters. Click the Target Models tab to select the target models of shortcuts in the current model. Click the Selection tab to display the Selection page. Select the name of a PDM from the Select Location dropdown listbox.
  • Page 200: Generating An Xml Model From An Object-Oriented Model

    Generating an XML model from an Object-Oriented Model Generating an XML model from an Object- Oriented Model This section explains how to generate an XML model from an Object- Oriented Model. Generating XML Model objects When you generate an XML model from an OOM, PowerDesigner translates OOM objects into specified XML Model objects as follows: OOM Object Generated object in an XML model...
  • Page 201: Generating And Updating An Xml Model

    Chapter 3 Working with an XML model XML model naming conventions If the code of the generated XML model objects does not correspond to the target language naming conventions, you can define a code naming convention script to convert object names into codes. For more information on conversion scripts, see section .convert_name &...
  • Page 202: Defining Xml Model Generation Options

    Generating an XML model from an Object-Oriented Model Update existing You can generate an OOM into an existing XML model. XML model If you choose to update an existing XML model when the current OOM has never been generated, the Select model dropdown listbox is empty by default. You have to click the Ellipsis button to display the Select a model dialog box in which you can select a model.
  • Page 203 Chapter 3 Working with an XML model Option Description Save generation When selected, PowerDesigner keeps track of the identity of dependencies each generated object. It is useful when merging two XML models which have been generated from the same OOM. Objects can be compared and recognized as the same object, even if the object has been modified in the merged XML model...
  • Page 204: Generating A New Xml Model From An Oom

    Generating an XML model from an Object-Oriented Model Generating a new XML model from an OOM You can generate an XML model from an OOM or from a package in an OOM. PowerDesigner creates a new XML model containing all the objects that you selected to generate in the XML model.
  • Page 205: Updating An Existing Xml Model

    Chapter 3 Working with an XML model Click the Detail tab to define options and generation parameters. Click the Target Models tab to select the target models of shortcuts in the current model. Click the Selection tab to display the Selection page. Select the name of an OOM from the Select Location dropdown listbox.
  • Page 206 Generating an XML model from an Object-Oriented Model You can only generate an XML model from the active OOM diagram window. To update an existing XML model by generating from an OOM: Select Tools Generate XML Model to display the XML Model Generation Options dialog box.
  • Page 207 Chapter 3 Working with an XML model Click the Detail tab to define options and generation parameters. Click the Target Models tab to select the target models of shortcuts in the current model. Click the Selection tab to display the Selection page. Select the name of an OOM from the Select Location dropdown listbox.
  • Page 208: Editing An Xml Model Report

    Editing an XML model report Editing an XML model report You can edit a report of your XML model. The Report Editor allows you to use a predefined report template or to build your own report. For more information on reports, see the Reports User’s Guide. What is a report? A report is an easy to consult document that shows parts or the global content of a model.
  • Page 209 Chapter 3 Working with an XML model The List of Reports appears. It displays the alphabetical list of all reports saved in the model. If there are no existing reports, all the tools in the List of Reports dialog box are grayed, except for the New Report tool. Select the New Report tool.
  • Page 210: How Can A Report Underline The Hierarchical Structure Of An Xml Model

    Editing an XML model report Language in a template When you use a template created in a language different from the one you select to create your report, only user-defined items such as Title or Text paragraph will keep the language of the template. Other items will be displayed in the report language.
  • Page 211 Chapter 3 Working with an XML model In the following structure, the graphical representation of the diagram will appear in the report just before the descriptive paragraphs. To have a preview of your report, click the Print Preview tool in the Report Editor window.
  • Page 212 Editing an XML model report PowerDesigner...
  • Page 213: Generating And Reverse Engineering An Xsd, A Dtd Or An Xdr File

    C H A P T E R Generating and reverse engineering an XSD, a DTD or an XDR file About this chapter This chapter describes how to generate and reverse engineer an XML Schema Definition file (.XSD), a Document Type Definition file (.DTD) or an XML-Data Reduced file (.XDR).
  • Page 214: Generating An Xsd, A Dtd Or An Xdr File

    Generating an XSD, a DTD or an XDR file Generating an XSD, a DTD or an XDR file PowerDesigner allows you to generate an XSD, a DTD or an XDR file from an XML model. File preview You can have a preview of an XSD, a DTD or an XDR file by clicking the Preview tab of an XML model property sheet.
  • Page 215: Defining Generation Parameters

    Chapter 4 Generating and reverse engineering an XSD, a DTD or an XDR file Defining generation parameters You can define various parameters before generating an XSD, a DTD or an XDR file. Check model You can check your model before generation if you select the Check model check box.
  • Page 216 Generating an XSD, a DTD or an XDR file Defining generation options If you do not see the Options page in the Generation dialog box, it means that no option has been defined in the corresponding XML language (.XSL file). You can however customize your XML language at any time, and add any options you may need during generation.
  • Page 217: How To Generate An Xsd, A Dtd Or An Xdr File

    Chapter 4 Generating and reverse engineering an XSD, a DTD or an XDR file How to generate an XSD, a DTD or an XDR file? The type of generated file depends on which XML language the model has been targeted with: Model targeted with Generated file XML Schema Definition 1.0...
  • Page 218 Generating an XSD, a DTD or an XDR file Type a destination directory for the generated file in the Directory box. Click the Select a Path button beside the Directory box and browse to select a directory path. In the case of an XDR file, the Generation dialog box displays an Options page where the generation of comments (see Comment property in the General page of an object property sheet) is set by default.
  • Page 219 Chapter 4 Generating and reverse engineering an XSD, a DTD or an XDR file A Result box appears indicating that the XSD, DTD or XDR file has been generated in the destination directory. The result is also displayed in the Generation page of the Output window, located in the bottom part of the main window.
  • Page 220: Reverse Engineering An Xsd, A Dtd Or An Xdr File

    Reverse engineering an XSD, a DTD or an XDR file Reverse engineering an XSD, a DTD or an XDR file PowerDesigner allows you to reverse engineer an XML Schema Definition file, a Document Type Definition file or an XML-Data Reduced file to create or update an XML model.
  • Page 221 Chapter 4 Generating and reverse engineering an XSD, a DTD or an XDR file Reverse engineering options The Options page of the Reverse Engineering dialog box displays the following options: Option Description Show symbols If selected, the generated model appears in the diagram (not only in the Browser tree view) Expand nodes If selected, global objects (with no parent object in...
  • Page 222 Reverse engineering an XSD, a DTD or an XDR file The New XML Model dialog box appears. In the General page, select an XML language in the XML language dropdown listbox. Select the Share or Copy radio button. <optional> In the Extended Model Definitions page, you can select one or several extended model definitions to be reverse engineered with the XSD, DTD or XDR file.
  • Page 223 Chapter 4 Generating and reverse engineering an XSD, a DTD or an XDR file In the Options page, click the Select a File tool beside the File name box to select the XSD, DTD or XDR file you want to reverse engineer. Select or clear options (See Reverse engineering options).
  • Page 224 Reverse engineering an XSD, a DTD or an XDR file Click OK. The XML diagram corresponding to the reverse engineered XSD, DTD or XDR file appears in the diagram window. The Browser tree view reveals the new XML model with all its objects. The result is also displayed in the Reverse page of the Output window, located in the bottom part of the main window.
  • Page 225 Chapter 4 Generating and reverse engineering an XSD, a DTD or an XDR file The Merge Models dialog box appears, with the newly generated XML model in the left pane, and the existing XML model in the right pane. You can select or clear object check boxes in the right pane for objects that you want to include or delete in the model to be merged.
  • Page 226 Reverse engineering an XSD, a DTD or an XDR file PowerDesigner...
  • Page 227: Exchanging Data With Databases Supporting Xml

    C H A P T E R Exchanging data with databases supporting XML About this chapter This chapter describes how to use an XML model to store or retrieve data in databases supporting XML. Contents Topic Page Why use XML in databases? Generating an annotated schema for Microsoft SQL Server 2000 Generating an annotated schema for Oracle 9i2 Generating a DAD file for IBM DB2...
  • Page 228: Why Use Xml In Databases

    Why use XML in databases? Why use XML in databases? XML is becoming a universal data exchange format. An XML file can be read with any plain text editor. Most of relational databases (RDB) now support XML so that you can store or retrieve data through XML files. With an XML model, you can generate an annotated schema that will allow you to store or retrieve data in a relational database supporting XML.
  • Page 229: Generating An Annotated Schema For Microsoft Sql Server 2000

    Chapter 5 Exchanging data with databases supporting XML Generating an annotated schema for Microsoft SQL Server 2000 Microsoft SQL Server 2000 is an XML-enabled database server. It supports annotations that can be used on XSD or XDR files, to map XML data to relational data.
  • Page 230 Generating an annotated schema for Microsoft SQL Server 2000 To generate an annotated schema by mapping through the XML Builder Wizard: In the PDM menu bar, select Tools XML Builder Wizard. The Model Selection dialog box appears. Select the new model option. Type a name and a code for the new model, and select XML Schema Definition 1.0 or XML-Data Reduced 1.0 in the XML language dropdown listbox.
  • Page 231 Chapter 5 Exchanging data with databases supporting XML The Tables and Views Selection dialog box appears with the PDM tables list. All tables are selected by default. <optional> Click the Deselect All tool and select the tables you want to generate into XML elements.
  • Page 232 Generating an annotated schema for Microsoft SQL Server 2000 The XML Hierarchy Design dialog box appears. Click the Element radio button, if you want to create columns as elements. Click the Attribute radio button, if you want to create columns as attributes.
  • Page 233 Chapter 5 Exchanging data with databases supporting XML Drag and drop tables from left to right panel, and build an XML hierarchy. For more information on building an XML hierarchy, see section Generating an XML model via the XML Builder Wizard, in chapter Generating from a PDM, in the PDM User’s Guide.
  • Page 234 Generating an annotated schema for Microsoft SQL Server 2000 In the case of an existing XML model, the generated elements appear next to the existing elements. Extended model definitions The SQL/XML extended model definition is automatically attached to the generated XML model. You can attach the XML Document extended model definition to generate a simplified XML file that will help you understand the annotated schema.
  • Page 235 Chapter 5 Exchanging data with databases supporting XML 11 In the XML in Database page, select Microsoft SQL Server. Note: In the General Purpose page, you can select the XML Document extended model definition to generate a simplified XML file that will help you understand the annotated schema.
  • Page 236 Generating an annotated schema for Microsoft SQL Server 2000 The Generation dialog box appears with Microsoft SQL Server selected in the Targets page. 15 Click the Select a Path button, beside the Directory box, to select a path for the annotated schema file. 16 Click OK.
  • Page 237: Reinforcing Mapping With Extended Attributes

    Chapter 5 Exchanging data with databases supporting XML The annotated schema appears in the editor window. Note the SQL namespace (with the sql prefix) and the SQL annotations for tables (sql:relation), columns (sql:field) and reference (sql:relationship). 18 Click Close in the Result dialog box. Reinforcing mapping with extended attributes If you want to modify or reinforce the mapping resulting from the the XML Builder Wizard, you can define extended attributes for XML objects.
  • Page 238 Generating an annotated schema for Microsoft SQL Server 2000 To generate an annotated schema by reinforcing mapping with extended attributes: Double-click an element symbol in the diagram to display its property sheet. In the Extended Attributes page, type the name of a database column in the Value column of the field annotation, if you want to map the element with a database column.
  • Page 239 Chapter 5 Exchanging data with databases supporting XML Annotation Description key-fields — Allows specification of columns that uniquely identify the rows in a table limit-field Allows limiting the values that are returned on the basis of a limiting value limit-value Allows limiting the values that are returned on the basis of a limiting value mapped...
  • Page 240 Generating an annotated schema for Microsoft SQL Server 2000 Select Language Generate XML Schema Definition File. Select Language Generate XML-Data Reduced File. The Generation dialog box appears with Microsoft SQL Server selected in the Targets page. Click the Select a Path button, beside the Directory box, to select a path for the annotated schema file.
  • Page 241 Chapter 5 Exchanging data with databases supporting XML Click Edit. The annotated schema appears in the editor window. Note the SQL namespace (with the sql prefix) and the SQL annotations for tables (sql:relation), columns (sql:field) and reference (sql:relationship). Click Close in the Result dialog box. XSM User's Guide...
  • Page 242: Generating An Annotated Schema For Oracle 9I2

    Generating an annotated schema for Oracle 9i2 Generating an annotated schema for Oracle 9i2 Oracle 9i2 is a database server with a native XML storage and retrieval technology called Oracle XML DB. There is no mapping between XML data and relational data. Tables, columns and abstract data types (ADT) are created from annotated schemas (XSDs).
  • Page 243 Chapter 5 Exchanging data with databases supporting XML The Extended Model Definition Selection dialog box appears. In the XML in Database page, select Oracle XML DB 9.2. Click OK. Oracle XML DB 9.2 appears in the List of Extended Model Definitions. Click OK.
  • Page 244 Generating an annotated schema for Oracle 9i2 In the Extended Attributes page, type the name of a table or a column in the Value column of the SQLName annotation, if you want to create a table or a column from the selected element. You can define a value for the following annotations: Annotation Description...
  • Page 245 Chapter 5 Exchanging data with databases supporting XML Annotation Description javaClassname Used to specify the name of a Java class that is derived from the corresponding bean class, to ensure that an object of this class is instantiated during bean access. If a JavaClassname is not specified, Oracle XML DB will instantiate an object of the bean class directly maintainDOM...
  • Page 246 Generating an annotated schema for Oracle 9i2 11 In the Extended Attributes page, type the name of an abstract data type (ADT) in the Value column of the SQLType annotation, if you want to create an ADT from the selected complex type. You can define a value for the following annotations: Annotation Description...
  • Page 247 Chapter 5 Exchanging data with databases supporting XML 15 In the Extended Attributes page, you can select a value (false or true) for the following annotations: Annotation Description mapUnboundedStringToLob If true, unbounded strings are mapped to CLOB by default. Similarly, unbounded binary data get mapped to BLOB, by default.
  • Page 248 Generating an annotated schema for Oracle 9i2 The Result dialog box appears with the path of the generated schema file. 20 Click Edit. The annotated schema appears in the editor window. Note the Oracle namespace (with the sql prefix) and annotations for tables (sql:SQLName) and ADTs (sql:SQLType) 21 Click Close in the Result dialog box.
  • Page 249: Generating A Dad File For Ibm Db2

    Chapter 5 Exchanging data with databases supporting XML Generating a DAD file for IBM DB2 IBM DB2 v8.1 (or higher) is a database server with an add-in for XML storage and retrieval called IBM DB2 Extender. XML data (elements, attributes) are mapped to relational data (tables, columns) through Document Access Definition files (.DAD).
  • Page 250 Generating a DAD file for IBM DB2 The Model Selection dialog box appears. Select the new model option. Type a name and a code for the new model, and select Document Type Definition 1.0 in the XML language dropdown listbox. Select the existing model option.
  • Page 251 Chapter 5 Exchanging data with databases supporting XML The Tables and Views Selection dialog box appears with the PDM tables list. All tables are selected by default. <Optional> Click the Deselect All tool and select the tables you want to generate into XML elements.
  • Page 252 Generating a DAD file for IBM DB2 The XML Hierarchy Design dialog box appears. Click the Element radio button, if you want to create columns as elements. Click the Attribute radio button, if you want to create columns as attributes. PowerDesigner...
  • Page 253 Chapter 5 Exchanging data with databases supporting XML Drag and drop tables from left to right panel and build an XML hierarchy. For more information on building an XML hierarchy, see section Generating an XML model via the XML Builder Wizard, in chapter Generating from a PDM, in the PDM User’s Guide.
  • Page 254 Generating a DAD file for IBM DB2 In the case of an existing XML model, the generated elements appear next to the existing elements. Extended model definitions The SQL/XML extended model definition is automatically attached to the generated XML model. You can attach the XML Document extended model definition to generate a simplified XML file that will help you understand the annotated schema.
  • Page 255 Chapter 5 Exchanging data with databases supporting XML 11 In the XML in Database page, select IBM DB2 DAD. Note: In the General Purpose page, you can select the XML Document extended model definition to generate a simplified XML file that will help you understand the annotated schema.
  • Page 256 Generating a DAD file for IBM DB2 15 In the Extended Attributes page, click the DB2XMLExtender tab and select a value for the StorageType (Xcollection or Xcolumn). In the case of an Xcollection, select a value for the MappingType (RDB or SQL).
  • Page 257 Chapter 5 Exchanging data with databases supporting XML Extended attribute Description StorageName If StorageType is Xcolumn, then it is the name of the sidetable column StorageType Type of storage (Xcollection or Xcolumn) 16 Click OK. 17 Repeat steps 14 to 16 for each global element you want to determine the type of DAD file or other extended attributes.
  • Page 258 Generating a DAD file for IBM DB2 19 <optional> In the Options page, generation options are set by default. You can change their value. Option Description Character ending an instruction Character ending instructions in the SQL file for stored procedures Generates procedures deployment Generation of a SQL script for stored procedures enabling XML data...
  • Page 259 Chapter 5 Exchanging data with databases supporting XML The Result dialog box appears with the paths of the generated DAD, DTD and SQL files. 22 Select the path of a DAD file and click Edit. The selected DAD file appears in the Editor window. Extract of a DAD file defined with Xcollection as StorageType, and RDB as MappingType: XSM User's Guide...
  • Page 260 Generating a DAD file for IBM DB2 DAD file defined with Xcolumn as StorageType: 23 Repeat step 22 to edit another DAD file. Click Close in the Result dialog box. PowerDesigner...
  • Page 261: Generating Sql/Xml Queries

    Chapter 5 Exchanging data with databases supporting XML Generating SQL/XML queries SQL/XML is an XML extension of the Structured Query Language. With SQL/XML, you retrieve relational data using extended SQL syntax, and produce a result using XML. SQL/XML is made of five main functions: XMLELEMENT: to edit an element with a name, a list of attributes (optional) and a list of values (optional) XMLATTRIBUTES: to edit a list of attributes with names and values...
  • Page 262 Generating SQL/XML queries The List of Extended Model Definitions appears. Click the Import an Extended Model Definition button. The Extended Model Definition Selection dialog box appears. In the General Purpose page, select SQL/XML. Click OK. SQL/XML appears in the List of Extended Model Definitions. Click OK.
  • Page 263 Chapter 5 Exchanging data with databases supporting XML The SQL/XML extended model definition appears in the Browser tree view, attached to the model. < optional > Double-click a global element in the diagram to display its property sheet. In the Preview page, click the SQL/XML.Query tab to display the SQL/XML query.
  • Page 264 Generating SQL/XML queries The Generation dialog box appears with SQL/XML selected in the Targets page. 10 Click the Select a Path button beside the Directory box to select a path for the SQL/XML queries. PowerDesigner...
  • Page 265 Chapter 5 Exchanging data with databases supporting XML 11 In the Selection page, select the global elements for which you want to generate a SQL/XML query. (Only one global element in the example) 12 Click OK. The Result dialog box appears with a path for each SQL/XML query. (Only one in the example) 13 Select the path of a SQL/XML query and click Edit.
  • Page 266 Generating SQL/XML queries 14 Repeat step 13 to edit another SQL/XML query. Click Close in the Result dialog box. Once generated, SQL/XML queries are processed by SQL interpreters in databases supporting XML. PowerDesigner...
  • Page 267: Generating From An Xml Model

    C H A P T E R Generating from an XML model About this chapter This chapter describes how to generate an XML model from an XML model. Contents Topic Page Generation basics Generating an XML model from an XML model XSM User's Guide...
  • Page 268: Generation Basics

    Generation basics Generation basics You can generate an XML model from an XML model. There are two options to generate an XML model from an XML model: Generation option Description Generate new XML model It creates a copy of the source XML model, converting the source language (DTD, XSD or XDR) into the target language Update existing XML model...
  • Page 269 Chapter 6 Generating from an XML model The model generation process allows you to define the target object of a shortcut in a generated model. For example, here is the proper sequence of events for external shortcuts generation: Model 1 is the target model of a shortcut in Model 2 Model 1 is generated to Model 1.1 Model 2 is prepared for generation to Model 2.2 by associating appropriate parameters in the Target Models page:...
  • Page 270 Generation basics You can also preserve the link between an external replication and its target model through generation. For more information on the generation of object replications, see section Generating replications, in chapter Managing Object Replications, in the General Features Guide. PowerDesigner...
  • Page 271: Generating An Xml Model From An Xml Model

    Chapter 6 Generating from an XML model Generating an XML model from an XML model This section explains how to generate an XML model from an XML model. Why generate an XML model from an XML model? You can generate an XML model from an XML model when you need to keep two models synchronized during the design process.
  • Page 272 Generating an XML model from an XML model For more information on model options when generating an XML model from an XML model, see section Defining model options in chapter XML Model Basics. Update existing You can generate an XML model into an existing XML model. XML model In the Update Existing Model groupbox, the Select Model dropdown listbox contains all the models already generated from the current model.
  • Page 273 Chapter 6 Generating from an XML model Defining generation options The Detail page of the XML Model Generation Options dialog box displays the following options: Option Description Check model When selected, verifies the model before generating the XML model, and stops generation if an error is found Save generation When selected, PowerDesigner keeps track of the identity of dependencies...
  • Page 274 Generating an XML model from an XML model You can only generate an XML model from the active XML model diagram. To generate a new XML model from an XML model: Select Tools Generate XML Model to display the XML Model Generation Options dialog box.
  • Page 275 Chapter 6 Generating from an XML model 11 Select the check boxes for the objects you want to generate, and clear the check boxes for the objects you do not want to generate. 12 Click OK. The Output window shows the progress of the generation process. The diagram of the new XML model appears in the work area.
  • Page 276 Generating an XML model from an XML model Select a model from the Select model dropdown listbox, if the current model has already been generated. Click the Ellipsis button, beside the Select model dropdown listbox, and select a model model available in the workspace in the Select a model dialog box.
  • Page 277 Chapter 6 Generating from an XML model Click OK. If you selected the Preserve modifications check box, the Merge Models window appears. If you cleared the Preserve modifications check box, the updated XML model diagram appears in the work area. Merging models The Merge Models dialog box shows the newly generated XML model in the left pane, and the existing XML model in the right pane.
  • Page 278 Generating an XML model from an XML model PowerDesigner...
  • Page 279: Xml Model Glossary

    XML Model Glossary A group particle indicating that child elements can appear in any order, each of them once or not annotation Additional information about a model and its objects proceeding from documentation and/or applications Allows you to attach any type of object to a choice or a sequence group particle any attribute Allows you to insert any attribute of specified namespaces into an element, a...
  • Page 280 XML Model Glossary extension Derivation of a complex type to extend the values of its base type facet A constraint on the set of values of a simple type field An XPath expression that specifies the value (or one of the values) used to define an identity constraint (unique, key or keyRef) global object A global object has a global scope.
  • Page 281: Xsm User's Guide

    XML Model Glossary qualified name A name beginning with a prefix and a colon (:). The prefix is associated with (QName) a namespace URI. For example: xs:schema, xs being associated with http://www.w3.org/2001/XMLSchema Relational database. A database organized in terms of relations between data redefine Allows you to redefine simple and complex types, groups and attribute groups from an external schema file in the current schema...
  • Page 282 XML Model Glossary union Derivation of a simple type to restrict its values to a collection of built-in and simple data types unique An identity constraint used to specify that an element or attribute value (or set of values) must be unique or null within a specified scope Uniform Resource Identifier.
  • Page 283: Index

    Index attribute group 82 check 157 create attribute group 85 properties 82 all 53 reference 82 annotated schema stereotype 82 for Microsoft SQL Server 2000 217 attribute mapping 175 for Oracle 9i2 230 mapped to 175 annotation 115 sources 175 application information 115 AttributeType (XDR) check 165...
  • Page 284 complex type (continued) block 94 check 152 check model 140 complex content 101 annotation 165 content 93 attribute 156 create complex type 96 attribute group 157 detail properties 94 automatic correction 140, 145 final 94 business rule (XSM) 149 general properties 93 complex type 152 global 92 correct error 145...
  • Page 285 database (continued) element (continued) Oracle 9i2 230 substitution group 40 SQL/XML queries 216, 249 type (XDR) 39 XML in database 216 values (XDR) 50 default 40, 50 ElementType (XDR) derivation 102 content 39 extension 102 dt type 39 restriction 104 dt values 39 simple type list 112 model 39...
  • Page 286 facet (continued) group (continued) whitespace 105 reference 76 field 64, 66, 67, 73 stereotype 76 stereotype 73 group particle 53 XPath 73 all 53 file check 150 check 147 final 19, 40, 90, 94 choice 53 fixed 40, 50, 105 create group particle 55 form 40, 50 properties 54...
  • Page 287 model (continued) detail properties 19 length 104 element form 19 level of problem severity environment 10 error 140 extended definitions 13 warning 140 extended dependencies 15 link 8, 45, 57, 81, 98 external schemas properties 21 child object to complex type 98 final 19 child object to element 45 general properties 17...
  • Page 288 redefine 128 shortcut (continued) check 158 managing external shortcuts through references create redefine 130 and data types 87 schema location 128 simple content 100 reference 37, 48, 67, 76, 82 simple type 89 replication check 163 check 152 report 196 create simple type 90 create model report 196 derive by list 112...
  • Page 289 value attribute (DTD, XDR) 50 element (XDR) 50 warning 140 whitespace 104 workspace 28 XDR 3 any 58 attribute type 48 AttributeType 48 element type 37 ElementType 37 XML 3 diagram 32 model 3 objects 5 XML language 10, 259 change XML language 11 choose XML language 28 XPath 73...
  • Page 290 PowerDesigner...

This manual is also suitable for:

Powerdesigner 11.1

Table of Contents