summaryrefslogtreecommitdiff
path: root/tex/context/base/xtag-ini.tex
diff options
context:
space:
mode:
Diffstat (limited to 'tex/context/base/xtag-ini.tex')
-rw-r--r--tex/context/base/xtag-ini.tex19
1 files changed, 19 insertions, 0 deletions
diff --git a/tex/context/base/xtag-ini.tex b/tex/context/base/xtag-ini.tex
index 61906b621..2b9dc8aa2 100644
--- a/tex/context/base/xtag-ini.tex
+++ b/tex/context/base/xtag-ini.tex
@@ -2863,4 +2863,23 @@
\def\XMLyes#1{\XMLownifequalelse{#1}{yes}{#1}{}}
+%D The next macro will set the variable \type {\flattenedXMLcontent}
+%D to the content with elements removed and entity names.
+
+\bgroup
+
+\catcode`\<\active
+\catcode`\&\active
+
+\gdef\flattenXMLcontent#1% we need taco's 'over one group'
+ {\begingroup
+ \def<##1>{}%
+ \def&##1;{##1}%
+ \edef\flattenedXMLcontent{#1}%
+ \edef\flattenedXMLcontent{\expandafter\dounspaced\flattenedXMLcontent\end}%
+ \@EA\endgroup
+ \@EA\def\@EA\flattenedXMLcontent\@EA{\flattenedXMLcontent}}
+
+\egroup
+
\protect \endinput