From: xslide S. <xsl...@me...> - 2005-12-12 23:45:45
|
Dave Pawson <dav...@gm...> writes: > I'm stuck trying to determine whether to start in 1.0 or 2.0. > My only solution is to use a different mode (minor mode perhaps?) > for each. It seems to me that there are two separate problems that need solving: - Whether to use XSLT 1.0 or XSLT 2.0 font-lock, abbrevs, etc. for a particular .xsl file. - What content to insert in a new .xsl file. The first can be solved by a regexp or function that identifies the "version" attribute (or its absence). The second can be solved by setting `xsl-initial-stylesheet-file' to point to the appropriate file. Which would be fine for a person making a clean change from creating new XSLT 1.0 files to new XSLT 2.0 files, but still not so good if you still need to create both. Would it be better to support a list of template files, similar to the list of XSLT processors available to `xsl-process'? The user would then have the option of choosing the best initial file for the job, e.g., XSLT 1.0 producing HTML, XSLT 2.0 producing XML, etc. > I.e. No point in searching within the initial file, since it has been > determined at > that time? > > I don't really want to use xyz.xsl1 and xyz.xsl2 i.e. depend on the filename. > > Is M-x xslt1-mode and M-x xslt2-mode > a reasonable approach? No, because it gets in the way of using the extension to recognise the file mode. Regards, Tony. p.s. I am on vacation from 15th December to 10th January, inclusive, and won't be responding to email. |