This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
RE: Inline (embedded) XSL within XML document
- To: "'xsl-list at mulberrytech dot com'" <xsl-list at mulberrytech dot com>
- Subject: RE: Inline (embedded) XSL within XML document
- From: Kay Michael <Michael dot Kay at icl dot com>
- Date: Tue, 5 Dec 2000 10:21:02 -0000
- Reply-To: xsl-list at mulberrytech dot com
> 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