|
List Info
Thread: xsltApplystylesheet fails when Xpath functions are use in xsl
|
|
| xsltApplystylesheet fails when Xpath
functions are use in xsl |

|
2006-06-20 15:31:50 |
|
I have following code
int main()
{
xmlDocPtr doc = xmlParseFile("xmlfile.xml");
xsltStylesheetPtr xsl=xsltParseStylesheetFile("xslfile.xsl");
xmlDocPtr result = xsltApplyStylesheet(xsl, doc, NULL);
xmlSaveFile("stylesheet_output.xml", result);
xmlFreeDoc(doc);
xmlFreeDoc(result);
xsltFreeStylesheet(xsl);
return 0;
}
The program work fine when my xsl do not use any of the XPath
functions. I have a use case where I need to replace all the
single quotes with double single quotes. To achive this i wrote a xsl
where i used XPath "replace" function. the program fails giving
following output
xmlXPathCompOpEval: function replace not found
XPath error Unregistered function in replace($VAR1, $QUOTE, $DQUOTE)
xmlXPathCompiledEval: 2 object left on the stack
runtime error: file xslfile.xsl element value-of
the same xml when opened in browser gives me correct output.
I also tried using xsltproc this too gives the same error as shown above.
Can some one tell me the reason for this behavior.
-- Chidanand Gangur Pune.
|
| xsltApplystylesheet fails when Xpath
functions are use in xsl |

|
2006-06-20 16:35:50 |
On Tue, Jun 20, 2006 at 09:01:50PM +0530, Chidanand Gangur
wrote:
> I have following code
[...]
> xmlXPathCompOpEval: function replace not found
> XPath error Unregistered function in replace($VAR1,
$QUOTE, $DQUOTE)
[...]
> Can some one tell me the reason for this behavior.
Can you point me to the definition of replace() in the
XPath or XSLT 1.0
specifications ?
http://www.w3.org/TR/xpath
http://www.w3.org/TR/xslt
a>
Daniel
--
Daniel Veillard | Red Hat http://redhat.com/
veillard redhat.com | 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/
xml gnome.org
http://mai
l.gnome.org/mailman/listinfo/xml
|
|
[1-2]
|
|
|
about | contact Other archives ( Real Estate discussion Medical topics )
|