From: Dave P. <dav...@gm...> - 2005-12-09 13:04:54
|
Tested with and without the xml decl in the file. Defaults to 1.0 (if missing too) I'll try and use this to load either a 1.0 or 2.0 'empty' stylesheet, then set the current variables to a list of either 1.0 or 2.0 elements and attributes. (defvar xsl-ver 1.0) =09 (defun fv() "Find the xslt version" (interactive) (save-excursion (goto-char (point-min)) (skip-chars-forward "\\s-") (cond ((looking-at "<\\?xml");; 2nd time if xmldcl present (setq p (re-search-forward "version=3D\"" nil t 2)) (buffer-substring-no-properties p (+ p 3))) (t (setq p (re-search-forward "version=3D\"" nil t 1)) (buffer-substring-no-properties p (+ p 3))) ) ) ) (setq xsl-ver (if (fv) (fv) 1.0 )) regards -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk |
From: xslide S. <xsl...@me...> - 2005-12-09 21:03:39
|
Dave Pawson <dav...@gm...> writes: ... > I'll try and use this to load either a 1.0 or 2.0 'empty' stylesheet, > then set the current variables to a list of either 1.0 or 2.0 > elements and attributes. Please provide your empty XSLT 2.0 stylesheet. Regards, Tony. |
From: Dave P. <dav...@gm...> - 2005-12-10 18:16:32
|
On 09/12/05, xslide Support <xsl...@me...> wrote: > Please provide your empty XSLT 2.0 stylesheet. <?xml version=3D"1.0" encoding=3D"utf-8"?> <xsl:stylesheet xmlns:xsl=3D"http://www.w3.org/1999/XSL/Transform" xmlns:xs=3D"http://www.w3.org/2001/XMLSchema" xmlns:xsi=3D"http://www.w3.org/2001/XMLSchema-instance" exclude-result-prefixes=3D"xs xsi" version=3D"2.0"> <xsl:output method=3D"xml" indent=3D"yes" encoding=3D"utf-8"/> <xsl:template name=3D"*"> <xsl:message> *** Failed to process <xsl:value-of select=3D"name()"/> *** </xsl:message> </xsl:template> </xsl:stylesheet> -- Dave Pawson XSLT XSL-FO FAQ. http://www.dpawson.co.uk |
From: xslide S. <xsl...@me...> - 2005-12-11 20:46:17
|
Dave Pawson <dav...@gm...> writes: >> Please provide your empty XSLT 2.0 stylesheet. Checked in as xslt2-initial.xsl. Regards, Tony. |