• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Oracle XML Java Parser problem

 
Ranch Hand
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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

 
Marshal
Posts: 28193
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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
Posts: 57
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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?


 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic