Show TOC

Procedure documentationReloading a Schema Locate this document in the navigation structure

 

If you change a schema, you need to import the new schema and reload the XSD elements in the DC.

Procedure

Importing a Schema

More information: Importing a Schema

Reloading XSD Elements
  1. In the Project Explorer view, expand the rules composer DC node, the Rules Modeling node and double-click the Project Resources node.

  2. In the Project Resources editor that appears, choose the Aliases tab.

  3. In the Aliases editor, choose the Reload button and in the menu that appears, choose XSD Element.

  4. In the Reload XSD Element dialog box that appears, expand the namespace node and choose the root element.

  5. Select any one of the following radio buttons:

    • Remove existing aliases and recreate default XPath aliases

    • Validate the existing aliases and remove the invalid aliases

  6. Choose Click here to set alias generation preferences. (Optional)

  7. In the screen that appears, you can select the checkbox in the Alias Generation section if you want to use namespace prefixes for aliases. (Optional)

    Note Note

    Namespace prefixes are used to distinguish elements with same name. For example, if there are two 'purchaseorder' elements with same name, you can distinguish them using prefixes.

    End of the note.
  8. You can also select the desired checkboxes in the Edit visibility setting for advanced aliases section. (Optional)

    Note Note

    • You can select checkboxes for the following methods to be visible:

      • addChildElement

      • getXMLElement

      • size

      The methods listed above are generated for complex type elements which have atleast one child element or attribute. If the maxOccurs parameter corresponding to that child element has a value is greater than 1(the default value is 1), one alias is generated for each of the child elements. The return type of these methods is IRulesXMLDataObject.

      Example Example

      If purchaseOrder/items has an element called item, whose maxOccurs parameter is greater than 1, the aliases generated are:

      • purchaseOrder/items.addChildElement(item)

      • purchaseOrder/items.size(item)

      • purchaseOrder/items.getXMLElement

      End of the example.
    End of the note.
  9. You can enter the limit in the XPath Recursion Limit field. (Optional)

  10. Choose OK.

  11. In the Reload XSD Element dialog box, choose Finish.

Note Note

  • If you make changes to an XML schema and save the changes, do the following in the dialog box that appears:

    • Double-click a relevant node to view the schema. You should see two sections such as Old Schema Document and New Schema Document highlighting the changes you made to the schema

    • Choose Accept

    • When you reload the XSD elements, the changes get updated automatically

  • If you delete a schema file, you can still view the XSD elements in the Aliases editor. You should see a dialog box with the message that the XML schema has been removed

End of the note.