Okay this section is clearly incomplete. But integrating libxslt into
yourapplication should be relatively easy. First check the few steps
describedbelow, then for more detailed informations, look at thegenerated pagesfor the API and the sourceof
libxslt/xsltproc.c and the tutorial. Basically doing an XSLT transformation can be done in a few steps: - configure the parser for XSLT:
xmlSubstituteEntitiesDefault(1);
xmlLoadExtDtdDefaultValue = 1;
- parse the stylesheet with xsltParseStylesheetFile()
- parse the document with xmlParseFile()
- apply the stylesheet using xsltApplyStylesheet()
- save the result using xsltSaveResultToFile() if needed
setxmlIndentTreeOutput to 1
Steps 2,3, and 5 will probably need to be changed depending on
youprocessing needs and environment for example if reading/saving
from/tomemory, or if you want to apply XInclude processing to the stylesheet
orinput documents. Daniel Veillard |