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 > error > > "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 > XML_PARSE_NOENT | XML_PARSE_DTDLOAD | XML_PARSE_DTDATTR | > XML_PARSE_NOCDATA > 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 http://www.w3.org/TR/xslt#literal-result-element Daniel -- Red Hat Virtualization group http://redhat.com/virtualization/ Daniel Veillard | virtualization library http://libvirt.org/ [EMAIL PROTECTED] | libxml GNOME XML XSLT toolkit http://xmlsoft.org/ http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/ _______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
