[xml] xsltParseStylesheetDoc using internally generated xmlDoc



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




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