XSL Transformation Notes

Submitted by code_admin on Fri, 07/20/2018 - 12:45

My notes on using XSL transformations

XPath for Empty

Contains no child nodes: not(node())
Contains no text content: not(string(.))
Contains no text other than whitespace: not(normalize-space(.))
Contains nothing except comments: not(node()[not(self::comment())])

Transformation Hints

Tokenize example

This is how you separate different data fields of a delimited content.


{
for $token at $index in fn:tokenize($body//DelimitedContent, '.')
return
{$token}
}

Above expression will turn:


abc.efg.123.xyz


into:


abc
efg
123
xyz

Search Terms

xsl, xslt, transformation

Tags

RJM Article Type
Quick Reference