Data Access

The Stylus Studio Java API provides access to non-XML data stored as flat files (EDI, CSV, RTF, and others) and on relational data bases (SQL Server, Oracle, and others), and to XML data available via Web services and stored in Sleepycat Software's Berkeley DB XML database. Figure 506 illustrates the different ways you can use the Stylus Studio Java API to access XML and non-XML data from Java applications or from XQuery or XSLT code.

Figure 506. Accessing Data Sources with the Stylus Studio Java API

All data access relies on the Stylus Studio custom URL schemes - you use Stylus Studio's adapter: URL scheme to access non-XML data stored as a flat file (EDI, CSV, and others). Other Stylus Studio URL schemes ( db:, ws:, and others) are used to access XML and non-XML data stored on relational databases and provided by Web services. The classes in the com.stylusstudio.converter package were designed to work with the adapter: URL scheme. If you are using any of the other Stylus Studio URL schemes, you simply need to register the Stylus Studio URI resolver in your Java code. Note that Stylus Studio generates this code automatically when you generate Java code for XSLT and XQuery using certain processors, such as the Stylus Studio built-in processor, the DataDirect XQuery processor, and processors from Saxon and Xalan.

See Stylus Studio URL Schemes to learn more about custom URL schemes in Stylus Studio.

 
Free Stylus Studio XML Training: