Writing more robust XSLT stylesheets by understanding and leveraging the XDM data model
summary
Claim: leveraging the XDM type system (XML Schema types, XPath/XQuery/XSLT 3.1) finds bugs early instead of producing silent missing output. Demos use an extension to print map types and show maps are morphological (immutable instances with inferred key/value types). Covers untypedAtomic pitfalls, implicit atomization, xs:error and try/catch, no element constructors but primitive constructors, sequence cardinality and the surprising rule that adding an "as" type to a variable changes the implicit document node handling.
AI-written summary · about
chapters (14)
- 0:00Introduction and confession
- 1:04Why types matter in XSLT
- 3:18History of type systems
- 8:21XDM and lambda calculus foundations
- 10:29Types in functional vs OO programming
- 14:43Instance vs type description
- 16:53Type hierarchy overview
- 19:25Complex types in schemas
- 21:38Type coercion and atomization
- 23:28Special types like xs:error
- 24:58Untyped atomic pitfalls
- 26:25Practical type pitfalls demo
- 28:36Summary and best practices
- 29:28Q&A session
