I have just recently (like 2 days) started using XSLT documents with XML. I understand the basics and am able to generate a formatted document using an .XML documen开发者_JAVA百科t that references a separate .XSLT document.
My question, as in the subject, is "Is it possible to create a SINGLE, composite document that contains both the XML data and XSLT processing/formatting/styling and displays as formatted HTML?"
I am writing a desktop application in which I need to generate a formatted document on the fly from XML stored in the database. I want to do this without creating or referencing any actual physical files. I will generate a text string containing the XML/XSLT document and feed this to a WebBrowser component for formatted display.
What you are describing is called embedded stylesheets:
http://www.w3.org/TR/xslt#section-Embedding-Stylesheets
To answer your question, yes it is possible, but you have to check your processor's documentation to see if it's supported.
精彩评论