- This XSLT example
shows how to transform an usual (not MS .NET) SOAP Web service contract declaration
express in WSDL to render is as CSS-formatted XHTML as a way to document it
automatically
- The transform starts by declaring the encoding, the DTD (DOCTYPE), and importing
the HTML Latin-1 named entities:
<?xml version="1.0" encoding="iso-8859-1" ?>
<!DOCTYPE
xsl:stylesheet [
<!ENTITY % lat1 SYSTEM "xhtml-lat1.ent" >
%lat1;
]>
- It then declares the stylesheet root node, and imports all required namespaces,
namely: WSDL, XML Schema, and SOAP:
<xsl:stylesheet xmlns:xsl = "http://www.w3.org/1999/XSL/Transform"
xmlns:wsdl = "http://schemas.xmlsoap.org/wsdl/"
xmlns:xsd = "http://www.w3.org/2001/XMLSchema"
xmlns:soap = "http://schemas.xmlsoap.org/wsdl/soap/"
version="1.0">
- And last before code really starts, is specifies the output format as raw
XML, to work around an encoding-related subtlety in MSXML when generating
HTML outputs:
<xsl:output method="xml" />