User Guide > Using the Any-Any Transformation Editor > Using the Transformation Editor > Working with Operation and Parameter Container Details
 
Working with Operation and Parameter Container Details
Most operations contained detailed elements that can be edited or configured to customize the behavior of your transform. This section includes the following topics:
Defining Element Facets
Defining Constant Values
Editing Import Paths
Edit Namespace Prefix Maps
Using Cycle I/O Direction to Add or Delete Parameters
Defining Element Facets
Element facets are the details defined for each of the elements being defined for the XQuery transformation code. They are primarily responsible for setting minimum and maximum occurrences, and indicating if the value can be NULL or not.
Restrictions are used to define acceptable values for XML elements or attributes. Restrictions on XML elements are called facets.
To define element facets
1. Access the Element Facets Editor in several ways including:
From the right-mouse menu of an operation handle, by selecting Change Facets.
2. Review and modify the values for Min and Max occurrence.
3. Determine the setting you want specified for Nullable:
Unknown
True
False
4. Click OK.
If the min and max values were changed, they are displayed next to the parameter name.
Defining Constant Values
Depending on the structure and content of your transform, you might want certain parameters to always evaluate to the same value. This constant value must be a valid value for the data type of the parameter for which you are defining it.
After the value is defined, it will display in the operation handle similar to the following:
Which would evaluate similar to the following in the generated XQuery:
element source
{
456
}
,
 
To define constant assignments
1. Access the Constant Assignment edit field in several ways including:
From the right-mouse menu of an operation handle, by selecting Create Constant Assignment.
From the Transformation Editor Model tab toolbar.
The operation handle populates with a value of zero.
2. From the right-mouse menu, select one of the following:
Edit
3. Type the value that you want used as the constant. For example:
50000
34
4. Save your transform.
Editing Import Paths
Import paths allow you to point the Transformation Editor at a set of one or more definition sets that are defined within TDV. These definition sets are then used by the Transformation Editor to provide you with a set of types that you use for parameters. By default, the Transformation Editor points to the following paths:
/lib/types/sql
/lib/types/extendedSql
/lib/types/xmlSchema2001
The paths control what types are available when adding parameters or changing their type.
If your transform uses type definitions from several definition sets and two or more of the definition sets contain an element with the same name, the first occurrence of it is the one that controls the element definition. The order that the definition sets is read can be edited.
To add a definition set to the list of import paths
1. Open your transform.
2. From the Studio resource tree, click and drag a definition set into the Transformation Editor. Or, add a new parameter and browse to the definition set.
3. Save your transform.
To edit the list of import paths
1. Open your transform.
2. Select Edit Import Paths from the toolbar.
The Edit Imported Definition Sets editor opens and displays the list of paths currently available to the Transformation Editor.
3. Click Import Paths to obtain a selection window that you can use to navigate through a list of valid Studio resources available to add as an imported definition set.
4. Use the Select Resources dialog to select the additional definition set that you want added to the Imported Paths list.
5. Click OK.
6. Determine if the order of the list should be changed and if any included paths need deletion.
To reorder paths, select a path and use the up and down arrows.
To delete a path from the list, select the path and click the red X.
7. Close the Edit Imported Definition Sets dialog.
8. Save your transform.
Edit Namespace Prefix Maps
Namespaces are used to avoid element name conflicts. Because element names are defined by the developer, there can be conflicts when code from more than one developer is combined. The name conflicts in XML can be avoided using a name prefix.
The XML Namespace represents the root URL path that is used for XML-based names. The Namespace is augmented with the specific names of things that are then created.
For example, http://masterschool.com/transform could be the root path assigned to your specific business_school_transform, which would result in the following:
http://masterschool.com/transform/business_school_transform
To edit the namespace prefix maps
1. Open your transform.
2. Select Edit Namespace Prefix Maps from the toolbar.
The editor opens and displays the list of prefixes currently used by the Transformation Editor.
3. To add a new prefix, use the green arrow button to create a new Namespace prefix.
4. To edit an existing, double-click in the cell that you want to edits and begin typing to edit the namespace text.
If you changed the text in the Prefix column and that name had been shown as part of your transform, the new name should now appear in your transform on the Model tab.
If you changed the text in the Namespace column, the actual namespace that is used when the transform is executed is changed.
5. Click OK to save your changes.
To view the namespace prefix maps declared for your transform
1. Open your transform.
2. Click the XQuery tab.
3. In the XQuery declarations section, look for text similar to the following:
 
declare namespace xquery = "http://compositesw.com/transform/xquery";
declare namespace sql = "http://compositesw.com/transform/sql";
declare namespace ext2 = "http://www.compositesw.com/extensions2";
declare namespace xs = "http://www.w3.org/2001/XMLSchema";
Using Cycle I/O Direction to Add or Delete Parameters
The Cycle I/O Direction button can be used to add parameters to the in and out containers.
To use the Cycle I/O Direction button
1. Open a transform.
2. Select the in or out container.
3. Right-click and select Add Parameter.
4. Specify a data type for the parameter and name the parameter.
5. Click the Cycle I/O Direction button.
The parameter is moved to the operation that it wasn’t in.
6. Optionally, click the button again to add the parameter in both operations.
7. To delete the parameter, select the parameter and then delete it.
If a parameter was added to the in and out containers using the Cycle I/O Direction button, deleting the parameter from one of the operations deletes it from both operations.
8. Save the transform.