Re: [xsl] Saxon 8B returns profile and version attributes from XHTML 1.1

Subject: Re: [xsl] Saxon 8B returns profile and version attributes from XHTML 1.1
From: David Carlisle <davidc@xxxxxxxxx>
Date: Mon, 23 Oct 2006 15:35:13 +0100
<xsl:if test="//@version eq '-//W3C//DTD XHTML 1.1//EN'"

you don't want // there which may cause the system to search the entire
document to arbitrary depth looking for a version attribute of that
form. You just want /xhtml:html/@version to look at the document
element's attribute.

It's a bit dangerous to rely on @version though as an XML parser may or may
not fetch the external dtd and default these attributes.


David

Current Thread