Hasty Briefsbeta

Bilingual

The SLAX Scripting Language: An Alternate Syntax for XSLT

2 days ago
  • #SLAX
  • #Mutable Variables
  • #XSLT
  • SLAX uses XPath expression type promotion where predicates checking node existence are true if the node exists, ignoring the node's value.
  • XSLT features immutable variables for optimization and streaming support, but SLAX in JUNOS allows mutable variables via workarounds like using SNMP MIB for storage.
  • Mutable variables in SLAX are non-standard, affecting script portability, and introduce memory overhead due to retaining previous values to avoid dangling references.
  • libxslt manages memory through contexts and RTFs, with node sets referencing nodes in situ, but mutable variables require custom handling to maintain reference integrity.
  • Implementing mutable variables involves creating a shadow variable (svar) to store a history of non-scalar values, with memory freed only when the variable goes out of scope.