The XED scripting language

Hussein Shafie

XMLmind Software

35 rue Louis Leblanc,
78120 Rambouillet,
France,
Phone: +33 (0)9 52 80 80 37,
Web: www.xmlmind.com/w2x
Email:  (public mailing list)

September 17, 2024

Abstract

This document contains the reference manual of XED, a very small, very simple scripting language based on XPath 1.0. A XED script allows to modify in place an XHTML document.


Table of Contents
I. The XED scripting language
1. Language syntax
1. Syntax
2. Text file encoding
3. Comments
4. Including a script file with include
5. Namespace declarations
6. Commands
7. Conditional processing with if
8. Repetition with for-each
9. Macro commands
10. XML templates
2. Predefined commands
1. break
2. continue
3. delete
4. delete-text
5. delete-key
6. error
7. group
8. insert-after
9. insert-before
10. insert-into
11. invoke
12. message
13. replace
14. remove-attribute
15. remove-property
16. save-document
17. script
18. set-attribute
19. set-doctype
20. set-element-name
21. set-property
22. set-variable
23. translate-chars
24. update-key
25. unwrap-element
26. variable
27. warning
28. wrap-element
3. Commands which are specific to w2x
1. add-class
2. add-rule
3. add-script
4. before-save
5. parse-styles
6. remove-class
7. remove-rule
8. set-rule
9. set-style
10. split-element
11. unparse-styles
II. XPath 1.0 support
4. XPath functions
1. Extension functions
2. Java™ methods as extension functions
5. XPath extension functions which are specific to w2x
Index
List of Examples
2.1. Basic use of command group()
2.2. Creating nested groups
2.3. Group members having different element types