Akron | c840636 | 2021-11-09 20:17:50 +0100 | [diff] [blame] | 1 | ! XML rule |
| 2 | define XMLns [AsciiLetter [AsciiLetter|Digit|%-]* (%: AsciiLetter [AsciiLetter|Digit|%-]*)] .o. Caseinsensitive; |
Akron | d47c67e | 2022-04-10 11:02:59 +0200 | [diff] [blame] | 3 | |
| 4 | define XMLcomment [ %< %! %- %- | %- %- %> ]; |
| 5 | define XMLpi [ %< %? AsciiLetter [AsciiLetter | Digit | %- ]* | %? %> ]; |
| 6 | define CDATA [ %< %! %[ {CDATA} %[ | %] %] %> ]; |
| 7 | |
| 8 | define XML [[ |
Akron | c840636 | 2021-11-09 20:17:50 +0100 | [diff] [blame] | 9 | "<" [ |
| 10 | [ |
| 11 | XMLns |
| 12 | [WS+ XMLns WS* |
| 13 | (%= WS* |
| 14 | [[%" [? - %" - %>]+ %"] | [%' [? - %' - %>]+ %']] |
| 15 | ) |
| 16 | ]* |
| 17 | (WS* "/") |
| 18 | ] |
| 19 | | |
| 20 | [ |
| 21 | "/" XMLns |
| 22 | ] |
| 23 | ] WS* ">" |
Akron | d47c67e | 2022-04-10 11:02:59 +0200 | [diff] [blame] | 24 | ].u | XMLcomment | XMLpi | CDATA ]; |