Project

Profile

Help

Bug #1855

closed

Getting duplicate function error when I run some XML Code

Added by Arvind IK Chari almost 11 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
XQuery Java API
Sprint/Milestone:
-
Start date:
2013-07-24
Due date:
% Done:

0%

Estimated time:
Legacy ID:
Applies to branch:
Fix Committed on Branch:
Fixed in Maintenance Release:
Platforms:

Description

Hi

I am getting some duplicate function declaration error.

The XQuery code is run on an XML file attached- please change the $Doc parameter to that XML file in the XQuery code that is being run.

For reference, I have attached 12 such pieces of XQuery code that all have to be run on the same XML file.

Yours sincerely,

Arvind.


Files

Elance.zip (22.8 KB) Elance.zip Arvind IK Chari, 2013-07-24 17:41
crawler.zip (630 KB) crawler.zip Arvind IK Chari, 2013-07-27 14:30
Actions #1

Updated by Michael Kay almost 11 years ago

  • Priority changed from High to Normal

I'm sorry, I don't understand how I am supposed to run these queries. The XQuery code is embedded in CDATA sections in an XML document; there must be some kind of driver program which you have not supplied, which extracts the query from the XML wrapper and then executes it.

Actions #2

Updated by Arvind IK Chari almost 11 years ago

Hello Michael

Saxon is being used in a custom web crawler/ the crawler downloads the HTML page-> converts it to XML (that is the attached XML).

Now the separate 12 queries are run 1 by 1 on the XML and the data collected/stored in excel files (separate 12 excel files).

The reason I have not given the entire package to you earlier? So that you dont get bogged down in the workings of the crawler- in any case the portion that is not working is the queries I have attached- you can remove the formatting and try and run the queries (I am getting many "duplicate function declaration " errors when I try and run the queries and I had posted this on the forum as well- you had asked me to raise a ticket).

If you want I can attach the crawler as well as the entire XML which is run by the crawler(I have attached the queries only as they are part of the entire XML which includes downloading the HTML file, converting it to XML, extracting data, saving this data to excel and so on). And the crawler work (extracting HTML, converting to XML) works fine. Its at this stage (executing XQuery) that I am getting the errors.

Frankly I think I raised something similar many months back on the SourceForge forums as well- but I tried and could not find that forum topic now. (As far as I remember it was same issue of duplicate function definition error but I am not sure as it was some time back). Have the sourceforge forums been imported into the forums here as well? I will try and search again here in that case(tried in sourceforge forums and did not find the old issue).

Yours sincerely,

Arvind.

Actions #3

Updated by Michael Kay almost 11 years ago

I can't diagnose this problem for you without being able to run the queries. So I need to see how the queries are being run. The problem is almost certainly related to the way the queries are being run.

If you can reproduce the problem in a simpler environment that of course would be the ideal.

Actions #4

Updated by Arvind IK Chari almost 11 years ago

Hi

Attached with this message are the crawler (JAR) file, the XML containing the queries that are being run.

If you run the crawler via command line-

java -jar d:\data_output d:\crawljob.xml

Where- crawljob.xml is the "Crawl Job" that is run by the crawler.

The crawler source code is also attached.

Yours sincerely,

Arvind.

Actions #5

Updated by Michael Kay almost 11 years ago

  • File deleted (Data Crawler Core.zip)
Actions #6

Updated by Michael Kay almost 11 years ago

I have deleted the Data Crawler Zip file because it is 125Mb and consists almost entirely of JAR files for third party software, for which the licensing conditions are unspecified. We don't want to run the risk of posting software on this site that we have no right to redistribute. I have extracted the Java source files which were a tiny part of the download.

Actions #7

Updated by Michael Kay almost 11 years ago

I'm sorry, but this application is so complex, with so many dependencies on other software components, that I can't help you debug it.

If you believe that there is a Saxon bug here, then you will have to try to construct a much simpler application that demonstrates the bug.

So far as I can tell from the evidence provided, the error reported by Saxon is legitimate: you are constructing a query that contains two copies of the same function.

We always try to provide help when we can, but ultimately (and this is true even for paying customers), if you cannot provide a demonstration of a problem that we can run without installing third-party software, they you're on your own.

(Note: I tried to build the application but for starters, it depends on Java 7, and to debug a Java 7 application on Mac I need to upgrade IntelliJ, which has other complications and costs money. So it's not easy. I would do it for a commercial customer if there were clear evidence of a bug, but it's beyond what we can provide as a free service for open source users.)

Actions #8

Updated by O'Neil Delpratt over 10 years ago

  • Status changed from New to Closed

Closed without resolution; insufficient material available to reproduce the problem.

If you can supply a repro that we can run, you are welcome to reopen the issue.

Please register to edit this issue

Also available in: Atom PDF