SQL:XSL

  • How do you:

    Get the sql:xsl part of the xml document to work ?

    Including something like sql:xsl='customers.xsl'

    still returns the XML in the browser.

    If the xsl file is specified in the URL it works fine.

  • Try appending the following to the end of your URL:

    ?contenttype=text/html&outputencoding=UTF-16

    So your URL should look something like:

    http://localhost/Nwind/template/CustomerList.xml?contenttype=text/html&outputencoding=UTF-16

    Assuming your XML template file looks like:

    <?xml version='1.0' encoding='UTF-8'?>

    <root xmlns:sql='urn:schemas-microsoft-com:xml-sql' sql:xsl='customerlist.xsl'>

    <sql:query>

    SELECT CompanyName FROM Customers FOR XML AUTO

    </sql:query>

    </root>

    Hope this helps,

    -Dave

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply