[XSL-LIST Mailing List Archive Home]
Re: [xsl] stylesheet organisation
Subject: Re: [xsl] stylesheet organisation|
From: Graydon <graydon@xxxxxxxxx>
Date: Wed, 7 Sep 2011 19:12:21 -0400
On Tue, Sep 06, 2011 at 09:36:42AM +0100, Andrew Welch scripsit:
> >> > XSLT is not all that good at being used in large, multi-programmer
> >> > projects;
> >> That's just not true, there's nothing different or special about xslt
> >> than any other language used in a large project.
> > Many other languages have more support for the idea. (Since there are
> > (apparently) very few really big, 10+ programmer, XSLT projects, this is
> > not surprising.)
> > XSLT, for instance, doesn't have an equivalent of header files, or a
> > notion of "partial build".
> Not sure what you mean there... you can have multiple entry points
> (say root matching templates) so you can run a subset of the transform
> that all ultimately get overridden by the main entry point.
Yes, but it's hard to say "redo only the parts of the transform where I
just changed the data".
> > And this works, but every single (you understand that this is a much
> > simplified example; the real case gives me many warnings) such import
> > produces a "imported or included more than once" warning. Which both
> > hides things I would care about in the warning list, and makes the "was
> > there anything in the log file?" check for "that transform worked" less
> > useful in a batch-processing context.
> > So I suspect that there's a better way to do this. What that way might
> > be I have yet to discover, though.
> Which XSLT processor do you use?
Those are from current Saxon, 188.8.131.52; it might be that this is a
function of running it in oXygen.
> I'm not sure it should be giving you
> those warnings, see:
> "The case where a stylesheet module with a particular URI is imported
> several times is not treated specially. The effect is exactly the same
> as if several stylesheet modules with different URIs but identical
> content were imported. This might or might not cause an error,
> depending on the content of the stylesheet module."
I would certainly be very happy if it *didn't* give me those warnings.
And I should still very much like to know if there is a consensus best
practice on organizing big complex transforms so all the files are