Functional programming and recursion in XSLT
-
thibodeaux
- Posts: 8121
- Joined: Thu May 20, 2004 7:32 pm
-
thibodeaux
- Posts: 8121
- Joined: Thu May 20, 2004 7:32 pm
XSLT is really a programming language, but it was originally designed for manipulating XML. I am using it in a couple of ways:
1) As a code-generator. I define simple languages, create lexer/parser code for them using compiler-compiler tools (c.f. lex and yacc for the unix world). The output of the parser is an abstract syntax tree represented in XML. I then use XSLT to turn it into whatever target language I want
2) Turns out the target language I want is XSLT. But XSLT riddled with extension object method calls. The reason I'm doing this is I want to create user-customized rules for transforming XML data.
So anyway, that's about it.
1) As a code-generator. I define simple languages, create lexer/parser code for them using compiler-compiler tools (c.f. lex and yacc for the unix world). The output of the parser is an abstract syntax tree represented in XML. I then use XSLT to turn it into whatever target language I want
2) Turns out the target language I want is XSLT. But XSLT riddled with extension object method calls. The reason I'm doing this is I want to create user-customized rules for transforming XML data.
So anyway, that's about it.