Modifying the Target Structure

This section describes the techniques you can use to modify the structure and content of an XQuery mapper target structure. It covers the following topics:

Adding a Node

See How to create elements and attributes.

Removing a Node

Note

 

Before you can remove a node, you must delete any links to that node. See Removing Source-Target Map.

To remove a node from the target structure:
1. Remove any links to the node you want to remove from the target structure. See Removing Source-Target Map if you need help with this step.
2. Select the node and press the Delete key.

Alternative: Right-click the node and select Remove Node from the shortcut menu.

Setting a Text Value

You can set text values for target structure elements and attributes. You might want to do this if you are composing an XQuery with an element or attribute that requires a fixed value, instead of using a value gathered from an input XML document.

Example

Here is the XQuery code Stylus Studio generates for the Title element when a text value is specified for it:

<Book>
               
	<Title>Confederacy of Dunces</Title>
               
</Book>
               

            

Stylus Studio displays a red letter T for nodes for which you define a text value: .

How to set a text value
To set a text value for a target structure node:
1. Right-click the node for which you want to set the text value.

The shortcut menu appears.

2. Select Set Text Value from the shortcut menu.

The Value dialog box appears.

Figure 314. Value Dialog Box

3. Type the string you want to use as the text value and click OK.

Developer Resource Center: Learn XML and Stylus Studio

Learning XML is easy with Stylus Studio. Check out our free XML tutorials, XML whitepapers, online video demonstrations, XML examples and XML references and more.

Building DataDirect XML Converter Applications with Stylus Studio

DataDirect XML Converters are Java and .NET components that enable access to any data (flat files, EDI) from your application code. Learn how to deploy XML applications today.

Stylus Studio User Guides (PDF Download)

Download Stylus Studio User Guides in printer-friendly PDF format, including documentation of past (older) versions of Stylus Studio.

XML Helps Uncork Innovative Winery Web Sites

Learn how Freerun Technologies, Inc., a leading Internet services provider used Stylus Studio and XML technologies to develop a framework for Web-based eCommerce applications for the wine industry, reducing development cycles.

Stylus Most Wanted

 
Free Stylus Studio XML Training:
W3C Member