RAD Studio VCL Reference
|
TXSLPageProducer generates web page content by transforming data described with XML (Extensible Markup Language) using an XSL (Extensible Stylesheet Language) template.
TXSLPageProducer = class(TCustomXSLPageProducer);
class TXSLPageProducer : public TCustomXSLPageProducer;
Use the Web Page Module wizard to create a web page that uses TXSLPageProducer. To produce content, TXSLPageProducer uses an XSL template to transform the data in an XML document. Typically, the XSL transforms the XML document into another XML document that is HTML compliant (that is, into a document whose tags are actually HTML tags). However, as specified by the XSL template, TXSLPageProducer can return any arbitrary output as a result of the transformation.
Use the XMLData property to specify the XML data that this component transforms. XMLData must be set to a component that supports either the IXMLDocument interface (for example, TXMLDocument or one of its descendants) or the IGetXMLStream interface (for example, TXMLBroker).
To obtain the results of the transformation, you can use any of the following methods:
The Content method performs the transformation using the XSL template that is specified by the FileName or XML property. When using the Content method, you can also read an XSL document by calling the LoadFromFile, LoadFromStream, or LoadFromXML method first.
The ContentFromString and ContentFromWideString methods perform the transformation using an XSL template that is supplied as a parameter.
The ContentFromStream method performs the transformation using an XSL template that it reads from a specified stream.
At design time, Web page modules that use the TXMLPageProducer have editor views called XML Tree and XSL Tree. These views provide a read only tree of the XML and XSL respectively.
Copyright(C) 2009 Embarcadero Technologies, Inc. All Rights Reserved.
|
What do you think about this topic? Send feedback!
|