Feature. Forester 4.0 › Enhanced XML support › Emitting XML and resolving namespaces › XML literals [00RM]
The old \xml syntax has been replaced with a new convenient notation for XML literals that supports declared XML namespace prefixes. The grammar of XML literals is summarised below:
qname ::= prefix:name | name
expr ::= ... | \<qname>[qname]{expr}...{expr}For example, if the prefix html: is bound to http://www.w3.org/1999/xhtml as in Feature [00RK], the expression \<html:mark>[class]{highlight}{some highlighted text} will emit the following XML:
<html:mark xmlns:html="http://www.w3.org/1999/xhtml" class="highlight"> some highlighted text </html:mark>
In reality, the appropriate @xmlns:html attribute will be attached only where it is needed in keeping with the hierarchical structure of the XML tree. Note that when the same textual prefix is bound to two different namespaces, one of them will be automatically \alpha -renamed so as to result in correct XML with the intended semantics.