[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: output the result of the transformation twice, in
At 2022-05-23 20:17 +0000, Wolfhart Totschnig wolfhart.totschnig@xxxxxxxxxxx wrote: Thank you very much, Ken, Martin, and Graydon!
Regarding priority, if your <xsl:template match="/"> is in the same stylesheet fragment as your template above, there would be an ambiguous match for the root node when processing begins. Adding priority="1000" (or some number higher than the highest priority you have if you have multiple templates for the root node as I do in some of my projects) removes the ambiguous match and ensures your new template above would trigger first, and not your original template rule for the root node. Then your original template rule for the root node would fire as expected. I like Martin's approach because you don't need the memory for the storage of the template results ... but I didn't realize you ALWAYS wanted both results. I thought you were looking for two stylesheets with different results but with no maintenance headaches (at least related to having the two stylesheets!). Then you could invoke either or both. Graydon's approach saves the time for executing the transformation twice, but with the penalty of internal storage, so you would have to factor that in to weighing your alternatives. . . . . . . Ken On 23-05-22 15:29, Martin Honnen <mailto:martin.honnen@xxxxxx>martin.honnen@xxxxxx wrote: -- Contact info, blog, articles, etc. http://www.CraneSoftwrights.com/s/ | Check our site for free XML, XSLT, XSL-FO and UBL developer resources | Streaming hands-on XSLT/XPath 2 training class @US$125 (5 hours free) | Essays (UBL, XML, etc.) http://www.linkedin.com/today/author/gkholman |
|
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
|