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 notebook

Working notes / 2026

Recently mapped

Architecture, reactivity, and the hidden relationships that shape frontend systems.

xslt

asp.net xslt output

XslTransform xslt = new System.Xml.Xsl.XslTransform(); xslt.Load(xslFile); XmlDocument doc = new XmlDocument(); doc.Load(xmlFile); StringWriter writer = new StringWriter(); XmlTextWriter xmlwriter = new XmlTextWriter(writer); XsltArgumentList list = new XsltArgumentList(); list.AddParam("Age", "", "108"); xslt.Transform(doc, list, xmlwriter); xmlwriter.Close();...
Follow the thread
xslt

xslt comparison

Below is an example of comparision.
Follow the thread
field note

ouput as an attribute

We can ouput normal text as <xsl:value-of select="xpath-expression" />. If we want to ouput as attribute, we should use {xpath-expression}. For example
Follow the thread
xslt

Template priority

XSLT processor will only ever process one template when you apply templates to a node, so it has to choose one among all matched templates based on the matched priority. <template matching="something" priority="1"> ....
Follow the thread
xslt

matching pattern

The values for match attribute of &lg;xsl:template> can be <ul> <li>/ matches the document node</li> <li>* matches any element</li> <li>text() matches text nodes</li> <li>The name of an element matches that element</li> <li>path patterns</li> </ul>...
Follow the thread