ntg-context - mailing list for ConTeXt users
 help / color / mirror / Atom feed
* xtag-ini.tex patch
@ 2002-06-21 12:00 Taco Hoekwater
  2001-06-21 14:11 ` Hans Hagen
  0 siblings, 1 reply; 2+ messages in thread
From: Taco Hoekwater @ 2002-06-21 12:00 UTC (permalink / raw)


Hi Hans, all,

This is a speed patch for the XML attribute parser:

\unprotect
\long\def\doparseXMLarguments#1% space goes ok
  {\if#1>%
     \let\dodoparseXMLarguments\empty
   \else\if#1/%
     \chardef\kindofXMLelement\emptyXMLtag
   \else
     \XMLtoks{#1}%
     \let\dodoparseXMLarguments\dodoparseXMLargumentsX
   \fi\fi%
   \dodoparseXMLarguments}

\def\dodoparseXMLargumentsX#1=#2{%
   \edef\@@XMLname{\the\XMLtoks#1}%
   \@EA\getXMLNSSSS\@@XMLname :\relax
   \XMLtoks\emptytoks
   \if#2"%
     \let\dodoparseXMLarguments\dodoparseXMLargumentsD
   \else
     \let\dodoparseXMLarguments\dodoparseXMLargumentsS
    \fi
   \dodoparseXMLarguments
}

\def\gobblecolon#1:{#1}

\def\getXMLNSSSS#1:#2\relax{%
  \def\testc{#2}%
  \ifx\empty\testc \else
    \edef\@@XMLname{\gobblecolon #2}%
    \XMLnamespacetrue
    \edef\@@XMLspac{#1}%
  \fi
}

\protect

-- 
groeten,

Taco


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-06-21 12:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-21 12:00 xtag-ini.tex patch Taco Hoekwater
2001-06-21 14:11 ` Hans Hagen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).