Re: [xsl] Re: Language-specific output

Subject: Re: [xsl] Re: Language-specific output
From: David Carlisle <davidc@xxxxxxxxx>
Date: Fri, 3 Feb 2006 12:48:12 GMT
> David's idea looks difficult to implement
yes I thought so:-)

> otherwise a main stylesheet 
> will be reported valid even if for instance it does not define a 
> variable that it uses.

I suggested that any inferred variables would generate a warning not
just silently accept, but anyway I think the main document idea is
probably more generally useful and is used to good effect in other
systems I've used.  see for this example documentation of auc tex mode
master-file feature.
(I was trying to remember when I first came across that, 1980's I think:-)

> 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).
yes this is certainly true.

The feature I suggested is less useful as a general mechanism to enable
correct autocompletion and other editor features, but it would be nice
sometimes to have some mechanism of determining automatically the
dependencies that a module has. Just a report saying this module needs
to be included into a context that defines these 3 variables and these 2
named templates would be a useful thing to be able to document about
a module (and quite hard to find out by hand if its not documented, other
than by trial and error, adding variables until it works). Of course if
the editor would essentially have to do just that, keep recompiling the
module after adding a declaration, it is probably too hard/slow to be
useful as an automatic tool. I was really just wondering if the
debugging hooks into the xslt engine internals could be persuaded to let
the xslt engine carry on (with a warning) rather than stop on an
undefined variable (giving it some default declaration) so as to pick up
all undefined constructs in a single pass.


This e-mail has been scanned for all viruses by Star. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:

Current Thread