[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: Inline (embedded) XSL within XML document
> Thank you for your response. If I use your example and create > the following > XML document, the template match element (notvalidelement) is being > processed even though the element name does not match a > document element. If > I separate the XML and XSL documents, the template match > element is not > processed. I suspect the relevant <xsl:template> element is being processed as part of the source document, not as part of the stylesheet. The XSLT spec explicitly warns you about this. You need a template rule such as <xsl:template match="xsl:*"/> to prevent the stylesheet being treated as part of the source. Incidentally, embedded stylesheets are supported in Saxon 5.5.1 but not in Saxon 6.0 or 6.0.1. I thought it would be interesting to see if anyone complained: no-one has, as yet. I think the spec doesn't make it a conformance requirement. It's quite tricky to implement, for example because you have to parse the source document before you know which elements to xsl:strip-space, and because namespace declarations occurring outside the xsl:stylesheet element are still significant. As for xsl:including an embedded stylesheet.... Mike Kay > 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
|