[Ocaml-pxp-users] The meaning of ANY

Dario Teixeira darioteixeira at yahoo.com
Sat Jan 30 07:57:19 PST 2010


Hi,

> PXP has an option that allows undeclared elements (put <?pxp:dtd
> optional-element-and-notation-declarations?> into the DTD), so that
> you practically get the effect you want. Look at intro_advanced.txt
> in the distribution for more documentation.

Thank you very much for the prompt reply; it was much appreciated.
That instruction does work as advertised, and from looking at the
source code I discovered that it essentially just invokes method
'allow_arbitrary' from class Pxp_dtd.dtd.  I am now invoking this
method directly instead of using the processing instruction.

There is however one problem with this approach.  Suppose an extraneous
element 'foo' is declared somewhere outside of 'mathmlblk'.  While PXP
correctly raises an error indicating that the top-level 'document' does
not match its content model, this error is too generic, giving no clue
that it was the declaration of 'foo' that caused the violation.  Is
there some way to either a) invoke some callback whenever an unknown
element is found, or b) get more detailed information about the error?

Thanks again for your time.
Best regards,
Dario Teixeira




      


More information about the Ocaml-pxp-users mailing list