• import external style sheet

                
                
    
    
  • 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();
    writer.Close();
    Response.Write(writer.ToString());
    writer.Dispose();
    Response.Flush();
    Response.Close();
    
  • xslt comparison

            Below is an example of comparision.
    
  • 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
    
  • 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"> . If there is no explicit priority assigned to a template, it will used default priority.