[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: What's the best feature in XSLT 3?
My unpopular take is that maps are not my favorite feature within XSLT 3.0.
One reason is that I found it hard to process maps in an XSLT-idiomatic way. But I guess I havenbt done enough research yet because, as I found out just now, I can actually write template rules like this: <xsl:template match=".[. instance of map(xs:anyAtomicType, item()*)]"> Constructing (nested, in particular) maps tends also to be more verbose than just constructing an XML structure. (Imagine, an XSLT guy complaining about verbosity!) But I seem to be the guy whose natural instinct is to put every transient data structure into a document-node(element(*)), on which I can use the key() function, anyway. Call me old-fashioned. Letbs rank what other people have liked so far and add some more. XPath 3.1 language, functions and operators, including: conversion from/to JSON; syntactic shortcuts such as !, ||, and =>; single-argument fn:tokenize() and fn:string-join() trigonometric functions; maps+arrays (yes, maps&arrays rank top, but only as part of the overall XPath 3.1 package); higher-order functions (a pity they are not available in Saxon HE b we would use them frequently in our open-source XProc/XSLT offerings; we aren't using them in closed source projects either because they often rely on our open-source libraries); fn:parse-xml(); fn:serialize(); fn:sort() let; etc. Dynamic evaluation XSLT and XQuery Serialization 3.1 support, including easy JSON and HTML5 document writing Streaming (havenbt used it much though, same for accumulators, xsl:merge, xsl:fork) try/catch (no one mentioned this so far) Text value templates Packages (Ibve actually used them), visibility, xsl:override etc. xsl:context-item (a valuable debugging aid), no experience with xsl:assert so far though fn:transform() (havenbt used it much though, being an XProc orchestrator most of the time; the only place I'd really like to use it is Saxon-JS, which doesn't support it) mode declarations (using it, but it can get more verbose than declaring an identity template for many modes at once) xsl:iterate (using it rarely) xsl:where-populated, xsl:on-empty (not using it, but I have seen non-streaming people adopting it as syntactic sugar) On 03.10.2019 21:31, David Rudel fwqhgads@xxxxxxxxx wrote: Maps.
|
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
|