WeSearch

The SLAX Scripting Language: An Alternate Syntax for XSLT

·6 min read · 0 reactions · 0 comments · 8 views
#programming#scripting#xml
⚡ TL;DR · AI summary

The article discusses the implementation of mutable variables in the SLAX scripting language, which is used in JUNOS. It highlights the challenges associated with mutable variables, including memory overhead and portability issues. The author argues that while mutable variables can alleviate some scripting difficulties, they introduce complexities that may not be worth the trade-off.

Key facts
Original article
Github
Read full at Github →
Opening excerpt (first ~120 words) tap to expand

B.1.3� Mutable Variables XSLT has immutable variables. This was done to support various optimizations and advanced streaming functionality. But it remains one of the most painful parts of XSLT. We use SLAX in JUNOS and provide the ability to perform XML-based RPCs to local and remote JUNOS boxes. One RPC allows the script to store and retrieve values in an SNMP MIB (the jnxUtility MIB). We have users using this to "fake" mutable variables, so for our environment, any theoretical arguments against the value of mutable variables are lost. They are happening, and the question becomes whether we want to force script writers into mental anguish to allow them. Yes, exactly. That was an apologetical defense of the following code, which implements mutable variables.

Excerpt limited to ~120 words for fair-use compliance. The full article is at Github.

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Threads WhatsApp Bluesky Mastodon Email

Discussion

0 comments

More from Github