• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 15. Manipulating XML with XSLT a... > Transforming XML into Content by Usi...

Transforming XML into Content by Using XSLT

CFML is an excellent tool for transforming content from a relational database into HTML, XML, or almost any form of content markup due to its native support for looping over a query set. However, this ease of looping and data handling does not extend to XML. ColdFusion can certainly loop over data in an XML object, and can search for data using XmlSearch(), but there is a much better solution for transforming XML into other forms of content.

XSLT (eXtensible Stylesheet Language for Transformations) was created by the W3C in 1998 as a way to easily define a transformation from an XML document to some other content format. Using XSLT, I could transform a document like Listing 15.1 into the HTML table shown in Figure 15.2 using a simple stylesheet:


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint