Sources

As described in Working with Data Sources, if you plan on generating XSLT for your XML Publisher report you must have specified at least one default source. (Sources are not required for generating XQuery, though it is considered good practice to specify one.)

Additional Sources

You can specify multiple sources for an XML Publisher report. The first source is specified in the XSLT/XQuery Scenario Properties dialog box as shown in the following table.

Language Type
Scenario Property
Referenced in Generated Code As
XSLT
Source XML URL
A global parameter:
xsl:param name="input1"
XQuery
Main Input
An external variable:
declare variable $input1 as document-node() external
Table 162. How Additional Source Documents Are Referenced

The expression associated with these variable names is displayed on the Parameter Values page of the Scenario Properties dialog box, like the one shown for XQuery scenarios in Figure 491.

Figure 491. Additional Sources Displayed on XQuery (XSLT) Scenario Properties

As you can also see, Figure 491 shows how data sources specified in XML Publisher are represented in the XQuery (and XSLT) editor. This XQuery uses three XML sources:

  • videos.xml (it is the default source)
  • A relational source from the pubs data base
  • A local copy of books.xml, displayed on the XQuery data sources panel using the variable name, $input1, with which it is associated

More About Relational Sources

Relational sources, like the one shown in Figure 491, are referenced in different ways by XSLT and XQuery:

  • XSLT code references relational data sources within a document() function:

document('xquery:///jdbc:xquery:sqlserver://ntstylus-dev:1433;table=companies;user=sa;xmlforest=true;schema=dbo;DatabaseName=pubs;urltype=.xml')"

  • XQuery code references relational data sources using the collection() function:

collection('pubs.dbo.companies')/companies/ticker

See Working with the XQuery collection() Function for more information.

EII - Enterprise Information Integration

Learn how to build EII applications with Stylus Studio's powerful Enterprise Information Integration Tools.

XSL:FO Editor

The XSL-FO editor provides syntax help, code completion integrated PDF preview, and integration with industry-leading XSL-FO processors including RenderX XEP and Apache FOP. Simplify XSL FO development with Stylus Studio.

Electronics & Electrical Equipment

Many electronics and electrical equipment companies need the most powerful XML IDE to power up their companies. Come see which electronics & electrical equipment companies are wired up with Stylus Studio 2006.

Web Service Data Mapping

Stylus Studio makes it possible for you to use Web services as live XML data sources for XML mapping projects.

Stylus Most Wanted

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2007 All Rights Reserved.