wood burning stoves 2.0*
The moose likes XML and Related Technologies and the fly likes Oracle XML Java Parser problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Oracle XML Java Parser problem" Watch "Oracle XML Java Parser problem" New topic
Author

Oracle XML Java Parser problem

Paulo Carvalho
Ranch Hand

Joined: Nov 12, 2008
Posts: 56
I have a little class that I wrote to apply a XSLT file to a XML using Oracle XML Parser.

Here is the code:


When I execute it, I get the following error on the line (*)

"oracle.xml.parser.v2.XPathException: Function 'empty' not found"

The XSL file is a XSL file that was generated by Altova Stylevision.

I opened the XSL to watch is content. There are some lines like the following ones (with the empty function):


The first line of the XSLT file is the following one, so I think everything is correct:


<xsl:stylesheet version="2.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:link="http://www.xbrl.org/2003/linkbase" xmlns:xbrldi="http://xbrl.org/2006/xbrldi" xmlns:xbrli="http://www.xbrl.org/2003/instance" xmlns:xdt="http://www.w3.org/2005/xpath-datatypes" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:altovaext="http://www.altova.com/xslt-extensions" xmlns:altova="http://www.altova.com" xmlns:fo="http://www.w3.org/1999/XSL/Format" exclude-result-prefixes="#all">


Anyone can help to understand from where the error is coming?
How can I solve it?

Thanks
Regards

Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 18140
    
    8

That's an XSLT 2.0 transformation, I see. Does your Oracle XML Parser product support XSLT 2.0? If not, then there's your problem. If it does, then I suggest using "fn:empty" instead of "empty". You do have the namespace for XPath functions declared with the "fn" prefix, so perhaps it's mandatory to use that prefix.
Paulo Carvalho
Ranch Hand

Joined: Nov 12, 2008
Posts: 56
Hello, thanks for your reply.

How can I know if my Oracle XML Parser supports XSLT 2.0? (I am using the xmlparserv2.jar jar file).

Thanks

Regards
Paulo Carvalho
Ranch Hand

Joined: Nov 12, 2008
Posts: 56
Paulo Carvalho wrote:Hello, thanks for your reply.

How can I know if my Oracle XML Parser supports XSLT 2.0? (I am using the xmlparserv2.jar jar file).

Thanks

Regards


Just for information, I tried with fn:empty but I got the following error:

Paulo Carvalho
Ranch Hand

Joined: Nov 12, 2008
Posts: 56
Ok, I solve my problem. I was using a old version of xmlparserv2.jar file.

Now, I have another error when executing the same line:

XML-22050: (Error) Duplicate variable 'altova:table' definition.
XML-22050: (Error) Duplicate variable 'altova:table' definition.
XML-22050: (Error) Duplicate variable 'altova:table' definition.
oracle.xml.xslt.XSLException: XML-22050: (Error) Duplicate variable 'altova:table' definition.
at oracle.xml.xslt.XSLStylesheet.flushErrors(XSLStylesheet.java:1848)

The XSLT is valid because when I execute the transformation with java.xml.Transformer class it works.

What can I do to solve the problem?


 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Oracle XML Java Parser problem
 
Similar Threads
XSLT stylesheet looping through the same node (recursion?)
Newbie Question---Help?
Problem in XSL apply-templates Tag ??
Conversion of Current Time In Milliseconds using XSLT
remove xml element xsl