[lxml-dev] Avoiding DTD default attributes in XSLT

Stefan Behnel stefan_ml at behnel.de
Sat Nov 15 15:08:12 CET 2008


Hi,

Chuck Bearden wrote:
> xsltproc offers the '--nodtdattr' option to cause libxslt not to add
> default attributes from the DTD to the output document when they
> aren't present in the source document.

>From a quick glance at xsltproc's source, it looks like this option does
not impact the output document but the input document itself. So if you
parse the input document without loading the DTD (which is actually the
default), lxml should behave like xsltproc here.

Stefan



More information about the lxml-dev mailing list