Hi, [if you never use xml or don't use mkiv, you can skip this message] Currently in mkiv, the mkii method of xml is active at the same time; however, this is not always what you want and eventually i suppose that mkiv xml usage will replace mkii usage (i'm thinking of at some point making the old stream based xml method a module for mkiv) anyhow, one of aspects we need to deal with is mixed usage of documents, more about that later the latest beta has a \setupxml command with the following options (there are a few more): \setupxml[\c!method=mkii] % mixed mkiv and mkii \setupxml[\c!method=mkiv,\c!default=] % mkiv only \setupxml[\c!method=mkiv,\c!default=\v!none] % mkiv only, undefined -> hidden \setupxml[\c!method=mkiv,\c!default=\v!text] % mkiv only, undefined -> text the tricky part is in dealing with entities. By default entities are resolved to utd code, which means that <, > and & are part if the normal text stream. This is tricky because in mkii a dangling < or & gives an error. However, in mkii mode (i.e. mixed mode), these three characters are remapped to some place safe (the location in the unicode table will change once we have active chars in the private planes). i used this test: % \defineXMLenvironment[y]{(}{)} % % \startxmlsetups x % /\xmlflush{#1}/ % \stopxmlsetups % % \startxmlsetups xx % \xmlsetsetup{main}{x}{*} % \stopxmlsetups % % \xmlregistersetup{xx} % % \startbuffer % <x>a <&><y>{b}</y> c</x> % \stopbuffer Another change is that 'context --env=bla whatever.xml' will use mkiv xml mode unless the --mkii flag is passed. The alternative is rather ugly and tricky overloading of the traditional XML macros, an option that i rejected. An example that demonstrates mkiv usage is: context --ctx=x-ldx l-dimen.lua this will produce the documentation of l-dimen.lua and does a transformation as defined in the ctx file. Eventually all those texexec goodies (--pdfwhatever) will become such scripts combined with styles. Much is experimental and I will add more control over specific documents. Take for instance (from x-ldx.tex): \usemodule[mathml] \xmlregisterdocumentsetup{ldx}{xml:mml:define} \xmlregisterdocumentsetup{ldx}{xml:ldx:define} \xmlregisterns{ldx}{ldx} \startxmlsetups xml:ldx:define \xmlgrab {\xmldocument} {ldx:*} {*} \stopxmlsetups This associates the ldx definitions to the document but also mathml. I'm converting all traditional xml handling used in the core into mkiv handling (e.g. clt handling is already converted; clt deals with remapping filesnames into the ones that come out of preprocessing, as for instance in the ldx module). Hans ----------------------------------------------------------------- Hans Hagen | PRAGMA ADE Ridderstraat 27 | 8061 GH Hasselt | The Netherlands tel: 038 477 53 69 | fax: 038 477 53 74 | www.pragma-ade.com | www.pragma-pod.nl -----------------------------------------------------------------
participants (1)
-
Hans Hagen