Before you can begin parsing input files or stylesheets, there are
several steps you need to take to set up entity handling. These steps are
not unique to libxslt. Any
libxml2 program that parses
XML files would need to take similar steps.
First, you need set up some libxml
housekeeping. Pass the integer value 1 to the
xmlSubstituteEntitiesDefault function, which tells
the libxml2 parser to substitute entities as
it parses your file. (Passing 0 causes
libxml2 to not perform entity substitution.)
Second, set xmlLoadExtDtdDefaultValue equal to
1. This tells libxml
to load external entity subsets. If you do not do this and your
input file includes entities through external subsets, you will get
errors.
