Notes on software and the ideas behind it
Find the meaning
behind the code.
I’m Fred Yang. I write about software—how it works, why it behaves the way it does, and the ideas that make code easier to reason about.
Open the notebookWorking notes / 2026
Recently mapped
Architecture, reactivity, and the hidden relationships that shape frontend systems.
xslt
Save the transform result in a variable for reuse
<span xmlns=''><p><span style='font-family:Consolas'><span style='color:blue'><</span><span style='color:#2b91af'>xsl:variable</span><span style='color:blue'> </span><span style='color:red'>name</span><span style='color:blue'>=</span>"<span style='color:blue'>orderMarkup</span>"<span style='color:blue'>> </span></span></p><p><span style='font-family:Consolas'><span style='color:blue'> <</span><span style='color:#2b91af'>xsl:apply-templates</span><span style='color:blue'> </span><span style='color:red'>select</span><span style='color:blue'>=</span>"<span style='color:blue'>/Customer/Order</span>"<span style='color:blue'> /> </span></span></p><p><span style='font-family:Consolas'><span style='color:blue'></</span><span style='color:#2b91af'>xsl:variable</span><span style='color:blue'>> </span></span></p><p> </p><p>To reuse the markup </p><p><span style='font-family:Consolas'><span...
Follow the thread
xslt
Xslt variable(node set)
<span xmlns=''><p> </p><p><span style='font-family:Consolas'><span style='color:blue'><</span><span style='color:#2b91af'>xsl:variable</span><span style='color:blue'> </span><span style='color:red'>name</span><span style='color:blue'> =</span>"<span style='color:blue'>persons</span>"<span style='color:blue'> </span><span style='color:red'>select</span><span style='color:blue'>=</span>"<span style='color:blue'>/all/persons/p</span>"<span style='color:blue'> /> </span></span></p><p><span style='font-family:Consolas'><span style='color:blue'><</span><span style='color:#2b91af'>xsl:variable</span><span style='color:blue'> </span><span style='color:red'>name</span><span style='color:blue'> =</span>"<span style='color:blue'>persons1</span>"<span style='color:blue'>> </span></span></p><p><span style='font-family:Consolas'><span style='color:blue'> <</span><span style='color:#2b91af'>xsl:copy-of</span><span...
Follow the thread
xslt
msxsl:node-set
<div xmlns='http://www.w3.org/1999/xhtml'>
<xsl:variable name="stringArray">
<age>1</age>
<age>1</age>
<age>1</age>
</xsl:variable>
Follow the thread
xslt
xslt variable inmutable
Once a variable’s value is set, it cannot be changed. But you can number nodes using theposition() function, count nodes with the count() function, sum their values with the sum() function, averagethem with the...
Follow the thread
xslt
xpath 1.0 lowercase
translate(Series, 'ABCDEFGHIJKLMNOPQRSTUVWXYZ', 'abcdefghijklmnopqrstuvwxyz')Powered by ScribeFire.
Follow the thread