[XML-DEV Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

Re: Tag libraries in XSLT / XQuery?

  • From: Erik Hennum <efhennum@gmail.com>
  • To: Michael Kay <mike@saxonica.com>
  • Date: Wed, 25 Aug 2010 07:59:47 -0700

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!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
 

Stylus Studio has published XML-DEV in RSS and ATOM formats, enabling users to easily subcribe to the list from their preferred news reader application.


Stylus Studio Sponsored Links are added links designed to provide related and additional information to the visitors of this website. they were not included by the author in the initial post. To view the content without the Sponsor Links please click here.

Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.