Re: [xsl] Re: Language-specific output
Subject: Re: [xsl] Re: Language-specific output|
From: George Cristian Bina <george@xxxxxxxxxxxxx>
Date: Fri, 03 Feb 2006 14:30:23 +0200
Thanks Mike, David, Wendell and Dimitre for your feedback!
From Mike comment it is clear that automatic detection is not a good
way to go as that takes away the control from the user and may use a
different stylesheet than the actual main stylesheet.
David's idea looks difficult to implement and assuming that is
implemented the user will need to specify whether the edited stylesheet
is a main stylesheet or a module stylesheet, otherwise a main stylesheet
will be reported valid even if for instance it does not define a
variable that it uses.
If the user should specify the main stylesheet then the GUI should make
that as painless as possible and Wendell's ideas look good to me.
I also tend to agree up to some point with Dimitre. That is the
validation by creating a transformer may be a little too much for a
module. But removing the validation completely and have that only when
running a transformation I think it is not a good idea especially when
automatic validation is taken into account.
A possibility to avoid the what Dimitre calls "overvalidation" will be
to perform a validation of the XSLT document against an XSLT schema for
instance. A possible implementation may be to allow the user to specify
the level of validation he wants for stylesheets:
* validate against a schema
* using an XSLT processor
In any case the validation is not the only operation when having a
master stylesheet specified will be good. Take for instance the content
completion, when the user should see the available variables that he can
use at some point or the names of the templates he can call. Maybe
having a persistent mapping called "set main stylesheet" will be the
best. That should be controlled from a set main stylesheet action that
should act also on multiple files (so that the user can just select a
folder for instance in the project and set the main stylesheet in one
action for all the XSLT files in that folder). The stylesheets that have
a main stylesheet set can be then marked as modules (by decorating their
icon for instance) so that the user can easily see he is editing a module.
More, I think the need for having a main document property is more
general and may be applied also to XQuery, Relax NG schemas and even to
XML documents (consider a document that is included in the main document
through an external entity reference and that may not be valid or
wellformed by itself).
George Cristian Bina
<oXygen/> XML Editor, Schema Editor and XSLT Editor/Debugger