[xslt] xsl:template

Greetings all,

The xsl:template tag defined in section 5.3 of the XSL Transforms
(http://www.w3.org/TR/xslt.html#section-Defining-Template-Rules) does
not seem to be supported by libxslt 0.7.  I have attached a test case
showing the problem.  I have also attached the output from compiling
and running is the testcase.

I do not understand the libxslt source well enough to understand how
to fix it.  However, I am willing to try if anyone can give me some
pointers on where to begin.

Jon Cast

/* template_test -- Tries a simple XSL transform using xsl:template */



main(argc, argv)
     int argc;
     char **argv;
  xsltStylesheetPtr style_sheet;
  xmlDocPtr input_doc;
  xmlDocPtr transformed_doc;
  /* Configure libxml to handle xsl files */
  xmlLoadExtDtdDefaultValue = 1;
  /* Parse script */
  style_sheet = xsltParseStylesheetFile("test.xsl");
  input_doc = xmlParseFile("test.xml");
  transformed_doc = xsltApplyStylesheet(style_sheet, input_doc,
  xmlIndentTreeOutput = 1; 

  xsltSaveResultToFile(stdout, transformed_doc, style_sheet);

  <p>This is included</p>
  <p>This isn't</p>

Included from input:

$ make gcc -c -g template_test.c -o template_test.o gcc -o template_test template_test.o -lxslt -lxml2 $ ./template_test xsltStylePreCompute: unknown xslt:template xsltApplyOneTemplate: problem with xsl:template

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]