Re: [xml] xsltParseStylesheetDoc using internally generated xmlDoc

On Thu, Sep 06, 2007 at 12:01:21PM +1000, Nathan Day wrote:

   I  am  using  an  XSLT  to generate another XSLT. I am doing the usual
   stuff to get  an xmlDoc from a xslt and then trying to pass the result
   to xsltParseStylesheetDoc to get an xsltStylesheet. But I then get the

   "compilation error: element stylesheet"
   "xsltParseStylesheetProcess : document is not a stylesheet"
   Looking  at  the libxslt source they use the option XSLT_PARSE_OPTIONS
   when loading the xml document. Which is just a combination of
   Can  I  do  something  to  my  xmlDoc make it into a stylesheet before
   passing  to xsltParseStylesheetDoc.  Or do I have to just serialise it
   and then re-parse it as an XSLT

  I guess it's rather a problem with the namepace of the elements.
When you generated the doc, did you managed to set up the namespace ?
That can be a bit complex see example at end of section 7.1.1

Red Hat Virtualization group
Daniel Veillard      | virtualization library
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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