Connection Settings

Connection settings for the URL Builder are the same as those used to define a DB-to-XML data source:

  • Database type
  • Server URL
  • Username
  • Password

You can specify a new set of connection properties, or you can use a default connection by clicking the Use Default Connection check box. See Specifying Connection Settings for more information.

XMLForest

Stylus Studio supports XMLForest, an SQL/XML function that produces a sequence of XML elements based on the rows in a relational table. You can specify whether or not you want to use XMLForest when using the URL Builder to access a relational table as XML.

Example

Consider a simple BOOKS table with a TITLE row. If you accessed the BOOKS table using the URL Builder alone, the resulting XML would look like this:

<BOOKS>
               
  <row>
               
    <TITLE>A History of Moto GP</TITLE>
               
  </row>
               
  <row>
               
    <TITLE>Motorcycles: Art in Design</TITLE>
               
  </row>
               
</BOOKS>
               

            

Stylus Studio creates the <BOOKS> element as the root, with separate <row> elements for each row in the table, one row for each title.

When you use XMLForest, the resulting XMLis not well-formed - it has no root element, and the data is represented as a sequence of <BOOKS> elements instead of as individual rows, as shown here:

<BOOKS>
               
  <TITLE>A History of Moto GP</TITLE>
               
</BOOKS>
               
<BOOKS>
               
  <TITLE>Motorcycles: Art in Design</TITLE>
               
</BOOKS>
               

            

Sequence Elements

To allow you to work with sequences formed by XMLForest in Stylus Studio, the URL Builder adds a sequence element to the XML. The sequence element acts as a root element, ensuring that the XML is well-formed. The sequence element takes the following form:

<stylus:sequence xmlns:stylus="http://www.stylusstudio.com/xquery">

...

</stylus:sequence xmlns:stylus="http://www.stylusstudio.com/xquery">

In most cases, the sequence element is ignored for display purposes in Stylus Studio.

 
Free Stylus Studio XML Training: