User Guide > Using Transformations > Creating an XQuery Transformation > Viewing the Source Scope
 
Viewing the Source Scope
Before you view drop-down lists in the Target Value column, you might want to widen the column so you can see entire names.
The Source column (available for tables) lets you specify the tabular sources that provide data for the resulting XML document. Each source specified in this column corresponds to a top-level element (non-leaf node) in the target schema.
Resources specified in the Source column exist in a “scope” relative to the target XML document to which they provide data. At a particular location in the document, the source scope is defined as:
The current resource (table, view, or procedure)
All the resources that are directly above this resource in the document (direct ancestors)
The input to the XQuery
The scope defines what resources are available to the value expression.
The scope for Transaction is its own source, the inventorytransactions table, and the global input SupplierName.
The scope for PurchaseOrder is its own source, the purchaseorders table, its direct ancestor, the inventorytransactions table, and the global input SupplierName (line #2).
The scope for Supplier is its own source, the suppliers table, its direct ancestors, the purchaseorders and inventorytransactions tables, and the global input SupplierName (line #3).
The scope for Product is its own source the LookupProduct procedure, its direct ancestor inventorytransactions table, and the global input SupplierName (line #4). The sources (purchaseorders and suppliers) in the scope of its sibling or peer resource (PurchaseOrder) are excluded from the scope of Product.
The Source Alias column (available for tables) lets you specify aliases for the sources in the Source column. The aliases are used when join conditions, filters, and inputs are supplied for a source value. This column is populated automatically when a resource is added to the Source column, but it can also be edited as a text field.
The Source Settings column (available for tables) displays icons indicating that certain settings have been specified for the corresponding source. When clicked, these icons display the corresponding settings in the lower section of the editor. For example, you can click the Schema icon to display the schema for the corresponding source.
To view the source scope for an element
1. Click a cell in the Target Value column.
2. View the drop-down list.
Multiple input parameters are shown at the end or the drop-down list, in the order in which they were defined in the Inputs panel.