On 1/15/2016 9:20 PM, Thomas A. Schmitz wrote:
On 01/15/2016 06:58 PM, Kate F wrote:
So I see! But many DTDs contain definitions for entities, which I
would like to use, rather than repeating those definitions by
\xmlsetentity in ConTeXt. Some XML documents also have their own
document-specific entities inside the DOCTYPE at the top of the file.

For example in legal agreements, I have something like:

<?xml version="1.0"?>
<!DOCTYPE blah SYSTEM "blah.dtd" [
     <!ENTITY us   "the company">
     <!ENTITY you "the customer">
]>

Where the stuff inside [...] is considered part of a document-specific
DTD.
libxml2 handles this sort of thing with its "dtdattr" options; I
presume lxml has something similar.

AFAIK, ConTeXt has its own xml parser based on lua lpeg, see file
lxml-tab.lua. There is code there that treats entities, but I have never
used this approach, so you'll probably have to wait till Hans looks at
your question (or understand the lua code...)

i'll come back to it ... fyi: these doctype entities are already parsed in mkiv .. just not used (or maybe it got lost when fulfilling other wishes)

Hans

-----------------------------------------------------------------
                                          Hans Hagen | PRAGMA ADE
              Ridderstraat 27 | 8061 GH Hasselt | The Netherlands
      tel: 038 477 53 69 | www.pragma-ade.com | www.pragma-pod.nl
-----------------------------------------------------------------
___________________________________________________________________________________
If your question is of interest to others as well, please add an entry to the 
Wiki!

maillist : ntg-context@ntg.nl / http://www.ntg.nl/mailman/listinfo/ntg-context
webpage  : http://www.pragma-ade.nl / http://tex.aanhet.net
archive  : http://foundry.supelec.fr/projects/contextrev/
wiki     : http://contextgarden.net
___________________________________________________________________________________

Reply via email to