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

Re: XPath equivalent to xsl:apply-templates?

Subject: Re: XPath equivalent to xsl:apply-templates?
From: "Graydon graydon@xxxxxxxxx" <xsl-list-service@xxxxxxxxxxxxxxxxxxxxxx>
Date: Tue, 14 Jun 2022 12:26:45 -0000
Re:  XPath equivalent to xsl:apply-templates?
On Tue, Jun 14, 2022 at 11:50:05AM -0000, Chris Papademetrious christopher.papademetrious@xxxxxxxxxxxx scripsit:
> Hi Graydon,

Hello Chris --

> > Do we want to emulate a template entirely in a function or have a function that allows XPath to either call or apply templates?
> 
> Definitely the latter!

But we don't mean, for apply-templates, any specific template; we mean
"take this sequence of nodes and figure out which template should
apply, just as in xsl:apply-templates", so we have to handle mode and
priority.

It could be fn:perform-template-matching($nodeSet,$mode,$priority) and
it wouldn't work in XQuery.

Similarily it could be fn:apply-named-template($templateName,$contextItem) and it still wouldn't work in XQuery.

There is no obvious reason -- other than the effort and sanity of the
implemetors -- there couldn't be a template-function derivative of the
base function type, and those have the mode component of the arity.  But
that is not so much a feature as a new language that goes
one-ring-to-rule-them-all on XPath, XQuery, and XSLT.

-- 
Graydon Saunders  | graydonish@xxxxxxxxx
^fs oferiode, pisses swa mfg.
-- Deor  ("That passed, so may this.")

Current Thread

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
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.