[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Tag libraries in XSLT / XQuery?
Hi, Michael: That's very much what I'm suggesting with the addition of callbacks to fragments of the simplified stylesheet. That is, m:graph might contain an XML fragment which the m:graph template or function would invoke with parameters. Such callbacks seem to have been important for the sweet spot of JSP tag libraries. I'll mull about changes that might make for a more serious preprocessor. Thanks, Erik Hennum On Tue, Aug 24, 2010 at 10:33 AM, Michael Kay <mike@saxonica.com> wrote: > > I think part of what you are proposing is something that retains the flavour of XSLT simplified stylesheets, but removes many of the restrictions; for example it might be simplified stylesheets plus the ability to import a function (or template?) library. XSLT simplified stylesheets never took off, probably because they are too simple. Enhancing them without going all the way to full XSLT would be tricky, because it's hard to find the right sweet spot. > > The other part of your proposal is perhaps some kind of standardized facility for defining XSLT extension instructions - another XSLT feature that has never really taken off. It wouldn't be difficult to provide some way of mapping the user syntax > > <m:graph x0="0" x1="100" f="my:x-squared#1"/> > > to the underlying semantics of > > <xsl:call-template name="m:graph"> > <xsl:with-param name="x0" select="0"/> > <xsl:with-param name="x1" select="100"/> > <xsl:with-param name="f" select="my:x-squared#1"/> > </xsl:call-template> > > (Or you could make the attributes AVTs rather than XPath expressions - it's not obvious which would be best). > > XSLT 2.0 chose not to go in this direction, focusing instead on a concise function call syntax for use in XPath expressions. But it might still have validity, and find favour with a different audience. Try doing a preprocessor, and see whether people like it. > > Michael Kay > Saxonica
[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] |
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|