[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Want to process XHTML in my XSL stylesheets.
Hi Ed, > First question: If I have XHTML in an XSL stylesheet, will it be > validiated (e.g. are the XHTML elements in the XSL stylesheet > checked against the XHTML syntax/schema, or does validation only > involve the XML files being processed). No, the XHTML in your stylesheet will not be validated. If it were (naively), it would be invalid because XHTML can't contain elements like xsl:apply-templates. There are some claims that XSLT 2.0 processors will have the intelligence, and XSLT 2.0 the robustness, that would enable processors to check whether the XHTML that will be generated from a given stylesheet will be valid or not, but for now at least you need to test the output that you get with various inputs to have any guarantee that you're generating valid XHTML. > Second question: How do I get the XHTML embedded in the XSL > stylesheet to come out as HTML. All the examples I have seen are > addressing XHMTL embedded in the input XML being transformed, not in > the XSL stylesheet specifying the transformations. Set the output method to 'html' explicitly using the xsl:output element at the top level of the stylesheet. <xsl:output method="html" /> Cheers, Jeni --- Jeni Tennison http://www.jenitennison.com/ XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|