PT Application XML Features
Scenario 3 uses the following key XML technologies to implement tasks in the PT Admin application:
- Extensible Stylesheet Language (XSL) dynamically transforms XML files into menus for the PT application each time a browser requests a page. Generating Menus Dynamically with XSL discusses the design of this feature. Implementing the Menu Bar and its subtopics walk you through the code that implements this feature.
- The XML Document Object Model (XML DOM) is used throughout the application. You use the XML DOM to manipulate not only XML documents but also XSL stylesheets, because the stylesheets are also XML documents. The XML Data Source Object also loads an XML document model that exposes it programmatically to scripting languages. The LitWare team used the XML DOM in the process that implements the menu bar, and they used it even more extensively in the process that merges data stored in an XML file (lingo.xml) with other XML files to create HTML for the application's user interface. Merging XML Files to Present User Interfaces Dynamically discusses the design of this feature. XML Merge: Assembling Form Views and its subtopics walk you through the code that implements this feature.
- The XML Data Source Object binds XML data stored in a Microsoft® SQL Server™ version 7.0 database to HTML tables in the PT application's user interface. The PT application includes a reusable COM component, SQLXML, that formats data as XML and returns it to HTML forms, and accepts XML data from the Web pages and passes it to SQL Server. Until a version of SQL Server is available that natively supports XML, this is one strategy you can use to pass XML data between tiers in your application. Binding XML Data to HTML Pages with the XML Data Source Object discusses the design of this feature. Retrieving Data and its subtopics walk you through the code that shows how the PT application implements data binding with the XML DSO.
Note Microsoft recently released a technology preview for XML support planned for the next release of Microsoft SQL Server. See http://msdn.microsoft.com/workshop/xml/articles/xmlsql/sqlxml_prev.asp on the MSDN™ Web site for information and to download this preview. This preview includes SQLXML.dll, a type library not to be confused with the Lingo.SQLXML component featured in this BDG scenario.