[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] 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.")
|
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
|