Many of the XSLT examples in this chapter may be used for output to the web. Read again in Chapter 5 about how to call a stylesheet in your HTTP request with a hyperlink or an HTML <form>. You may get unpredictable results depending upon browser anomolies. Generally the examples that exported and transformed to HTML work best with FileMaker Pro XML web publishing, but other examples (text and XML) may be viewed in a web browser.
You may add Cascading Style Sheet language to any XSLT that has HTML output. This is best placed within the <head> element of the HTML and called as a <link> to an external CSS stylesheet. CSS that is embedded in the XSLT stylesheet may produce parsing errors because of the nature of the text.
You may also test some of these examples by exporting the XML and placing the processing instruction at the top of XML document. An example is shown in Listing 8.31. The stylesheet dso2html3.xsl is a renamed copy of the stylesheet dso2html2.xsl shown in Listing 8.15, section 8.32, "FMPDSORESULT to HTML."
<?xml-stylesheet type="text/xsl" href="StyleSheetName.xsl" ?>
Listing 8.31: export.xml
<?xml version="1.0" encoding="UTF-8" ?><?xml-stylesheet type="text/xsl" href="dso2html3.xsl" ?><FMPDSORESULT xmlns="http://www.filemaker.com/ fmpdsoresult"><ERRORCODE>0</ERRORCODE><DATABASE>Export.FP5</DATABASE> <LAYOUT>Form</LAYOUT><ROW MOD RECORD><First_Name>Beverly </First_Name><Last_Name>Voth</Last_Name><State>KY</State><Number> 1.00</Number><Date></Date></ROW><ROW MOD RECORD><First_Name> Doug</First_Name><Last_Name>Rowe</Last_Name><State>FL</State><Number> 2.00</Number><Date>1/15/2003</Date></ROW></FMPDSORESULT>
This renders correctly in some browsers but fails in the Macintosh version of Internet Explorer.